Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8643728ybn; Tue, 1 Oct 2019 11:02:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwzSSU9ihRf8TNLvLFM076aDcP/n7nVqHGvyoCzSWJoFGj+JsE3ItAWaB/cNspawz+Vbjt X-Received: by 2002:a17:906:c72d:: with SMTP id fj13mr26024913ejb.36.1569952975079; Tue, 01 Oct 2019 11:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569952975; cv=none; d=google.com; s=arc-20160816; b=fa33IhroAlqWhIvRAxSu+pBunSc68P4ahas2hG7RUDCOWR84sTNKTdewiliPySF2LY qg/9KO7+Sv7xQSyUH3+2uvuyT7plpFg+F5hxUZMKn/lWC5q36GEkPa709siXNxXTatwm u6keXjj+0scScxfWHSsciXT3qYQujcXZjlhjXO/Zm3JKWYpqCYErRhotQxar27Vxok2q tty1TsGxxCmC2x/ROiBjDcRhGwe642BmLgA1oS2NbnP563Pw5VYB2so71NHskaX+lKOw MS810s2pEsEBg5sY33CE+L0wJcVohrja80WT6idwH9HLFu/p5yYu7gmeocc7HFLMv5yF ymiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yrPCibXZ8aAVlYeWu3qzUI+I4f/2IsCgC/T/cZwtUTk=; b=v2tiH0QVHv1hLiMYBmbgx0FVM0aTnrVWmfWEAAEYSdUAGEfx18lJC550tB7Trel42E gtOCAqmM/YFIbtTGNVYRfzUCIAhljaRF0YDR+tms2Mqc2FACypPiNMJ3eXwoWfyIZ8Ew tsGIVYLCr0rAByi+/iQ/laFzMPjA0DWmtlBxPGC6xRcnzuB4GfcAGSy0igKSKUKZlzJV hU4YpAv9FltxAK70i/WiDHvdPt2gSBKYjpZoEoSkG74OAx+QpQKHpD2UWlSQB7XDPuRk Q5JlMzeK/BesFXNu7YXquhJvjcrt7mjOTGRsR4DByN2KL1aFsr6s+nlUFDB06iflaARW q9og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tP7kQ9mF; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si10183975edc.386.2019.10.01.11.02.29; Tue, 01 Oct 2019 11:02:55 -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=pass header.i=@google.com header.s=20161025 header.b=tP7kQ9mF; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730979AbfJASAY (ORCPT + 99 others); Tue, 1 Oct 2019 14:00:24 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:33167 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbfJASAY (ORCPT ); Tue, 1 Oct 2019 14:00:24 -0400 Received: by mail-pg1-f195.google.com with SMTP id q1so2172269pgb.0 for ; Tue, 01 Oct 2019 11:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yrPCibXZ8aAVlYeWu3qzUI+I4f/2IsCgC/T/cZwtUTk=; b=tP7kQ9mFk9GH83DD4Wn7w8bkC2bvSljjKeU02a8Ws9I/OYWSsc6I77CXb3DX8fKZ3Y uSiRydgZIuYa5+LNm0P/n1NC/j3RE9nl3yFtR3evY8dySp4mAv8FZHaVm03nLvysHSRw +S8bnOuLMJdRsQwaDpcvGUhY6rQo8oKkgT6pNIL8I3CrSef8L19AJraS9IWX/wr03g19 Z8h6MQLFqYMCz6v/A4QO6EDDSwfq8sq1ZkFQAoQVWhRd4/7MRaBv3BByYgeyEdxwVB0o S8+cVyjvrip1SyEKNjzCZgx3HNFJCcHvrc8CTFr5GQEAa3ljNPfZ94BpEmNhIPLuJViz VyEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yrPCibXZ8aAVlYeWu3qzUI+I4f/2IsCgC/T/cZwtUTk=; b=GJmCaSqE19uWe2zll5WDKWqG60+elqs+Lpybfrj0mpmzG82G8ZXMomrOy6UVrPWowP cnUIrNO8uVphaBf74n1hjLTn379u1C8QhqafOk00HALZRy1D6votI8IjmIpbNvZKjqBb VBvM+ZtbxT/nQeCQV2xXONZ+iDR/o6cuILsI2cqmyNPRPut3uD1bYxY6Mo3jboF17T+p 15z+QyHMRxft3TRImRFRXbmf2HX7jBXDK6radJKXqx48Fp1eBFjjSBNAzDlV7bKjTmTf BNA1txGVByTHE8rqvMjHffIGIl9Vkj7j1WrwkCORWUuTmaQMZ5/nYX8VFztiUqr5RPoa 7d8A== X-Gm-Message-State: APjAAAWzPh4+bGcTYtzydr0SyR+RFnrD7Q8jnnTKloUXbLozfb6Kh/M9 EpwuRaVOACqQ8woBQiM+0Z8dRnsk2KI/pnMGsRrrYw== X-Received: by 2002:a63:2f45:: with SMTP id v66mr7764492pgv.263.1569952822500; Tue, 01 Oct 2019 11:00:22 -0700 (PDT) MIME-Version: 1.0 References: <20190930112636.vx2qxo4hdysvxibl@willie-the-truck> <20190930121803.n34i63scet2ec7ll@willie-the-truck> <20191001092823.z4zhlbwvtwnlotwc@willie-the-truck> <20191001170142.x66orounxuln7zs3@willie-the-truck> <20191001175512.GK25745@shell.armlinux.org.uk> In-Reply-To: <20191001175512.GK25745@shell.armlinux.org.uk> From: Nick Desaulniers Date: Tue, 1 Oct 2019 11:00:11 -0700 Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Russell King - ARM Linux admin 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 1, 2019 at 10:55 AM Russell King - ARM Linux admin wrote: > > 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_. That's why I preferred V1 of Masahiro's patch, that fixed the inline asm not to make use of caller saved registers before calling a function that might not be inlined. -- Thanks, ~Nick Desaulniers