linux-user: rt_sigprocmask, check read perms first
authorShu-Chun Weng <scw@google.com>
Wed, 26 Jan 2022 21:25:58 +0000 (13:25 -0800)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 27 Jan 2022 15:58:33 +0000 (16:58 +0100)
commitd3ced2a59a543b3c3fc7dee2e64ee360e9a698cd
treeab07701577c2ccb984abf679fe640bf79920c343
parent33f53ac52ab664f3d6ec34047c0ae21e32fa26b4
linux-user: rt_sigprocmask, check read perms first

Linux kernel does it this way (checks read permission before validating `how`)
and the latest version of ABSL's `AddressIsReadable()` depends on this
behavior.

c.f.  https://github.com/torvalds/linux/blob/9539ba4308ad5bdca6cb41c7b73cbb9f796dcdd7/kernel/signal.c#L3147
Reviewed-by: Patrick Venture <venture@google.com>
Signed-off-by: Shu-Chun Weng <scw@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Patrick Venture <venture@google.com>
Message-Id: <20220126212559.1936290-2-venture@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c