Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp770987imm; Fri, 31 Aug 2018 12:50:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaQ48Wi5dbbAorUvYt+Kwc0gOKk+faZAw++hY4KxMTAhDb2xLx4VF0heMgS55sccu9BDVVT X-Received: by 2002:a62:25c5:: with SMTP id l188-v6mr17212150pfl.179.1535745011301; Fri, 31 Aug 2018 12:50:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535745011; cv=none; d=google.com; s=arc-20160816; b=Q4S65HlU3qngntuGTUC2E2iEyIvntyc0hnl5Kx06VZCBu3b3AD1LUj1dACY9Ga6+E1 q9AAzLIYFJFp5Ird7NxyqjHsKj1f37UP0qEDWuPCrtDSx5GYL0Oop9DwDSVYWA2PVOgy JV9fXP8eLQ2xUsVn1dOlj3GG+Leonsa6zfcIUo3fHPlVLL+J41uFn7vXsKCUekZ8XcSX zC6UjYCZh/3de/MIpVwdYubFe8pdYaQuGaYvB5UURuvGYzIGNISdJ3//FqCf8acvVlRR 2qAroEMx2SA9BzoquuAmB2WBPYrhDcvq+Q9EKUZm/cTC6UQQdIQL/GIIl48TDHb5zUpn m8NQ== 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:arc-authentication-results; bh=zSSdABq6e4tZ8A31SioQLLW5+GaszgFF1mM7h377GsU=; b=0j/+TQCTM/O9VSDy3r10RHLFtO9WGinxkntCcIkXaNo6xhk7msT9LvMWgcmf3ZUiXC JuLT/AAGdMfOZsHIi6lSCZ72nkCI8vZyIiB0FMvuFgW9lGW9+otvGno2VyBovLYj3/JD 89ACfAUQlp7TZuENaIIQI8NFgXiC1bmWLsGv76aP8IVEjAVlIag9A4ZSheaz/8Rd4Vxb lQ4dJNoWxir/Rf+dVUJ9Ph1o5kyZyNqD9Qa8t/clI93Fi7xDA5NUUTwy0MbTRyzzUC9F /hB+DLAxUSRbt+RqQ9WMt1rmkmnjq8BKOMpqUJOV8wq7jTdcvY1vVdpUTxeJ2yBVEUcT LSRw== ARC-Authentication-Results: i=1; mx.google.com; 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 r8-v6si10700600pgl.392.2018.08.31.12.49.56; Fri, 31 Aug 2018 12:50:11 -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; 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 S1727628AbeHaX52 (ORCPT + 99 others); Fri, 31 Aug 2018 19:57:28 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:40669 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727252AbeHaX52 (ORCPT ); Fri, 31 Aug 2018 19:57:28 -0400 Received: by mail-qk1-f194.google.com with SMTP id c126-v6so2163068qkd.7 for ; Fri, 31 Aug 2018 12:48:29 -0700 (PDT) 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=zSSdABq6e4tZ8A31SioQLLW5+GaszgFF1mM7h377GsU=; b=Yg8EPyLlQKmiQ/cBIxmCa9NyJCNyBOxS+u8pUFj9axiiSJtR2GWyajabeMz6LCHJrh t6IIkHMTgsnO/eOqyYfqVoNv8R28vpcR6nPyLPG8QEgo3MZlyIf411fwQVFVvRvDV2Xp ubP3EBdui0SxIC3MJ2Men+pgSJ6hrhBNz8VEcTLqSx7CZatOThwpeKgsx8R5wGl4ChqC DXc/ontIEf5rQGwFAfOyakP755hywU+EFBlG3E4fesNbDIbOF1X+SMytlgl2WFYo5gEG 8V+K0oNNG8rpnohw0gnmy+eeHpTjaCK53qW1UiSfkwYq1BUUI0PeW1ntLOA+nDmemL3P q9Pw== X-Gm-Message-State: APzg51A2Nb8czyv8u0sykLg1/YndOexRnU1oaqfBG9S7Xai5DFvPv/yb jUBDL8FulOv5lcys2TSkISDdEdGzruny0qVkv6k= X-Received: by 2002:a37:1b91:: with SMTP id m17-v6mr16910896qkh.173.1535744908418; Fri, 31 Aug 2018 12:48:28 -0700 (PDT) MIME-Version: 1.0 References: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> <20180831170514.24665-5-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180831170514.24665-5-miguel.ojeda.sandonis@gmail.com> From: Arnd Bergmann Date: Fri, 31 Aug 2018 21:48:12 +0200 Message-ID: Subject: Re: [PATCH 5/7] Compiler Attributes: naked was fixed in gcc 4.6 To: Miguel Ojeda Sandonis Cc: Linus Torvalds , Linux Kernel Mailing List , efriedma@codeaurora.org, Christopher Li , Kees Cook , Ingo Molnar , Geert Uytterhoeven , gregkh , Masahiro Yamada , Joe Perches , asmadeus@codewreck.org, Nick Desaulniers 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 Fri, Aug 31, 2018 at 7:05 PM Miguel Ojeda wrote: > > Commit 9c695203a7dd ("compiler-gcc.h: gcc-4.5 needs noclone > and noinline on __naked functions") added noinline and noclone > as a workaround for a gcc 4.5 bug, which was resolved in 4.6.0. > > Since now the minimum gcc supported version is 4.6, > we can clean it up. > > See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290 > and https://godbolt.org/z/h6NMIL > > diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h > index 66e1eb8822d9..fdf2fbe6d544 100644 > --- a/include/linux/compiler-gcc.h > +++ b/include/linux/compiler-gcc.h > @@ -77,14 +77,8 @@ > * to trace naked functions because then mcount is called without > * stack and frame pointer being set up and there is no chance to > * restore the lr register to the value before mcount was called. > - * > - * The asm() bodies of naked functions often depend on standard calling > - * conventions, therefore they must be noinline and noclone. > - * > - * GCC 4.[56] currently fail to enforce this, so we must do so ourselves. > - * See GCC PR44290. > */ > -#define __naked __attribute__((naked)) noinline __noclone notrace > +#define __naked __attribute__((naked)) notrace > Good catch. Can this be moved into linux/compiler.h now so we don't need separate definitions for clang and gcc? Arnd