From patchwork Mon Sep 3 20:33:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Ojeda X-Patchwork-Id: 10586377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1099112B for ; Mon, 3 Sep 2018 20:34:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B237229324 for ; Mon, 3 Sep 2018 20:34:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A68CE29328; Mon, 3 Sep 2018 20:34:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3218929324 for ; Mon, 3 Sep 2018 20:34:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728987AbeIDAzr (ORCPT ); Mon, 3 Sep 2018 20:55:47 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34823 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727850AbeIDAzq (ORCPT ); Mon, 3 Sep 2018 20:55:46 -0400 Received: by mail-wr1-f65.google.com with SMTP id j26-v6so1779883wre.2; Mon, 03 Sep 2018 13:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KSmd8Leci7Jq2YnVlQ1QxGK80ki+uToFeuQJJ1eS4UY=; b=icDclaID20kA2vZHgCRuEH4RbRbFT934AX/qUMq6Cy/ckNBZxCU2fbeKsc+HJlreL3 4Kv+dXU1P9xGZfiSzASm13oxUWOIQKLTcZfleLfJ05j/1uXFhGFf3VySD8QwWg8uUjQv z+q1eHAZTpv6ZKxs9Jgjowx6JkJOy0YYVNVhbujWzX33+eB8rUQQZ/VSO/Vhog0cANxl srWpZ4zPNNV8TSXLNxQCDBxjWzhLDzgmKKJfARKvzX5h+6Cp4dY0m0K8nFlgiBmnHPK/ 12RkoufbGeVMJz9BsiIMK3r5xXriYbjgEzro79aKtandHseG2bCnhErsuhShks+5W8Do Szmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KSmd8Leci7Jq2YnVlQ1QxGK80ki+uToFeuQJJ1eS4UY=; b=NJBDXMieSQ657XgD45duw+zsdYr+ApQVx0ESqcmabg7hKAbwwuDJxo27FKGO5ZZiYh 8z/eb2Hii+fTDzk5Q4rG9yISa4L6A2Niw705/U3LUHGZfTBabr8gLzIMoEuBpiPgJL1o z0zOtdxSSGDvbSiqRG5JGf1g5bcg/lRIc+es+13JAJNU6NcNRoB+e/PL5e+laNjEgMrC nHVX4iE6he/6497zw5hqlwScZT8zjuzzGu7eOw3cSOGBHAXutfCIOnrbDiLxcY80iqTc eZVCX8jDDYMUrc+HWSmSC1zT4NRUqx5gr72jUaC/gmKmGPKOrRemgxXR+1F+25e32gj4 yplg== X-Gm-Message-State: APzg51CaFZHDioqK38GUID8YAYgv285xmE9NjE3IcPPyqVVJ0GMmZvsX nRiZYcuHk1h3WyuNYV1Ydk8= X-Google-Smtp-Source: ANB0Vdbs8rVQYZxMUubvVWWHkOb1n3a26S04W6xwv7J7JNE1Eh/UTzi/YfQLSjHkJWciUdri1qlCew== X-Received: by 2002:a5d:550a:: with SMTP id b10-v6mr21413137wrv.228.1536006834015; Mon, 03 Sep 2018 13:33:54 -0700 (PDT) Received: from localhost.localdomain (62.83.35.8.dyn.user.ono.com. [62.83.35.8]) by smtp.gmail.com with ESMTPSA id 132-v6sm12354870wmd.13.2018.09.03.13.33.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 13:33:53 -0700 (PDT) From: Miguel Ojeda To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Miguel Ojeda , Rasmus Villemoes , Luc Van Oostenryck , Eli Friedman , Christopher Li , Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman , Masahiro Yamada , Joe Perches , Dominique Martinet , Nick Desaulniers , linux-sparse@vger.kernel.org Subject: [PATCH 05/12] Compiler Attributes: naked was fixed in gcc 4.6 Date: Mon, 3 Sep 2018 22:33:09 +0200 Message-Id: <20180903203316.16183-6-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180903203316.16183-1-miguel.ojeda.sandonis@gmail.com> References: <20180903203316.16183-1-miguel.ojeda.sandonis@gmail.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Rasmus Villemoes Cc: Luc Van Oostenryck Cc: Eli Friedman Cc: Christopher Li Cc: Kees Cook Cc: Ingo Molnar Cc: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Joe Perches Cc: Dominique Martinet Cc: Nick Desaulniers Cc: Linus Torvalds Cc: linux-sparse@vger.kernel.org Signed-off-by: Miguel Ojeda --- include/linux/compiler-gcc.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 76f4907ef707..4cd5e9264bce 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 #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)