* mmap 0-th page
@ 2024-07-26 10:36 michal.hrachovec
2024-07-26 10:54 ` Greg KH
2024-07-31 7:39 ` Jiri Slaby
0 siblings, 2 replies; 4+ messages in thread
From: michal.hrachovec @ 2024-07-26 10:36 UTC (permalink / raw)
To: stable; +Cc: regressions
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-linux-with-mmap-fails
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
|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap 0-th page
2024-07-26 10:36 mmap 0-th page michal.hrachovec
@ 2024-07-26 10:54 ` Greg KH
2024-07-31 7:39 ` Jiri Slaby
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2024-07-26 10:54 UTC (permalink / raw)
To: michal.hrachovec@volny.cz; +Cc: stable, regressions
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-linux-with-mmap-fails
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap 0-th page
2024-07-26 10:36 mmap 0-th page michal.hrachovec
2024-07-26 10:54 ` Greg KH
@ 2024-07-31 7:39 ` Jiri Slaby
2024-07-31 7:43 ` Jiri Slaby
1 sibling, 1 reply; 4+ messages in thread
From: Jiri Slaby @ 2024-07-31 7:39 UTC (permalink / raw)
To: michal.hrachovec@volny.cz, stable; +Cc: regressions
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.
--
js
suse labs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mmap 0-th page
2024-07-31 7:39 ` Jiri Slaby
@ 2024-07-31 7:43 ` Jiri Slaby
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2024-07-31 7:43 UTC (permalink / raw)
To: michal.hrachovec@volny.cz, stable; +Cc: regressions
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...
--
--
js
suse labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-31 7:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26 10:36 mmap 0-th page michal.hrachovec
2024-07-26 10:54 ` Greg KH
2024-07-31 7:39 ` Jiri Slaby
2024-07-31 7:43 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).