-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error making - code model kernel does not support PIC mode #10
Comments
@ctgreybeard Can you add this extra CFLAG to the Makefile and try compiling?
|
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 ***@***.***> 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
<#10 (comment)>,
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 ***@***.***> 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 ***@***.***> 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
> <#10 (comment)>,
> 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.
The text was updated successfully, but these errors were encountered: