Re: [PATCH] signal: Make the si_code check in rt_[tg]sigqueueinfo stricter

From: Amanieu d'Antras
Date: Tue Oct 13 2015 - 11:41:21 EST


On Tue, Oct 13, 2015 at 3:54 PM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> I agree, this doesn't look right... But I'm afraid it is too late to
> change this, this logic predates the git history.
>
> And unless I missed something copy_siginfo_to_user32() assumes that
> "from" was filled by copy_siginfo_from_user32(), but this is not true
> if the sender is 64bit task. And this all doesn't match the behaviour
> with 32bit kernel.
>
> Personally, I think we should leave this ancient code alone. But I
> agree that something like below looks right... I dunno.

I am currently working on another patch set that updates
copy_siginfo_{to,from}_user32 to match the behavior of 32-bit kernels.
I will fix the si_code encoding there with a change similar to yours.

Amanieu d'Antras
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/