Good afternoon,
I am trying to allocate the 0-th page with mmap function in my code. I am always getting this error with this error-code: mmap error ffffffff Then I was searching the internet for this topic and I have found the same topic at stackoverflow web pages.
Here I am sending the link: https://stackoverflow.com/questions/63790813/allocating-address-zero-on-linu...
I was setting value of |/proc/sys/vm/mmap_min_add to zero and using the root privileges along the link. And I am having the same problem still.
Can you help, please.
Thank you for the reply.
Michal Hrachovec
|
On Fri, Jul 26, 2024 at 12:36:29PM +0200, michal.hrachovec@volny.cz wrote:
Good afternoon,
I am trying to allocate the 0-th page with mmap function in my code. I am always getting this error with this error-code: mmap error ffffffff Then I was searching the internet for this topic and I have found the same topic at stackoverflow web pages.
Here I am sending the link: https://stackoverflow.com/questions/63790813/allocating-address-zero-on-linu...
I was setting value of |/proc/sys/vm/mmap_min_add to zero and using the root privileges along the link. And I am having the same problem still.
Can you help, please.
The stable and regressions mailing list is not the proper place for this type of question, sorry.
If this is a regression from a previous kernel version, it might be the place but you don't specify any kernel version information here.
best of luck!
greg k-h
On 26. 07. 24, 12:36, michal.hrachovec@volny.cz wrote:
I am trying to allocate the 0-th page with mmap function in my code. I am always getting this error with this error-code: mmap error ffffffff Then I was searching the internet for this topic and I have found the same topic at stackoverflow web pages.
char *zero = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); *(char *)(NULL) = 'A'; printf("%c\n", *zero);
still yields 'A' here with 6.10.2 w/ vm.mmap_min_addr=0.
On 31. 07. 24, 9:39, Jiri Slaby wrote:
On 26. 07. 24, 12:36, michal.hrachovec@volny.cz wrote:
I am trying to allocate the 0-th page with mmap function in my code. I am always getting this error with this error-code: mmap error ffffffff Then I was searching the internet for this topic and I have found the same topic at stackoverflow web pages.
char *zero = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); *(char *)(NULL) = 'A'; printf("%c\n", *zero);
still yields 'A' here with 6.10.2 w/ vm.mmap_min_addr=0.
Yeah and mind LSMs...
linux-stable-mirror@lists.linaro.org