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: <BN6PR1101MB2161FA3D7F1DB25C7F2C83ACA85F9@BN6PR1101MB2161.namprd11.prod.outlook.com>
Date:   Fri, 7 Oct 2022 22:41:35 +0000
From:   "Li, Xin3" <xin3.li@...el.com>
To:     "H. Peter Anvin" <hpa@...or.com>, Brian Gerst <brgerst@...il.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "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>
Subject: RE: [PATCH 5/6] x86/gsseg: move load_gs_index() to its own header
 file

> On October 7, 2022 8:40:41 AM PDT, Brian Gerst <brgerst@...il.com> wrote:
> >On Thu, Oct 6, 2022 at 12:13 PM Xin Li <xin3.li@...el.com> wrote:
> >>
> >> From: "H. Peter Anvin (Intel)" <hpa@...or.com>
> >>
> >> <asm/cpufeature.h> depends on <asm/special_insns.h>, so in order to
> >> be able to use alternatives in native_load_gs_index(), factor it out
> >> into a separate header file.
> >>
> >> Signed-off-by: H. Peter Anvin (Intel) <hpa@...or.com>
> >> Signed-off-by: Xin Li <xin3.li@...el.com>
> >
> >This could be moved into <asm/segment.h> instead of creating a new header
> file.

Good suggestion.  However I still prefer to keep GS segment in its own header file,
1) it's a special segment for x86_64 kernel, and it's more readable to keep it separated.
2) segment.h is included in too many files, but gsseg.h only 4 files.  We avoid header pollution.

Maybe we should even factor GS segment out of segment.h for x86_64.

Xin

> >
> >--
> >Brian Gerst
> 
> At least at the time I wrote the code, it could not, without creating yet another
> circular header file dependency.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ