Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1667227 > unrolled thread
| Started by | Theodore Dubois <tblodt@icloud.com> |
|---|---|
| First post | 2017-06-15 22:20 +0200 |
| Last post | 2017-06-16 17:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] mmap.2: mmap with address NULL and MAP_FIXED results in EPERM Theodore Dubois <tblodt@icloud.com> - 2017-06-15 22:20 +0200
Re: [PATCH] mmap.2: mmap with address NULL and MAP_FIXED results in EPERM Michal Hocko <mhocko@kernel.org> - 2017-06-16 17:30 +0200
| From | Theodore Dubois <tblodt@icloud.com> |
|---|---|
| Date | 2017-06-15 22:20 +0200 |
| Subject | [PATCH] mmap.2: mmap with address NULL and MAP_FIXED results in EPERM |
| Message-ID | <tSJpf-75B-5@gated-at.bofh.it> |
This can be verified with a simple test program. I'm not sure if this is a kernel bug or a documentation bug, though... --- man2/mmap.2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/man2/mmap.2 b/man2/mmap.2 index d1942b52a..58361c837 100644 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -515,6 +515,13 @@ was mounted no-exec. .\" (Since 2.4.25 / 2.6.0.) .TP .B EPERM +The +.I addr +argument is 0 and +.B MAP_FIXED +is specified. +.TP +.B EPERM The operation was prevented by a file seal; see .BR fcntl (2). .TP -- 2.13.1
[toc] | [next] | [standalone]
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Date | 2017-06-16 17:30 +0200 |
| Subject | Re: [PATCH] mmap.2: mmap with address NULL and MAP_FIXED results in EPERM |
| Message-ID | <tT1ma-1PG-5@gated-at.bofh.it> |
| In reply to | #1667227 |
On Thu 15-06-17 12:09:01, Theodore Dubois wrote: > This can be verified with a simple test program. I'm not sure if this is > a kernel bug or a documentation bug, though... THis is not a bug. You are not allowed to mmap anything below /proc/sys/vm/mmap_min_addr. So your patch to update documentation would have to mention this sysctl to be correct. > --- > man2/mmap.2 | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/man2/mmap.2 b/man2/mmap.2 > index d1942b52a..58361c837 100644 > --- a/man2/mmap.2 > +++ b/man2/mmap.2 > @@ -515,6 +515,13 @@ was mounted no-exec. > .\" (Since 2.4.25 / 2.6.0.) > .TP > .B EPERM > +The > +.I addr > +argument is 0 and > +.B MAP_FIXED > +is specified. > +.TP > +.B EPERM > The operation was prevented by a file seal; see > .BR fcntl (2). > .TP > -- > 2.13.1 -- Michal Hocko SUSE Labs
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web