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]
Date:   Mon, 13 Mar 2023 17:42:46 +0000
From:   "Li, Xin3" <xin3.li@...el.com>
To:     "Hansen, Dave" <dave.hansen@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
CC:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "bigeasy@...utronix.de" <bigeasy@...utronix.de>,
        "Liu, Yujie" <yujie.liu@...el.com>,
        "Kang, Shan" <shan.kang@...el.com>
Subject: RE: [PATCH 1/1] x86/vdso: use the right GDT_ENTRY_CPUNODE for 32-bit
 getcpu() on 64-bit kernel

> > +#ifndef BUILD_VDSO32_64
> >  #define GDT_ENTRY_CPUNODE		28
> > +#else
> > +#define GDT_ENTRY_CPUNODE		15
> > +#endif
> 
> Isn't this kinda a hack?
> 
> First, it means that we'll now have two duplicate versions of this:
> 
> 	#define GDT_ENTRY_CPUNODE		15
> 
> in the same file.
> 
> Second, if any other users of fake_32bit_build.h for the VDSO show up, they'll
> need a similar #ifdef.
> 
> I think I'd much rather if we define all of the GDT_ENTRY_* macros in
> *one* place, then make that *one* place depend on BUILD_VDSO32_64.

Sounds a better way, let me try.

> Also, about the *silent* failure...  Do we not have a selftest for this somewhere?

When lsl is used, we should check ZF which indicates whether the segment limit
is loaded successfully.  Seems we need to refactor vdso_read_cpunode() a bit.

  Xin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ