Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8637085ybn; Tue, 1 Oct 2019 10:57:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDTiIHwk57of5C7z1cu0GaXln4QxUC7Y7SewB0q9vlq+uuNHg79Vbmt43Xvy+VvS51NtEO X-Received: by 2002:a17:906:d8a2:: with SMTP id qc2mr7967601ejb.10.1569952652346; Tue, 01 Oct 2019 10:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569952652; cv=none; d=google.com; s=arc-20160816; b=wk/lwh97dMn8r50NcF9z+ECn+l/s7MPTGOj1KKHhSxJQEg3jPBPA/j5DqWEGwEDl2K mSv/rTZMmmhnShidz3vo//S8G0gBCg11+fb/O2ZrZDHo9OIQo+Dsv6zliFJJxv0K66tX N40Nrx8BJhNSGLbutDjEY5lgn3qs13k11REJu3XDKTt8cNo6DT0in34vZTXUJ4tzsObT CEDyHw7KevwfxUcWHms3ug+4U/beUrbaE5GcwHxRWf0PqbbKwmtqxxHrYEH4IMytkXXz 8PCIqXqtwE7vGKGLGag73vkxLvi/PbKLh+b0SNvQrHO1qT3wR+EmruUTzyqJ9xXwjbNI +nEw== 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=+oEkJHYhGgqZ+vlSK1n3UKdeFsRUniJisnPzVCGMnuE=; b=ZJoWZY26owVuN7wD50utNY5qiJA4tSSNuidEuPi248UaHUrqLMmfkrLDTz/Koy+exZ bQZ7lLK9D6qX6ookxmOdagf644hca9d/mUsEuq15Il6gqBQJbfZjCE+eF2SPaVFCI7hp N/s17gzJDa0M4ArYprVUK3yP/D0HBN3ouBwKn9vppq5Al1tIGUNWcEB0jG/2mo0EvlHl LdjhyvwULT/Xuwhl4L/xJnvERK10sApPHE39eLeCmpf5t7yF+lKmlKpAUKmnOByckhvY oo677vLs1rgpb/S8zD7RxCzoqvp9iDmWnYWhPIOCfEbXe24iCKXBj1inamPZDWT4WwUq 2pcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=l0XUyFpD; 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 a41si10059850edc.180.2019.10.01.10.57.07; Tue, 01 Oct 2019 10:57:32 -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=l0XUyFpD; 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 S1731168AbfJARzc (ORCPT + 99 others); Tue, 1 Oct 2019 13:55:32 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:41812 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbfJARzc (ORCPT ); Tue, 1 Oct 2019 13:55:32 -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=+oEkJHYhGgqZ+vlSK1n3UKdeFsRUniJisnPzVCGMnuE=; b=l0XUyFpD/ksEi5w8pMe1zLaYY TrMiuvRdm523dZWLf+5Ic+6p1gLOlVT9ObXPpvX9FLs6X3BAAYMbKMyJaQ86lCGZPuioeMonTVmXU 6jzSaxLycMOsoACiT0fkG+Vdbkfh+IlCgkKnHzTM3V1CxGU50xmtWucEtcGkHRxr5gHwEjyeVpnHn YksJ8fWPqolGnxLzfhAqDS8YgFljLsT44qYMLCNbUgVMnaApt8QEmZS3mDOuwwrK/LNl0jcWrv+BV zrSn6Bx5GmvOAKhUMqKX1dkEKRZJfXAdlyBmdgaZc8FZXqnNv/56KpYqfyFB3lEUGP9OwEDHrW7Ew RKvGIJYbA==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:38844) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iFMMm-0003rs-TF; Tue, 01 Oct 2019 18:55:17 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1iFMMi-0008OW-Gj; Tue, 01 Oct 2019 18:55:12 +0100 Date: Tue, 1 Oct 2019 18:55:12 +0100 From: Russell King - ARM Linux admin To: Nick Desaulniers Cc: Will Deacon , Masahiro Yamada , Linus Torvalds , Nicolas Saenz Julienne , Andrew Morton , Ingo Molnar , Borislav Petkov , Miguel Ojeda , linux-arch , LKML , Catalin Marinas , Stefan Wahren , Kees Cook Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly Message-ID: <20191001175512.GK25745@shell.armlinux.org.uk> References: <20190930112636.vx2qxo4hdysvxibl@willie-the-truck> <20190930121803.n34i63scet2ec7ll@willie-the-truck> <20191001092823.z4zhlbwvtwnlotwc@willie-the-truck> <20191001170142.x66orounxuln7zs3@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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, Oct 01, 2019 at 10:44:43AM -0700, Nick Desaulniers wrote: > I apologize; I don't mean to be difficult. I would just like to avoid > surprises when code written with the assumption that it will be > inlined is not. It sounds like we found one issue in arm32 and one in > arm64 related to outlining. If we fix those two cases, I think we're > close to proceeding with Masahiro's cleanup, which I view as a good > thing for the health of the Linux kernel codebase. Except, using the C preprocessor for this turns the arm32 code into yuck: 1. We'd need to turn get_domain() and set_domain() into multi-line preprocessor macro definitions, using the GCC ({ }) extension so that get_domain() can return a value. 2. uaccess_save_and_enable() and uaccess_restore() also need to become preprocessor macro definitions too. So, we end up with multiple levels of nested preprocessor macros. When something goes wrong, the compiler warning/error message is going to be utterly _horrid_. Now, as to whether an __attribute__((always_inline)) can or can not be inlined... `always_inline' Generally, functions are not inlined unless optimization is specified. For functions declared inline, this attribute inlines the function even if no optimization level is specified. Is this another instance of the compiler folk changing the rules of already documented semantics? This says nothing about "might not be inlined if someone passes some random combination of -f flags". -- 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