Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753048AbbGAKYj (ORCPT ); Wed, 1 Jul 2015 06:24:39 -0400 Received: from mail.skyhub.de ([78.46.96.112]:40564 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753051AbbGAKYb (ORCPT ); Wed, 1 Jul 2015 06:24:31 -0400 Date: Wed, 1 Jul 2015 12:24:10 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, =?utf-8?B?RnLDqWTDqXJpYw==?= Weisbecker , Rik van Riel , Oleg Nesterov , Denys Vlasenko , Kees Cook , Brian Gerst , paulmck@linux.vnet.ibm.com Subject: Re: [PATCH v4 08/17] x86/entry: Add enter_from_user_mode and use it in syscalls Message-ID: <20150701102409.GD29656@pd.tnic> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1060 Lines: 29 On Mon, Jun 29, 2015 at 12:33:40PM -0700, Andy Lutomirski wrote: > Changing the x86 context tracking hooks is dangerous because there > are no good checks that we track our context correctly. Add a > helper to check that we're actually in CONTEXT_USER when we enter > from user mode and wire it up for syscall entries. > > Subsequent patches will wire this up for all non-NMI entries as > well. NMIs are their own special beast and cannot currently switch > overall context tracking state. Instead, they have their own > special RCU hooks. > > This is a tiny speedup if !CONFIG_CONTEXT_TRACKING (removes a > branch) and a tiny slowdown if CONFIG_CONTEXT_TRACING (adds a layer CONTEXT_TRACING?! Oh noooo, not another tracer :-P -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/