From patchwork Sat Sep 8 21:24:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Ojeda X-Patchwork-Id: 10593207 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 6FB4D109C for ; Sat, 8 Sep 2018 21:26:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6124D29F31 for ; Sat, 8 Sep 2018 21:26:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54CFB29F5C; Sat, 8 Sep 2018 21:26:11 +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 D2ED629F31 for ; Sat, 8 Sep 2018 21:26:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbeIICM2 (ORCPT ); Sat, 8 Sep 2018 22:12:28 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54193 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727639AbeIICM1 (ORCPT ); Sat, 8 Sep 2018 22:12:27 -0400 Received: by mail-wm0-f65.google.com with SMTP id b19-v6so17838872wme.3; Sat, 08 Sep 2018 14:25:18 -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=Uen7wqXT0mq9RVEAdjuqREsxTm7Jx/iFihAQFMJNSr0hRPAx38opm1T0w3nS/7/HbI Ebh7AIVW1lndVKYV68rIxR7YgjTnlcb++TVT8AXYM7TbjgPAnhPvMo9IpB4dST44wm2J BAt0JTiFvo01vEbzPVW4D6K8/pe6Ey+qVYpBSiLGMNxtZm+FrOCvI2aViBZT8WkmTeyO xB1PlTq131NRnJuDUTBzy+4WKh89Xq8wxXozS+2udpzD21ORlPZsK40Tq893tvIOrtxI SSAQh1N9VjwVOisEEBBFxH0WtBD1XtYimf42YRtuBNeRzGRxhe7hpEUfgeqyOJDM5xg7 SDZQ== 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=Mwk+YEtkusz03Xn3L1Asa4tbx757/5OfDkAdaOSNNSuxr33+tI//N/u/ZxyWb+osvk DBfe7dD3L9OYsxtwm08lPEH4HZ5qEYtpw7YGUqt7tUBjzsHA9ch+dp0PcnXrXMFESHdr lJ9Uu/mcyeruP9/BfnilB7FAoWmDcNLmigWJH+Ps6ow/g2dtOFnNtulEHpX2L007IDSb wq9aGAL4RaeIlWP1eZz/1JwVdm3e20J7ZikaxwEpUAHpQ7qr6QoPLqyP5ljBQEOC7D5b sw1oiTZSDY1VzBR66w1z5oMNqUVAcHaWKAtypXz1E2ACnf+k07ENsiXxGPO/C63zYwxJ o9fQ== X-Gm-Message-State: APzg51B4bmeWThF0hfq9AOYfjVNfgecWnhSTXzcYxtz8OeyqPhdBnayE v1HiQcwsbIa6+a2IsR9qwHU= X-Google-Smtp-Source: ANB0VdbHuUJHMw0TTomA/pmYGntt/+sLJUUXtgiINqMfe2ovNHBwfb76Q5ChCVCv3hvxzP3npXtyrw== X-Received: by 2002:a1c:a94d:: with SMTP id s74-v6mr9266511wme.39.1536441918160; Sat, 08 Sep 2018 14:25:18 -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 u40-v6sm17340786wrc.43.2018.09.08.14.25.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Sep 2018 14:25:17 -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 v4 05/13] Compiler Attributes: naked was fixed in gcc 4.6 Date: Sat, 8 Sep 2018 23:24:51 +0200 Message-Id: <20180908212459.19736-6-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180908212459.19736-1-miguel.ojeda.sandonis@gmail.com> References: <20180908212459.19736-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__)