mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@alien8.de>, "Xin Li (Intel)" <xin@zytor.com>
Cc: linux-kernel@vger.kernel.org, luto@kernel.org,
	tglx@linutronix.de, mingo@redhat.com,
	dave.hansen@linux.intel.com, x86@kernel.org
Subject: Re: [PATCH v1 1/1] x86/fred: Fix int80 emulation for FRED
Date: Tue, 16 Apr 2024 11:05:09 -0700	[thread overview]
Message-ID: <1AE9FA53-A130-4F95-8408-C1990DD031AA@zytor.com> (raw)
In-Reply-To: <20240416101147.GDZh5O473e4X_ZG1lZ@fat_crate.local>

On April 16, 2024 3:11:47 AM PDT, Borislav Petkov <bp@alien8.de> wrote:
>On Fri, Apr 12, 2024 at 04:40:58PM -0700, Xin Li (Intel) wrote:
>> Commit 55617fb991df
>
>Use the full commit abbreviation when mentioning commits:
>
>"Commit
>
>  55617fb991df ("x86/entry: Do not allow external 0x80 interrupts")
>
>..."
>
>> added a bunch of tests to the int $0x80 path,
>
>Added a bunch of tests?
>
>What does that even mean?
>
>> however they are unnecessary and event wrong in fact under FRED.
>
>Are the bunch of tests wrong or is do_int80_emulation() simply the wrong
>handler to use on a FRED?
>
>> First FRED distinguishes external interrupts from software interrupts,
>> thus int80_emulation() should NEVER be called for handling an external
>> interrupt, and then int80_is_external() should be skipped under FRED.
>> 
>> Second, the FRED kernel entry handler NEVER dispatches INTx, which is
>> of event type EVENT_TYPE_SWINT, so the user mode checking in
>> do_int80_emulation() is redundant, and should be skipped.
>> 
>> It might be even better to strip down do_int80_emulation() to a lean
>> fred_int80_emulation(), not to mention int80_emulation() does a
>> CLEAR_BRANCH_HISTORY.
>
>Yah, how about you do a FRED-specific INT80 handler instead of
>sprinkling moar tests around? fred_intx() looks like the right place to
>stuff it in...
>

The question was if you wanted a quick fix for x86/urgent. It's pretty obvious that a FRED fork of the int80 code is called for.

  parent reply	other threads:[~2024-04-16 18:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 23:40 Xin Li (Intel)
2024-04-15 16:21 ` H. Peter Anvin
2024-04-16 10:11 ` Borislav Petkov
2024-04-16 16:58   ` Xin Li
2024-04-16 18:05   ` H. Peter Anvin [this message]
2024-04-16 18:07     ` Borislav Petkov
2024-04-16 18:11       ` H. Peter Anvin
2024-04-16 18:18         ` Borislav Petkov
2024-04-16 18:19           ` 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=1AE9FA53-A130-4F95-8408-C1990DD031AA@zytor.com \
    --to=hpa@zytor.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    /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®