Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5466581imm; Tue, 18 Sep 2018 09:57:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaOETPtJ5Y4O4YmmjY3Ffp4CrITxJscrWEu+GqSD3XIVzg4bsxCdS6e3XDlnFJttvWm/EPz X-Received: by 2002:a62:f610:: with SMTP id x16-v6mr31371693pfh.169.1537289866067; Tue, 18 Sep 2018 09:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537289866; cv=none; d=google.com; s=arc-20160816; b=fH2HLGDa7F5CUySJou/QjQCvmvOn2mpEfbKJOQbYDl/czT6ggLGWIBiQA8SaOJLIpi qGcLZkawgkbPhdvTx0jjTp96do7R0zj0vfDlGAy1Rjl3brvHYQN7a4YlKrj6Lf+wJ+rH FH+SRg4lA0qKT7SEBNkyoqY8c+ucTAAAglT7V584tgVOqupuUgLOgZ3CuXBKLHW6W9W0 kbTDflpPNkxkz8ZBqRLNjRgttCr7mTx5pQvqxLZLtzgPCNrZrDUO1KYF3TS0oCsu01Gz nbCx9hqMPThST6aBulIO2xzwVLgeyryI2D4ivHDp8ZPsKAFyEcoWWQlejC8QM4MKbJfq huqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=2DzhRwrr2MWLw9Cg0FhGTgbP6uZUQ8F4dsAU+Q41KI4=; b=N8J+WtTbUgt51EuJj1fHJBTaIPs+C2ccJg61R816t3nKbZR3IBmpK7t4d4wkJ1OKyR Fh8t0Ppd5NuLMknFbuFwdK7mTVS/8/cVPVoa2thvqpWXSu1cU0ZKZK6b1uUaZK3WEXZw 4zE2KACLLZA0UEg9Zv3rxL2xT/Qp5Zqf8mKyKWLncNEAHm/oYktg9suq/pKkxTUct+9+ c3WD563AB7Sgg1z7/UMXJkob6RTZpPPduhPghjOHB4s6XmyfYAEksb/oL0IZdw8rdu+N BctoftoMW5e6Wx3L/vM6U/OPLEL9Pj89CFpe6LeW4SGBPZoEcM2vjhFTc46m1XtbrQq1 1E/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I7bkRPwr; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23-v6si17771350pgr.493.2018.09.18.09.57.31; Tue, 18 Sep 2018 09:57:46 -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=@gmail.com header.s=20161025 header.b=I7bkRPwr; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730416AbeIRWaW (ORCPT + 99 others); Tue, 18 Sep 2018 18:30:22 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:50814 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730200AbeIRWaV (ORCPT ); Tue, 18 Sep 2018 18:30:21 -0400 Received: by mail-wm1-f68.google.com with SMTP id s12-v6so3308377wmc.0; Tue, 18 Sep 2018 09:56:53 -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=2DzhRwrr2MWLw9Cg0FhGTgbP6uZUQ8F4dsAU+Q41KI4=; b=I7bkRPwrMX0I9BKLmWfW34DbB6GVFNvJAUKiimRdcjDZd1vhYYVngYmbraAccRTAZs af1+kNk9AdolBJUKRkOq+JueS8gPjxHGUpg7eilak0Pr1ExEwoptOeKjpqYRNf5vBDzV aLq6ojsjUQn2IA71Lug7kqFHPsrdeTEKqWb7TNZRztSNAInqubJ7e5MtA10dRMtX0uPg aeKvA9U5TqqOCf9I/TsE+u9Ts5siIu6Lo4V0i+zLi9vMpSDhbhr8pm9rDvP3Dn+fppMh 7qFRR4zr5WPkmIsFfgI6z14ZJKOPLVpBeu/qRlb64iisYIhd7JyfWAT72Kjh5+S2lpkZ u1jw== 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=2DzhRwrr2MWLw9Cg0FhGTgbP6uZUQ8F4dsAU+Q41KI4=; b=McXbtjH6XhVzQV9mcLuG5mI+9ATwk5uPUOuLiomfo7RA1oTEx7JK0Z+MhrhiE63auq VyECQHu5O6sn5RhZdZbkDE8eBQ1MLI/coig0dtdD85UMrnheZlPZyfrCdiYalprsmv8R zgJEuZLWgrdKiF/sdRL9AjIFJYUEWN6m0lydVSgRsNA0Q3NOmnuIixL4QQi3pGaVe6+P 2U0QWNMx4LfkOMezLGqtu7ElptU/BqZhOD5BX7lYuwz+UB8lHHiwhKRJL5/oJK1wlsj7 C2N1Dos/RLcsr8SNUcNZ55+BFsLwyxEfgHR58udXke9pD4gNpXZLdPMBq310x67DNhCF CZrQ== X-Gm-Message-State: APzg51B0Tko0gfGEV7pjzsz1QgOglm3lM0TfYc+ddHXUEN0RY8b9gbr6 Xl6JePO/cm25XUhbZ1gbU0s= X-Received: by 2002:a1c:1745:: with SMTP id 66-v6mr16019615wmx.38.1537289812850; Tue, 18 Sep 2018 09:56:52 -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 g2-v6sm2934768wme.20.2018.09.18.09.56.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Sep 2018 09:56:52 -0700 (PDT) From: Miguel Ojeda To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Miguel Ojeda , Rasmus Villemoes , Eli Friedman , Christopher Li , Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Masahiro Yamada , Joe Perches , Dominique Martinet , Linus Torvalds , linux-sparse@vger.kernel.org Subject: [PATCH v2 1/2] Compiler Attributes: naked was fixed in gcc 4.6 Date: Tue, 18 Sep 2018 18:55:41 +0200 Message-Id: <20180918165542.4691-2-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180918165542.4691-1-miguel.ojeda.sandonis@gmail.com> References: <20180918165542.4691-1-miguel.ojeda.sandonis@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 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: Linus Torvalds Cc: linux-sparse@vger.kernel.org Tested-by: Stefan Agner Reviewed-by: Stefan Agner Reviewed-by: Luc Van Oostenryck Reviewed-by: Nick Desaulniers 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 763bbad1e258..25d3dd6b2702 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -84,14 +84,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__) -- 2.17.1