[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af0d21eb-c31c-4a3d-99ac-45abf3bdaabd@zytor.com>
Date: Wed, 17 Apr 2024 08:09:19 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Xin Li <xin@...or.com>, Borislav Petkov <bp@...en8.de>
Cc: linux-kernel@...r.kernel.org, luto@...nel.org, tglx@...utronix.de,
mingo@...hat.com, dave.hansen@...ux.intel.com, x86@...nel.org
Subject: Re: [PATCH v3 1/1] x86/fred: Fix INT80 emulation for FRED
On 4/17/24 08:06, Xin Li wrote:
> On 4/17/2024 2:38 AM, Borislav Petkov wrote:
>> On Tue, Apr 16, 2024 at 11:30:01PM -0700, Xin Li (Intel) wrote:
>>> 3) The FRED kernel entry handler does *NOT* dispatch INT instructions,
>>> which is of event type EVENT_TYPE_SWINT, so compared with
>>> do_int80_emulation(), there is no need to do any user mode check.
>>
>> What does that mean?
>>
>> An event handler doesn't dispatch INT insns?
>>
>> /me is confused.
>>
>
> Maybe better to say?
>
> The FRED kernel entry handler fred_entry_from_kernel() calls
> fred_bad_type() if an event is of type EVENT_TYPE_SWINT because Kernel
> does not use INT insns! So if the kernel is handling an INT insn, it can
> only be from a user level application.
>
(Note: if we at some point in the future we may end up adding INT calls
from the kernel, at least on FRED it would *still* not share the same
code paths and so int $0x80 would not get dispatched.)
-hpa
Powered by blists - more mailing lists