From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH 06/18] x86, barrier: stop speculation for failed access_ok Date: Sat, 6 Jan 2018 22:21:04 +0100 (CET) Message-ID: References: <151520099201.32271.4677179499894422956.stgit@dwillia2-desk3.amr.corp.intel.com> <151520102670.32271.8447983009852138826.stgit@dwillia2-desk3.amr.corp.intel.com> <20180106123242.77f4d860@alans-desktop> <20180106181331.mmrqwwbu2jcjj2si@ast-mbp> <20180106183859.1ad9ae37@alans-desktop> <20180106185134.dzn2en4vw2hj3p6h@ast-mbp> <20180106195551.3207f75d@alans-desktop> <20180106200912.zhzdt4qmfrojeeqe@ast-mbp> <20180106202213.23e553fb@alans-desktop> <20180106211729.cp5oet3at3hyce4o@ast-mbp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: Alan Cox , Linus Torvalds , Dan Williams , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Andi Kleen , Arnd Bergmann , Greg Kroah-Hartman , Peter Zijlstra , netdev@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" To: Alexei Starovoitov Return-path: In-Reply-To: <20180106211729.cp5oet3at3hyce4o@ast-mbp> Sender: linux-arch-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Sat, 6 Jan 2018, Alexei Starovoitov wrote: > So how about we do array_access() macro similar to above by default > with extra CONFIG_ to convert it to lfence ? > Why default to AND approach instead of lfence ? > Because the kernel should still be usable. If security > sacrifices performance so much such security will be turned off. > Ex: kpti suppose to add 5-30%. If it means 10% on production workload > and the datacenter capacity cannot grow 10% overnight, kpti will be off. That's the decision and responsibility of the person who disables it. Thanks, tglx