Re: [PATCH] signal: move the "sig < SIGRTMIN" check into siginmask(sig)
From: Meelis Roos
Date: Wed May 18 2016 - 13:05:59 EST
> All the users of siginmask() must ensure that sig < SIGRTMIN. sig_fatal()
> doesn't and this is wrong:
>
> [ 211.406327] UBSAN: Undefined behaviour in kernel/signal.c:911:6
> [ 211.406365] shift exponent 32 is too large for 32-bit type 'long unsigned int'
>
> the patch doesn't add the neccesary check to sig_fatal(), it moves the
> check into siginmask() and updates other callers.
>
> Reported-by: Meelis Roos <mroos@xxxxxxxx>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Tested on the same AthlonMP, on HP Proliant DL360G3 and PowerMac G4,
successfully - system still works, warnings are gone.
--
Meelis Roos (mroos@xxxxxxxx)