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
| ||
|
Date: Wed, 29 Mar 2017 07:47:26 +0200 (CEST) From: Thomas Gleixner <tglx@...utronix.de> To: Kan Liang <kan.liang@...el.com> cc: peterz@...radead.org, mingo@...hat.com, linux-kernel@...r.kernel.org, bp@...en8.de, acme@...nel.org, eranian@...gle.com, jolsa@...nel.org, ak@...ux.intel.com Subject: Re: [PATCH V4 1/2] x86/msr: expose msr_flip_bit function On Tue, 28 Mar 2017, kan.liang@...el.com wrote: > From: Kan Liang <Kan.liang@...el.com> > > There is no exported kernel interfaces which can flip a MSR bit. It has > to do read-modify-write operation on the MSR through rd/wrmsr* > interfaces. But the method is not atomic. > > There is already __flip_bit support. Just rename and expose it. This function is not atomic either. Protection has to be provided by the caller. > -static inline int __flip_bit(u32 msr, u8 bit, bool set) > +int msr_flip_bit(u32 msr, u8 bit, bool set) > { > struct msr m, m1; > int err = -EINVAL; > @@ -85,6 +85,7 @@ static inline int __flip_bit(u32 msr, u8 bit, bool set) > > return 1; > } > +EXPORT_SYMBOL_GPL(msr_flip_bit); That export is not required. The call site is always built in. Thanks, tglx
Powered by blists - more mailing lists