Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3853727yba; Tue, 23 Apr 2019 10:40:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBKu10WKQWNofndYdau1oS2zP0GnAN1n2cMMyOwn8YEp4yZei0NTLj8CqEXgRYiG2wx5E4 X-Received: by 2002:a17:902:f24:: with SMTP id 33mr21042635ply.44.1556041236335; Tue, 23 Apr 2019 10:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556041236; cv=none; d=google.com; s=arc-20160816; b=ulChqF0g1e/XYIV2xxo4qNf8RWkacH0nDqlLNUUbLxXkRRJ1FJPC/sTxDrAKn/mGQY n1D0oQPVsCr7p9W4+nAzG3AKfZhuz7dx0Ie9cLYDBFZF7XZbPRK6NvNQ2sMdrQsF2ZRd h6uXpJv6t3083B4yYvcXg1he2kNhvWtt7WVzf35olW1E/dFnUO0kMftA0WCg4w12egLe YX0sKoO4erqjqEklt1KPPh2eiD5+NpsQudvoxtOcuFlLhT3qFJj5nGAGKyLwaOJeiijq PTp2SnOx0Joq7AmP+phKaT6RMJUsgAzMEcJ5o9mfV1R5hxO6ln1t/rJxUt7OvIvGcRr/ nTaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2q5bHxyVaSUQ5sH4NkpY5LEKO5vrmJSao/hJT9S7ZPk=; b=m4abV8O9C7d7oyTCZBieInRvik8kHShr4HLl86xI+PGd3ePIJgjzhX93LRWnT7qJIw q+Oqi/wgqytMN2xcfzLjRPPoEeK6FF/Ou9wPJpkeAq2t4Iwt893uHnj6VZX8nRKbpm/A gwgGzeLHS2HG18KcMfY5SjR0PaE50yGRUTM8ob7qXmSinPZGfkKKgNMZDe5bFOLWnp95 W3Ekjse6htxQ7iSUFS8HJfLDDVAy3GJjtNS3DSKnLlIaSxEUEMQphbJzSFVDKrbAeiPf fgmF0XX5dKDSobUMOwtRZjNXDLByOGrtiNdVGt/7vcxpB8QJSGQH7tGTyPivFZuxGfy6 Z8iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=PqUPvHzH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si17187088plc.236.2019.04.23.10.40.21; Tue, 23 Apr 2019 10:40:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=PqUPvHzH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729532AbfDWRjX (ORCPT + 99 others); Tue, 23 Apr 2019 13:39:23 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52582 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728594AbfDWRjW (ORCPT ); Tue, 23 Apr 2019 13:39:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2q5bHxyVaSUQ5sH4NkpY5LEKO5vrmJSao/hJT9S7ZPk=; b=PqUPvHzHaTirYCRxEP+XrBzgPZ 9auAeGoNGTgXWGZx88vZeAN3Jiz/+1hHQvoXSFrdmXqhMMApe9PrCBlXvXOKQkfOSk+jGb8B63rQq Vj9mMG10eV3l1yeve4Z0XspSSk/QHzwhbArig58OJ36rzK6FVsuKwTjkV40jsS41Ge6DmJn6GW7fE 41f8LDaeNFYP9/HOu0nAMKmI5PhQtAf5qGo5/2fPFKDGkrUOLxXLuKM/nIAwoJAtyfURaG1WdnRzm /+QYE0P4R4DXwB0zAZRoCCJluLayqJsTt3fUR3TgCl7E2nCCk/jxFSDBTWoCHPxVP8eur5TL2n4MS Hdh/vxSw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIzNy-0007YS-7H; Tue, 23 Apr 2019 17:39:14 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EF79E29C2574D; Tue, 23 Apr 2019 19:39:12 +0200 (CEST) Date: Tue, 23 Apr 2019 19:39:12 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Randy Dunlap , akpm@linux-foundation.org, broonie@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-next@vger.kernel.org, mhocko@suse.cz, mm-commits@vger.kernel.org, sfr@canb.auug.org.au, Josh Poimboeuf , Linus Torvalds , Andy Lutomirski Subject: Re: mmotm 2019-04-19-14-53 uploaded (objtool) Message-ID: <20190423173912.GJ12232@hirez.programming.kicks-ass.net> References: <20190419215358.WMVFXV3bT%akpm@linux-foundation.org> <20190423082448.GY11158@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 23, 2019 at 09:07:01AM -0700, Andy Lutomirski wrote: > > diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h > > index 22ba683afdc2..c82abd6e4ca3 100644 > > --- a/arch/x86/include/asm/uaccess.h > > +++ b/arch/x86/include/asm/uaccess.h > > @@ -427,10 +427,11 @@ do { \ > > ({ \ > > __label__ __pu_label; \ > > int __pu_err = -EFAULT; \ > > - __typeof__(*(ptr)) __pu_val; \ > > - __pu_val = x; \ > > + __typeof__(*(ptr)) __pu_val = (x); \ > > + __typeof__(ptr) __pu_ptr = (ptr); \ > > Hmm. I wonder if this forces the address calculation to be done > before STAC, which means that gcc can’t use mov ..., %gs:(fancy > stuff). It probably depends on how clever the optimizer is. Have you > looked at the generated code? I have not; will do before posting the real patch.