Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8490308ybn; Tue, 1 Oct 2019 08:50:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqz07m1TjJwlAgALS8zLSXukqrCgSDlgOLV54xk/pY7T2WMvQPL2rL81d5YOaHIx64ytjGdo X-Received: by 2002:a17:906:e28f:: with SMTP id gg15mr24510632ejb.182.1569945016770; Tue, 01 Oct 2019 08:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569945016; cv=none; d=google.com; s=arc-20160816; b=nnaVbFgszUwFl9jWs7eCQHhraOiPa4larD5amxTbQ+Oj/NkbV4tR+Wp6p20wvApUWr nlAuw9W1WIcQUUdronL5S31Y0WTZnwCtu0iTLl04FGDgwdTC/J5hMNw3k0tqqWGlAz4f AP4UPJJT+UaWWwJPR5WIkfGYJ0nDx/n2/rMuWPK9tZbqxNTejLtNElAPSQ5akHF2VWLH I1xqADg6QmsIiHojHAP7IRasw6zL5uQrfhEem+XhT/kfrhF70KXFVcUQUT0r0/t5eZhw 3/UWqoMbdB7VtfKi/lKYHLtnjDQc/opJv0Hu9MuLEWntVZ4QTDrlJLWoroyvckJSeqPZ f1RQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mAjemN3zoy4NN/OBz00OSEPUQdbEoX+3LDmfYoCmeRg=; b=SSPvJ4BfKicaWVQreE7YrJ1L/82/YaMGOdVmZtDyOSJVZq0k7kGsINU32LuUUF7RS1 aTq53Q5dO3fsDsE1G3xpBAkltjQ5ECUNGFXO2ydWd2btL9+oeLjxLzMh7QeKDkR/1hGh mZUHkSM1rx4TEeFf77ZfRORW6x1CQ2cod95x4w71ZCWDPe4Tl0tyYbt/4VFPpL/5Hy/T L3P8GvJmj1Demm66s9xOlGLuJQlN3c6iAtD+re9yZ1RkpPhwPmc4J/MXURE9xF2pqoMt 7VZlxKSTi+VX300HtwnNVNAud/hHZenitCNUkzHxYTanMj7w11gxzFChlHLrHR1PaTBl VewA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="Gk/m5lFU"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d26si9098506edq.91.2019.10.01.08.49.50; Tue, 01 Oct 2019 08:50:16 -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 (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="Gk/m5lFU"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389720AbfJAPsY (ORCPT + 99 others); Tue, 1 Oct 2019 11:48:24 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:40256 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727313AbfJAPsY (ORCPT ); Tue, 1 Oct 2019 11:48:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=mAjemN3zoy4NN/OBz00OSEPUQdbEoX+3LDmfYoCmeRg=; b=Gk/m5lFU3nP7Hb76nAnEXfpG/ dxdlqhJPiM95K+QzKvDxeTGznCqoXLGQOgaRflUKryN7ErAQNMNa3j0Vax41fBSawXUHGkAXr+OQE hcQ8mgwp4+zl2JxMgNmsyAiEyHyzEjZyTT4KLL/sFmEr01psCAYCXX0QfTg5r33URgFedNK3QqvL4 xTTSLlw2Adqb7JYYIinG34bhO6BFMBiaUyxG4zAY6k8fVsJGMgytobhwpxvl5X5ZuXaAAfy1DK/jf DSiCtENdKYVFx9qm98QjpskmMu5LWhofGMWzGiVw/7y8BRpl6ftbIrWMggt7QnheeZpl+WmzNxhay O8MZt9plQ==; Received: from shell.armlinux.org.uk ([2002:4e20:1eda:1:5054:ff:fe00:4ec]:46324) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iFKNs-0003Iy-Ob; Tue, 01 Oct 2019 16:48:16 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iFKNq-0008KL-A1; Tue, 01 Oct 2019 16:48:14 +0100 Date: Tue, 1 Oct 2019 16:48:14 +0100 From: Russell King - ARM Linux admin To: Andrew Murray Cc: Will Deacon , Masahiro Yamada , Arnd Bergmann , Catalin Marinas , Linux Kernel Mailing List , linux-arm-kernel , Linus Torvalds , Nicolas Saenz Julienne Subject: Re: [PATCH] Partially revert "compiler: enable CONFIG_OPTIMIZE_INLINING forcibly" Message-ID: <20191001154814.GJ25745@shell.armlinux.org.uk> References: <20190930114540.27498-1-will@kernel.org> <20191001104253.fci7s3sn5ov3h56d@willie-the-truck> <20191001114129.GL42880@e119886-lin.cambridge.arm.com> <20191001143626.GI25745@shell.armlinux.org.uk> <20191001152826.GM42880@e119886-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191001152826.GM42880@e119886-lin.cambridge.arm.com> 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, Oct 01, 2019 at 04:28:27PM +0100, Andrew Murray wrote: > I hadn't noticed the use of __OPTIMIZE__ - indeed if __compiletime_assert > is no-op'd and you reach it then you won't have a build error - but you > may get uninitialised values instead. > > Presumably the purpose of __OPTIMIZE__ in this case is to prevent getting > an undefined function error for the __compiletime_assert line, even though > it doesn't get called (when using a compiler that doesn't optimize out the > call to the unused function). > > Why is the call to __get_user_bad not guarded in this way for when > __OPTIMIZE__ isn't set, i.e. why doesn't it suffer from the issue > that the following fixes? Officially, the kernel does not support building with -O0. To start with, the top level makefile has: ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE KBUILD_CFLAGS += -Os else KBUILD_CFLAGS += -O2 endif and we've said for years that the kernel relies upon the compiler optimiser to build correctly. You may be lucky if you pass it via some method to 'make' but that's going to rely on the argument order to the compiler, and the order in which the compiler processes its arguments, and whether it (for example) correctly disables all optimisations if it encounters -O0 somewhere. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up