WSL2-Linux-Kernel/ipc
Hugh Dickins df1e2fb540 [PATCH] shmdt: check address alignment
SUSv3 says the shmdt() function shall fail with EINVAL if the value of
shmaddr is not the data segment start address of a shared memory segment:
our sys_shmdt needs to reject a shmaddr which is not page-aligned.

Does it have the potential to break existing apps?

Hugh says

  "sys_shmdt() just does the wrong (unexpected) thing with a misaligned
  address: it'll fail on what you might expect it to succeed on, and only
  succeed on what it should definitely fail on.

  "That is, I think it behaves as if shmaddr gets rounded up, when the only
  understandable behaviour would be if it rounded it down.

  "Which does mean you'd have to be devious to see anything but EINVAL from
  a misaligned shmaddr there, so it's not terribly important."

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:25 -08:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
compat.c [PATCH] compat: be more consistent about [ug]id_t 2005-09-07 16:57:19 -07:00
compat_mq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mqueue.c Remove superfluous NOTIFY_COOKIE_LEN define 2006-03-22 00:34:37 +01:00
msg.c correct email address of Manfred Spraul 2006-01-15 02:43:54 +01:00
msgutil.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sem.c correct email address of Manfred Spraul 2006-01-15 02:43:54 +01:00
shm.c [PATCH] shmdt: check address alignment 2006-03-24 07:33:25 -08:00
util.c correct email address of Manfred Spraul 2006-01-15 02:43:54 +01:00
util.h correct email address of Manfred Spraul 2006-01-15 02:43:54 +01:00