From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932166AbcEMLuk (ORCPT ); Fri, 13 May 2016 07:50:40 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33729 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067AbcEMLuh (ORCPT ); Fri, 13 May 2016 07:50:37 -0400 Date: Fri, 13 May 2016 13:50:31 +0200 From: Ingo Molnar To: Andy Lutomirski Cc: X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Thomas Gleixner , "H. Peter Anvin" , Sasha Levin , Mateusz Guzik Subject: Re: [PATCH] x86/arch_prctl/64: restore accidentally removed put_cpu in ARCH_SET_GS Message-ID: <20160513115031.GA30189@gmail.com> References: <1462913803-29634-1-git-send-email-mguzik@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > On Tue, May 10, 2016 at 1:56 PM, Mateusz Guzik wrote: > > This fixes 731e33e39a5b95ad770 "Remove FSBASE/GSBASE < 4G optimization" > > > > Signed-off-by: Mateusz Guzik > > --- > > arch/x86/kernel/process_64.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c > > index 4285f6a..6b16c36 100644 > > --- a/arch/x86/kernel/process_64.c > > +++ b/arch/x86/kernel/process_64.c > > @@ -541,6 +541,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) > > load_gs_index(0); > > ret = wrmsrl_safe(MSR_KERNEL_GS_BASE, addr); > > } > > + put_cpu(); > > break; > > case ARCH_SET_FS: > > /* Not strictly needed for fs, but do it for symmetry > > -- > > 1.8.3.1 > > > > Ingo, can you apply this before the merge window opens? Yeah, done, applied it to tip:x86/asm. > I just noticed that you weren't cc'd, so I'll repeat my ack: > > Acked-by: Andy Lutomirski > > And I'll ask, since IIRC you wrote it: would it make sense to augment > lockdep_sys_exit to see if preemption got left disabled? Yeah, absolutely. I'm quite sure early lockdep versions did such a check. Thanks, Ingo