Re: [PATCH 09/20] signal/vm86_32: Replace open coded BUG_ON with an actual BUG_ON

From: Linus Torvalds
Date: Fri Nov 12 2021 - 16:23:39 EST


On Fri, Nov 12, 2021 at 1:04 PM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>
> Still if we are going to check for userspace being silly that it should
> be in do_sys_vm86.

Sore, something like

if (!user_vm86)
return -EINVAL;

in do_sys_vm86() sounds fine to me.

It could in theory break some odd test-case, but I can't see anybody
putting the vm86 save area at 0 in a real situation.

But I could see some quick test hack doing it - the IVT at boot is
actually not at zero, but at fffxxxxx. 8086 is magic.

Linus