From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752028AbcFWSy5 (ORCPT ); Thu, 23 Jun 2016 14:54:57 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49628 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750863AbcFWSyz (ORCPT ); Thu, 23 Jun 2016 14:54:55 -0400 Date: Thu, 23 Jun 2016 20:54:27 +0200 From: Peter Zijlstra To: Kees Cook Cc: Linus Torvalds , Oleg Nesterov , Andy Lutomirski , Andy Lutomirski , the arch/x86 maintainers , Linux Kernel Mailing List , "linux-arch@vger.kernel.org" , Borislav Petkov , Nadav Amit , Brian Gerst , "kernel-hardening@lists.openwall.com" , Josh Poimboeuf , Jann Horn , Heiko Carstens Subject: Re: [PATCH v3 00/13] Virtually mapped stacks with guard pages (x86, core) Message-ID: <20160623185427.GP30154@twins.programming.kicks-ass.net> References: <20160623143126.GA16664@redhat.com> <20160623170352.GA17372@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 23, 2016 at 11:00:08AM -0700, Kees Cook wrote: > > Why does __mutex_lock_common() have "task" as a stack variable? That's actually a fairly common thing to do. The reason is that 'current' is far more expensive to evaluate than a local variable.