Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp328015ybn; Tue, 1 Oct 2019 21:56:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPJLxZL325/iiCH9c4SWcyV4BXhSbrjQJ5uE5NmujYIQp3dgmLfrs3MQaZfBHnTFAkoK17 X-Received: by 2002:a17:906:3083:: with SMTP id 3mr1349277ejv.259.1569992181478; Tue, 01 Oct 2019 21:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569992181; cv=none; d=google.com; s=arc-20160816; b=YFvCBbqcvC99h2fgz8V2r9I9NbndkMGndTb9GDT9Ii7ruHN4y9T2wDWVQydDxQVva2 UBJiPmCWa6D+wkq/NktiFmkoiwovrhySZiyqdCM8MtsrDoufdYGliqDfKurJaMbedWe/ 13+KBX3C7D4Qhh1Vs32PGtpzVkJ9fXjiCqn5JgeQids8Ij3Ek2+Eo23rK0KcuBcpeSWE R3XB7LjCPYuqkSJ57kVljdLjydenv0abjqGjJiwKVJuwc3lQE4YobxjGdMYRq1GEhT/H E9vh+Y8rJ0PbEO8uMSusYAe52tc5e/6hAVr96BauFfga1QQVGjzOmCZ25d+EpBiG1WPA /AAQ== 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=yR6QAZIxj8BdIeH4VEqiELW6WVoCInWCfl/pknlmVH8=; b=mDa5oc1nTJl5f9jisjxBiEFFBr7F9EkE0rDyG+q9SbbRMq5PGCl9IRw83emh7/DZTM W6BWKY5CM7Xz4532Ir16mJmq5QMTqjR6qHpc963a3j+UNsSu9UaVqE45e3++7ZaHGfjR WDyf23j5RGw3QO6x9WvdT5nEEB8CMBMdZAfdKYv8Ojnc0O8EMCIPl4ZA+eohAmHlScyk 7fL4DxUVsoiW6JtwVS3ywIONTudETrq3zzFhE1qUGBr5oG69s1jKL7J//U4tMFr7zszs 9P2xxcD/mAz47mqhvkGkm4527LctlTT8oEgkHiZdl/Of9z2TWtb6+T0sQi0UUsXyhNCY nTnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Cbrof+o7; 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 h42si11400439eda.90.2019.10.01.21.55.57; Tue, 01 Oct 2019 21:56:21 -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=Cbrof+o7; 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 S1727662AbfJAVPB (ORCPT + 99 others); Tue, 1 Oct 2019 17:15:01 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46422 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbfJAVPB (ORCPT ); Tue, 1 Oct 2019 17:15:01 -0400 Received: by mail-pg1-f195.google.com with SMTP id a3so10543133pgm.13 for ; Tue, 01 Oct 2019 14:14:59 -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=yR6QAZIxj8BdIeH4VEqiELW6WVoCInWCfl/pknlmVH8=; b=Cbrof+o7xQMSQzUqDCjJtyBcCMDho4aZq6hwUAtaTOjTav6YBWsvLsybyIF7pJrQE2 3RDkJEmIIt4UwCQB8fcHpthXCVDR2mCgh1wLFIvjqDLv1JfkOCUkoAuxme/5NAWbuIr8 QcJ0UXf6ULrsqNQnqIyQ0ynM1bZH66pqhvA3k5P55JBr1ixxjd56695Ebq1kzO8Y4HhV o+ulfcF9V8D3Qi/mfSHCa8fLgCuyMeCMQsx7ZTaNlyP8+pFdiBB9aAFSav9msBTEjF0V 0DKg+zS1LWsqMV2mQ1eFPz0Id4BrMCHvModm//fi6RnVbEdl6XWeb7bvzprVNAeF0Po4 QqFw== 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=yR6QAZIxj8BdIeH4VEqiELW6WVoCInWCfl/pknlmVH8=; b=BldQ6az3MwVDxCkRB6hQXwD4s7/2j285skQW6N2drQ5VOtTvkFs/VPTsN7URd0l90o 5O/ww1Xnru6FQkvLaPc0W0FXCemdUHVnLHqgCasy1xNQwxrI5ZXq6MEEcOySgprv+fNM iuShgX+Qzw505te72MkkA4FMJmhesgAR1brvEnfbbL1mpiR6HObh0JszjUH/4xVql0yI scNYBKroAjqMECcOt0t+7TqRzM/yLYOhZmVlTmehBhpRWTiEBBuwgQNZosdaVSHVfncm 2kuBmTnNv090/IoS9no1MoOFVopUi8Wmxd2+aUlA6GuEKTp/KCljl9DSR+KjyDG2udkT UpZg== X-Gm-Message-State: APjAAAVPHdtxdNqAw+se/82tXPLV/pWZdBThgoHyHAFFQNlahTRWHHke 0LmkEN437C6hYCaMmTgzLaHJ8qroJU3OhD/OJpILrw== X-Received: by 2002:a17:90a:154f:: with SMTP id y15mr212343pja.73.1569964498583; Tue, 01 Oct 2019 14:14:58 -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> <20191001181438.GL25745@shell.armlinux.org.uk> In-Reply-To: From: Nick Desaulniers Date: Tue, 1 Oct 2019 14:14:46 -0700 Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Miguel Ojeda Cc: Arnd Bergmann , Russell King - ARM Linux admin , Will Deacon , Masahiro Yamada , Linus Torvalds , Nicolas Saenz Julienne , Andrew Morton , Ingo Molnar , Borislav Petkov , linux-arch , LKML , Catalin Marinas , Stefan Wahren , Kees Cook , clang-built-linux 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 2:06 PM Miguel Ojeda wrote: > > On Tue, Oct 1, 2019 at 10:53 PM Arnd Bergmann wrote: > > > > 1. is clearly the most common case, but there is also > > > > 4. Some compiler version (possibly long gone, possibly still current) > > makes bad inlining decisions that result in horrible but functionally > > correct object code for a particular function, and forcing a function to > > be inlined results in what we had expected the compiler to do already. > > There is also 5. code that does not even compile without it, e.g. > _static_cpu_has() in x86_64 which requires > __attribute__((always_inline)), at least on GCC 9.2. I assert that's just another case of 2, and should be investigated. (I think I remember that from when I had to teach LLVM how to inline asm goto; since the compiler can reject inlining if it doesn't know how to do such a transform). > > For x64_64 it is the only one case I found, though. If you disable > __always_inline everything else compiles and links (in a defconfig). Cool, so one bug in arm32, one bug in arm64, one bug in x86_64. Doesn't sound like too much work to fix. -- Thanks, ~Nick Desaulniers