Open ctgreybeard opened 6 years ago
@ctgreybeard Can you add this extra CFLAG to the Makefile and try compiling?
-fno-pie
Will do. On your fix re: strsep(), where is the memory leak coming from? The value of input is not changed by strsep(), only the memory it points to. I will give it a test this morning & let you know. When I build with kmalloc()/kfree() the leak was reduced by a factor of about 1000.
On Mon, May 7, 2018 at 6:57 PM, milesp20 notifications@github.com wrote:
@ctgreybeard https://github.com/ctgreybeard Can you add this extra CFLAG to the Makefile and try compiling?
-fno-pie
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/milesp20/intel_nuc_led/issues/10#issuecomment-387260275, or mute the thread https://github.com/notifications/unsubscribe-auth/AYOCG1nfq5ETMesrbkk5xhieAL4gN-ZQks5twPuPgaJpZM4T0DW1 .
Upon further reading if the strsep() doc, I see it does store back into the input pointer! What I did was just save the pointer when allocated, then use that saved value in the free().
There is one slight spot where a leak can occur, and thats if copy_from_user() fails for some reason. Its a small corner case admittedly. :)
Thanks for writing the driver! Its a nice piece of work.
On Tue, May 8, 2018 at 8:39 AM, Holt Mebane holtmebane@gmail.com wrote:
Will do. On your fix re: strsep(), where is the memory leak coming from? The value of input is not changed by strsep(), only the memory it points to. I will give it a test this morning & let you know. When I build with kmalloc()/kfree() the leak was reduced by a factor of about 1000.
On Mon, May 7, 2018 at 6:57 PM, milesp20 notifications@github.com wrote:
@ctgreybeard https://github.com/ctgreybeard Can you add this extra CFLAG to the Makefile and try compiling?
-fno-pie
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/milesp20/intel_nuc_led/issues/10#issuecomment-387260275, or mute the thread https://github.com/notifications/unsubscribe-auth/AYOCG1nfq5ETMesrbkk5xhieAL4gN-ZQks5twPuPgaJpZM4T0DW1 .
@milesp20 Adding that flag did get me farther but I'm now running into some includes that I don't have yet. It started with stdargs.h iirc and went from there. I am thinking that the Server edition isn't intended to be a dev machine. I decided to use that one because I didn't want the gui baggage. Maybe I'll spin up a desktop version to do the build on.
But if you know which packages I will need then that would be helpful.
Bill
When attempting to make the module I get:
This is a new install on a NUC7i5BNH with Ubuntu Server 18.04.