lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250317104616.GCZ9f9eF-0n0qPbWwk@fat_crate.local>
Date: Mon, 17 Mar 2025 11:46:16 +0100
From: Borislav Petkov <bp@...en8.de>
To: Uros Bizjak <ubizjak@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>, Andy Lutomirski <luto@...nel.org>,
	Brian Gerst <brgerst@...il.com>, "H. Peter Anvin" <hpa@...or.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org
Subject: Re: [tip: x86/fpu] x86/fpu: Use XSAVE{,OPT,C,S} and XRSTOR{,S}
 mnemonics in xstate.h

On Mon, Mar 17, 2025 at 11:28:58AM +0100, Uros Bizjak wrote:
> > > @@ -114,10 +113,10 @@ static inline int update_pkru_in_sigframe(struct xregs_state __user *buf, u64 ma
> > >  #define XSTATE_OP(op, st, lmask, hmask, err)                         \
> > >       asm volatile("1:" op "\n\t"                                     \
> > >                    "xor %[err], %[err]\n"                             \
> > > -                  "2:\n\t"                                           \
> > > +                  "2:\n"                                             \
> > >                    _ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_FAULT_MCE_SAFE)  \
> > >                    : [err] "=a" (err)                                 \
> > > -                  : "D" (st), "m" (*st), "a" (lmask), "d" (hmask)    \
> > > +                  : [xa] "m" (*(st)), "a" (lmask), "d" (hmask)       \
> >
> > This [xa] needs documenting in the comment above this.
> >
> > What does "xa" even mean?
> 
> xsave area.

That's struct xregs_state in kernel nomenclature.

And the macro's argument is called "st".

And when it says [xa] there, one wonders where that "xa" comes from. So please
add a comment above the macro explaining that.

And you can redo the whole patch - it is the topmost one in tip:x86/fpu and
can simply be replaced.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ