mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xin Li <xin@zytor.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, luto@kernel.org,
	tglx@linutronix.de, mingo@redhat.com,
	dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com
Subject: Re: [PATCH v3 1/1] x86/fred: Fix INT80 emulation for FRED
Date: Wed, 17 Apr 2024 08:06:31 -0700	[thread overview]
Message-ID: <e8180be8-b108-4047-ab49-2cfc532a2b52@zytor.com> (raw)
In-Reply-To: <20240417093813.GBZh-YhSQCXgy3OxFI@fat_crate.local>

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.


>> + * A dedicated FRED INT80 handler duplicates quite a bit of the code in
>> + * do_int80_emulation(), but it avoids sprinkling more tests and seems
>> + * more readable. Just remember that we can always unify common stuff
>> + * later if it turns out that it won't diverge anymore, i.e., after the
>> + * FRED code settles.
>> + */
> 
> And this is talking about duplication above and that text is duplicated
> from the commit message. :)

I wanted to keep it as a TODO.  I can remove it in the next iteration.

> 
> I'll zap it when applying.
> 
> Thx.
> 


  parent reply	other threads:[~2024-04-17 15:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  6:30 Xin Li (Intel)
2024-04-17  9:38 ` Borislav Petkov
2024-04-17 14:59   ` H. Peter Anvin
2024-04-17 15:34     ` Xin Li
2024-04-17 20:28     ` Borislav Petkov
2024-04-17 15:06   ` Xin Li [this message]
2024-04-17 15:09     ` H. Peter Anvin
2024-04-17 11:02 ` Nikolay Borisov
2024-04-17 15:07   ` H. Peter Anvin
2024-04-17 15:55     ` Xin Li
2024-04-17 16:39       ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8180be8-b108-4047-ab49-2cfc532a2b52@zytor.com \
    --to=xin@zytor.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®