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: <BN6PR1101MB2161B983B1A85CE3803A3EF8A8289@BN6PR1101MB2161.namprd11.prod.outlook.com>
Date:   Tue, 18 Oct 2022 17:25:31 +0000
From:   "Li, Xin3" <xin3.li@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
CC:     "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>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "brgerst@...il.com" <brgerst@...il.com>,
        "Bae, Chang Seok" <chang.seok.bae@...el.com>
Subject: RE: [PATCH v3 4/6] x86/gsseg: move local_irq_save/restore() into
 asm_load_gs_index()

> >  static inline void native_load_gs_index(unsigned int selector)  {
> > -	unsigned long flags;
> > -
> > -	local_irq_save(flags);
> >  	asm_load_gs_index(selector);
> > -	local_irq_restore(flags);
> >  }
> 
> static inline void native_load_gs_index(unsigned int selector) {
> 	unsigned long flags;
> 
>         if (cpu_feature_enabled(LKGS)) {
>               native_lkgs(selector);
>         } else {
> 	      local_irq_save(flags);
>               asm_load_gs_index(selector);
> 	      local_irq_restore(flags);
>        }
> }
> 
> For paravirt enabled kernels we want during feature detection:
> 
>         if (cpu_feature_enabled(LKGS)))
>         	pv_ops.cpu.load_gs_index = native_lkgs;

If we use static_cpu_has in native_load_gs_index
       if (static_cpu_has(X86_FEATURE_LKGS)) {
               native_lkgs(selector);
       }

We don't have to change pv_ops.cpu.load_gs_index, right?

Thanks!
Xin

> 
> No?
> 
> Thanks,
> 
>         tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ