From: Jiri Slaby <jirislaby@kernel.org>
To: "michal.hrachovec@volny.cz" <michal.hrachovec@volny.cz>,
stable@vger.kernel.org
Cc: regressions@lists.linux.dev
Subject: Re: mmap 0-th page
Date: Wed, 31 Jul 2024 09:39:53 +0200 [thread overview]
Message-ID: <54b32f3f-1e5a-4429-b81d-4ab91ceb6bcb@kernel.org> (raw)
In-Reply-To: <3855f3cf-9c63-4498-853a-d3a0a2f47e7f@volny.cz>
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
next prev parent reply other threads:[~2024-07-31 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-07-31 7:43 ` Jiri Slaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54b32f3f-1e5a-4429-b81d-4ab91ceb6bcb@kernel.org \
--to=jirislaby@kernel.org \
--cc=michal.hrachovec@volny.cz \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.