__write_overflow declared with attribute error
I'm using memset
and memcpy
in my linux kernel project.
When I've tried to make
the project, I got the following error:
In function ‘memset’,
inlined from ‘init_minifw_read_write_module’ at /home/ido/CLionProjects/Firewall/KernelSpace/minfirewall.c:118:13:
./include/linux/string.h:327:3: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object passed as 1st parameter
__write_overflow();
I didn't find any workaround for the above error.
I've added the CFLAGS
to my Makefile in order to avoid this issue:
obj-m += minfirewall.o
CFLAGS_minfirewall.o := -D_FORTIFY_SOURCE=0
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
But the issue is still persist.
I'm running kernel version 4.18.0-15-generic.
Any ideas how to fix this error?
kernel compiling
New contributor
add a comment |
I'm using memset
and memcpy
in my linux kernel project.
When I've tried to make
the project, I got the following error:
In function ‘memset’,
inlined from ‘init_minifw_read_write_module’ at /home/ido/CLionProjects/Firewall/KernelSpace/minfirewall.c:118:13:
./include/linux/string.h:327:3: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object passed as 1st parameter
__write_overflow();
I didn't find any workaround for the above error.
I've added the CFLAGS
to my Makefile in order to avoid this issue:
obj-m += minfirewall.o
CFLAGS_minfirewall.o := -D_FORTIFY_SOURCE=0
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
But the issue is still persist.
I'm running kernel version 4.18.0-15-generic.
Any ideas how to fix this error?
kernel compiling
New contributor
hi! I'm not sure I've got the best insight to provide but I believe there's this thing with adding stuff to the kernel where generally libs are bleeding edge, do you think it's possible this error might go away with an attempt to compile a more recent version of the kernel, like at least 4.20? is it with 4.18.0-15-generic so as to avoid apt update warning?
– tatsu
Mar 13 at 11:01
Is there a workaround ?
– Ido Segal
Mar 13 at 11:12
well I'm suggesting a workaround : use a higher version kernel as your working copy. But ignore me, more talented people will come around to provide better insight I'm not experienced with kernel compilation. kernel compilation is what you are attempting to do, right?
– tatsu
Mar 13 at 13:37
It sounds like you're trying to write more bytes to the array than it is capable of holding. I'd check the values of the parameters you are providing to these functions.
– gsxruk
Mar 13 at 16:03
add a comment |
I'm using memset
and memcpy
in my linux kernel project.
When I've tried to make
the project, I got the following error:
In function ‘memset’,
inlined from ‘init_minifw_read_write_module’ at /home/ido/CLionProjects/Firewall/KernelSpace/minfirewall.c:118:13:
./include/linux/string.h:327:3: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object passed as 1st parameter
__write_overflow();
I didn't find any workaround for the above error.
I've added the CFLAGS
to my Makefile in order to avoid this issue:
obj-m += minfirewall.o
CFLAGS_minfirewall.o := -D_FORTIFY_SOURCE=0
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
But the issue is still persist.
I'm running kernel version 4.18.0-15-generic.
Any ideas how to fix this error?
kernel compiling
New contributor
I'm using memset
and memcpy
in my linux kernel project.
When I've tried to make
the project, I got the following error:
In function ‘memset’,
inlined from ‘init_minifw_read_write_module’ at /home/ido/CLionProjects/Firewall/KernelSpace/minfirewall.c:118:13:
./include/linux/string.h:327:3: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object passed as 1st parameter
__write_overflow();
I didn't find any workaround for the above error.
I've added the CFLAGS
to my Makefile in order to avoid this issue:
obj-m += minfirewall.o
CFLAGS_minfirewall.o := -D_FORTIFY_SOURCE=0
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
But the issue is still persist.
I'm running kernel version 4.18.0-15-generic.
Any ideas how to fix this error?
kernel compiling
kernel compiling
New contributor
New contributor
New contributor
asked Mar 13 at 10:03
Ido SegalIdo Segal
12
12
New contributor
New contributor
hi! I'm not sure I've got the best insight to provide but I believe there's this thing with adding stuff to the kernel where generally libs are bleeding edge, do you think it's possible this error might go away with an attempt to compile a more recent version of the kernel, like at least 4.20? is it with 4.18.0-15-generic so as to avoid apt update warning?
– tatsu
Mar 13 at 11:01
Is there a workaround ?
– Ido Segal
Mar 13 at 11:12
well I'm suggesting a workaround : use a higher version kernel as your working copy. But ignore me, more talented people will come around to provide better insight I'm not experienced with kernel compilation. kernel compilation is what you are attempting to do, right?
– tatsu
Mar 13 at 13:37
It sounds like you're trying to write more bytes to the array than it is capable of holding. I'd check the values of the parameters you are providing to these functions.
– gsxruk
Mar 13 at 16:03
add a comment |
hi! I'm not sure I've got the best insight to provide but I believe there's this thing with adding stuff to the kernel where generally libs are bleeding edge, do you think it's possible this error might go away with an attempt to compile a more recent version of the kernel, like at least 4.20? is it with 4.18.0-15-generic so as to avoid apt update warning?
– tatsu
Mar 13 at 11:01
Is there a workaround ?
– Ido Segal
Mar 13 at 11:12
well I'm suggesting a workaround : use a higher version kernel as your working copy. But ignore me, more talented people will come around to provide better insight I'm not experienced with kernel compilation. kernel compilation is what you are attempting to do, right?
– tatsu
Mar 13 at 13:37
It sounds like you're trying to write more bytes to the array than it is capable of holding. I'd check the values of the parameters you are providing to these functions.
– gsxruk
Mar 13 at 16:03
hi! I'm not sure I've got the best insight to provide but I believe there's this thing with adding stuff to the kernel where generally libs are bleeding edge, do you think it's possible this error might go away with an attempt to compile a more recent version of the kernel, like at least 4.20? is it with 4.18.0-15-generic so as to avoid apt update warning?
– tatsu
Mar 13 at 11:01
hi! I'm not sure I've got the best insight to provide but I believe there's this thing with adding stuff to the kernel where generally libs are bleeding edge, do you think it's possible this error might go away with an attempt to compile a more recent version of the kernel, like at least 4.20? is it with 4.18.0-15-generic so as to avoid apt update warning?
– tatsu
Mar 13 at 11:01
Is there a workaround ?
– Ido Segal
Mar 13 at 11:12
Is there a workaround ?
– Ido Segal
Mar 13 at 11:12
well I'm suggesting a workaround : use a higher version kernel as your working copy. But ignore me, more talented people will come around to provide better insight I'm not experienced with kernel compilation. kernel compilation is what you are attempting to do, right?
– tatsu
Mar 13 at 13:37
well I'm suggesting a workaround : use a higher version kernel as your working copy. But ignore me, more talented people will come around to provide better insight I'm not experienced with kernel compilation. kernel compilation is what you are attempting to do, right?
– tatsu
Mar 13 at 13:37
It sounds like you're trying to write more bytes to the array than it is capable of holding. I'd check the values of the parameters you are providing to these functions.
– gsxruk
Mar 13 at 16:03
It sounds like you're trying to write more bytes to the array than it is capable of holding. I'd check the values of the parameters you are providing to these functions.
– gsxruk
Mar 13 at 16:03
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Ido Segal is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125274%2fwrite-overflow-declared-with-attribute-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ido Segal is a new contributor. Be nice, and check out our Code of Conduct.
Ido Segal is a new contributor. Be nice, and check out our Code of Conduct.
Ido Segal is a new contributor. Be nice, and check out our Code of Conduct.
Ido Segal is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125274%2fwrite-overflow-declared-with-attribute-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
hi! I'm not sure I've got the best insight to provide but I believe there's this thing with adding stuff to the kernel where generally libs are bleeding edge, do you think it's possible this error might go away with an attempt to compile a more recent version of the kernel, like at least 4.20? is it with 4.18.0-15-generic so as to avoid apt update warning?
– tatsu
Mar 13 at 11:01
Is there a workaround ?
– Ido Segal
Mar 13 at 11:12
well I'm suggesting a workaround : use a higher version kernel as your working copy. But ignore me, more talented people will come around to provide better insight I'm not experienced with kernel compilation. kernel compilation is what you are attempting to do, right?
– tatsu
Mar 13 at 13:37
It sounds like you're trying to write more bytes to the array than it is capable of holding. I'd check the values of the parameters you are providing to these functions.
– gsxruk
Mar 13 at 16:03