From patchwork Fri Feb 10 20:17:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136352 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DCE2C05027 for ; Fri, 10 Feb 2023 20:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LgH9vVufcWqK96XnbefiU9Hy0IF2spIlt5n4NitBgww=; b=awaECf894NAtI8 Obtrvkd/vzqGHF8xf30jS1Hz7pPqz1850UOVXvR8w1xfr8byPtm5L4k3RRM4DMus+lxnHUEHyGR6+ TbzGVapArnV6ZQ5NKbdAuGfiZTSiz2NyE1bMz2NQD13cLBXVCKnLBARgH9tNVA0okUKtp7jsq70ER qvXD42tOQ3ppD9GTf5Q+RNYuALeL7Xk99/TUoc1VGB6onXFhCUT3GGbZl/xrWvrCgj4mZS1K0wquU tD19JIg7N2kMMAtdFTMuyJgpans9gXRr4mZCncUopn03VRcIGAy2jrUF+EL6toADFSxHQ1yoKK8Ey 1XjfjKHJg0lnfFCooKhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZw1-007NC2-7K; Fri, 10 Feb 2023 20:23:53 +0000 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZqh-007LFc-3k; Fri, 10 Feb 2023 20:18:27 +0000 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AHwebP007747; Fri, 10 Feb 2023 20:18:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=VL5ggjV7l8uquv3Cdfin43ZELlq/Zxr4naWQDZOYm1Y=; b=W/GIc7nrI7MFIc9JUnL9+Tvb4IO2bi/RXJTUE+34zqwcmvt1CWJbMm1f5q0A0g76OgEW ukFC0K7HSpOFCjxgGgI7wgFDieBoKfKI4wBwHR+AX44CTQ7mW0b0Tvfhxm1sMgkTR1bM NUD0jJPRlXlKQXFiyAZW1VHjV90GLa9TpNukli5jkyBK/7ZHIe70xxQlzY4DO+IliKUV ggJRSkIrPVbBIg7E31VVZETGdw/9CYY5NfYfL011n6xHHuM6nnqOwgk+QbEKhzBNdbqZ rMd3T0ccMnuLmXhQd+dTzLqnJJGhzSveFC+IxGjG32t3Bl8CLmZViHaTDOP9p82nS1Fa bA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhdsdx4jy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:18:15 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AJwtH1025741; Fri, 10 Feb 2023 20:18:14 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2044.outbound.protection.outlook.com [104.47.57.44]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdthtdft-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:18:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rs406FphfbBeoHtKIwaljwBA1gveOQlHqduv5uyJRNH5lTq+daFpGFIsMsxpNVpbSzBabeGrmYMIrmZ/zIoi/tQMyBCSGq5nX2mb14slOFAdRRT/OLRQ7gTxiGMkk01u7lh0OzlxMAxLJtN5HX8i7/jC+wOM+JQPUZW62lDrrJtTCUtIk9t67tK8aqWax9AalJ3DrsX5Sh5kJDY0TiqZQNAfK6FAs4sR08+wZuzLaYKaKUt32cAQK9xRZOkiep2iZ9wQfxZ7PIYOHlHYafCgFktp/FZOK9WVM5IyZRMguz6wnnsD3ADPp4ANuEaJkNLOZlzxTmvKhDz9fnxtosglTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VL5ggjV7l8uquv3Cdfin43ZELlq/Zxr4naWQDZOYm1Y=; b=keZW9umlV2pnhC7ghCjEPymRVFgoqf+4AshCM2jM+SnT/hH+uedcSBF8ugDU5fUfWw+YuhUsUBLFAm/4HiouXMZ0Zs94s/rgltE+Gk64Fn3cCuB1ED11fzJLSJkn7qf2xzWfqO4aLLA4h6pdzVCxgg3FJCMio6Hk9Sn2cR37KaWIcy/NXaw7Ii4JLw/ChgRJvCfKj051u1fAjP4LxY6JH8uTw9zo8neLHAhfSjnoEp7lAMq3hp2EIaAvV5YpueskQlv6bIxXqRKq5bLvwB7ISOkRA4JfB64cZ6/cu/6BJL4CRLAuoiSIug0W4bmqkcKYeiwcVj6CwVDX9C9CTaT/TQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VL5ggjV7l8uquv3Cdfin43ZELlq/Zxr4naWQDZOYm1Y=; b=QJoMNft35VilAROmw9MrlREJiwjwTLabuHTIuXHEi+KwVj9WPSgaSjlP9kCG0/vFrdjfHhrklBJyVqBFZmuTGoRWG8R7RpHKQqCz4Gq2Mx2sScUQI28N4btLnUgTqr06rmRaZgMIfjxz2O09EQ7xEvUrK+a+k2MHmO3YbEsqSgo= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by SA3PR10MB7093.namprd10.prod.outlook.com (2603:10b6:806:304::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.7; Fri, 10 Feb 2023 20:17:54 +0000 Received: from BY5PR10MB3794.namprd10.prod.outlook.com ([fe80::f37e:ad45:7d9e:d84d]) by BY5PR10MB3794.namprd10.prod.outlook.com ([fe80::f37e:ad45:7d9e:d84d%6]) with mapi id 15.20.6111.006; Fri, 10 Feb 2023 20:17:54 +0000 From: Tom Saeger To: Greg Kroah-Hartman Cc: Sasha Levin , Naresh Kamboju , John Paul Adrian Glaubitz , Rich Felker , Masahiro Yamada , Ard Biesheuvel , Nathan Chancellor , Dennis Gilmore , Palmer Dabbelt , Arnd Bergmann , Andrew Morton , Tom Saeger , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, Christoph Hellwig , Yoshinori Sato Subject: [PATCH 6.1 v2 7/7] sh: define RUNTIME_DISCARD_EXIT Date: Fri, 10 Feb 2023 13:17:22 -0700 Message-Id: <20230210-tsaeger-upstream-linux-6-1-y-v2-7-3689d04e29fc@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-6-1-y-v2-0-3689d04e29fc@oracle.com> References: <20230210-tsaeger-upstream-linux-6-1-y-v2-0-3689d04e29fc@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: BL1PR13CA0364.namprd13.prod.outlook.com (2603:10b6:208:2c0::9) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|SA3PR10MB7093:EE_ X-MS-Office365-Filtering-Correlation-Id: 81e5d8b2-aafe-41c8-6002-08db0ba3e40b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8AqdQ8XPfS7krPaG9CSNVLKOGHOFzjubzURgCtwMUieAHdT/h7/IBsV2aHfHkItHzSmXpmH+JA0d1bptcaBdOo4oXZCOITXXEu6gzQtxaQ6P/caXuG8exCTswpoVVVfBsPlXl7AJmRECVP0f1O2K6Nc6WJ8nM5jf1Lh1a3L2N8M8dKjHRuraf0/jDvVXGDyX8EmW1UsWEfKkLnOXzfBsfUXxipljWuXYaCKvE8Ea8gnAfllKIM31xg3L06p5GoH8DlgiHyxpN/livR+Zm0BL87Q9vf5s3wiiyjGrzashLVXHIGx93LZeFMarYvWXR/JlTc+QaG/ut+44N+837siMMvx0XwRveTRlcOjGSWTlVkueqQC9PGLNDST48GR7yTucfZsQ43DyEJ2n3g8d7gfIH40jMvUJ60DfvBKWnoQ8gUq4+dDa/hswT+pl7JsHq1/uE7Xj8+oOmVSL+QsscOgu6oLEhCfyAD0/0KOWrdZwhCLHD9YctiY3yi7ecstn2kLd0g/GfuMCJBmbPhzL98suetCBxNGvptaRJhTHYjWKIjomoJlW+CUx+veIkr3Z5a9KR+7E0gLN8IAa3jAyxP781CpFUkF9fwK8P34599rFH+0djSxwHjb9m9wljpag/jPDOiqnc5f1+OqWp2ziKygW6Q1W3qig+vxV896bkPqL5XWZnmT7UJlIuVpUP7aglF+ouh4z6E9mkgvkUhEn15cAfQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB3794.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(366004)(136003)(346002)(376002)(396003)(39860400002)(451199018)(44832011)(6506007)(5660300002)(7416002)(186003)(6512007)(8936002)(36756003)(86362001)(38100700002)(2616005)(2906002)(316002)(54906003)(6486002)(966005)(478600001)(66899018)(41300700001)(6666004)(66476007)(4326008)(66946007)(8676002)(6916009)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?pyhHlmxpmZZytYXIk4Xs0zemtWmL?= =?utf-8?q?DrsI6bG5OqVpvgIxilV8EZ6JFPDBtJh1KIcl7SIL3yzsqowK7y0lYP+uip0ze+8A1?= =?utf-8?q?sTVgr4bLJDGwIucXNFizc0pIYRc50g5weK6lbvyVc8jKllXi5ZXfwQW/Qn2TM5uIS?= =?utf-8?q?mSYkqb/90ihSLNV+2Mg0T71NmFA2H6/mdHLZK4QR4E3fh2+QRo61XoDXKz7c46Zk5?= =?utf-8?q?sOCnTVXwQY70HnHcKaQbsyYg68MGlB+VHHSOtvxgIOIEt7ybcuYRPF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=?utf-8?q?7zcyP1dVQwOC0kDXP11pb3QvIRXd79JfQu0Pa7uhIxk93cHx4pLXAPIFqLTze79gS?= =?utf-8?q?JLYLeXzGYP7dkpn5sOk4s4+pPTGb0h4QAWTO8Nerw5mdv39AdzpXNfxBwphPcjXVY?= =?utf-8?q?KHPbKPeHy2f0AZvPl1R1+C/cs89clnwAJU4L7LSTCKiJQjBcePG684dzeIa+Ri/U5?= =?utf-8?q?MejzVLP4mWN/qBv1jNp224xLcJsIyc5Gd/gpjlpWYItubqbR0LEc0Lcp6G1lgTxIO?= =?utf-8?q?H14cXl7DCrZVgYhcD913aaRyvvvy4UtHb9o8zG6Yh/7nkNnnk7w02ZsluWE2nVmfA?= =?utf-8?q?MSAWjkqW+sHoETNjWWjksxuJZapzRKUUmlBaFPF0qRE6/5HvHPuGWxAY61cBvj1dO?= =?utf-8?q?bbaRsvCUZnoX8njfcw5jVEMlLpB373Y+dvMvCZDRIk8UTZAcSu+ImWw=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?MVXS8mjb0FGq0pl6?= =?utf-8?q?Zdw9Y4D8YZCL5WYclQr+6tinLbr14LbWza2AFK+uQPx/11bNZIHiZOtRO1wWw8Pgu?= =?utf-8?q?30fjVi/wJUOWUk1F0k5s9Lik6/BPRlQJSsj2viDLqqkcHQkJrUvZ8+0skFABMv1Vb?= =?utf-8?q?7/8Lf4xEg56JORvqyIJsDdmx2gax0H8WZCvzggm8+cig+/0jGu1nuDsR786pvS4ly?= =?utf-8?q?Ud/RTE3kev0yILuAy7Qdaipc/RcHiiISRnjNGRzXOPnEarUUAuz/FsKvGZ1XaMuke?= =?utf-8?q?QA2yKvY3qv71864lrqWHIlOO24LeMVaPitpdoWhWvTu87YOnyIGtSzbwaWwyLnI39?= =?utf-8?q?U9aou8NQpQmnHPMOU55l42/xQ6ruO+/S6FqS3VSlB8+Nm6cHMKXJcjn2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CrossTenant-Network-Message-Id: 81e5d8b2-aafe-41c8-6002-08db0ba3e40b X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB3794.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2023 20:17:54.1269 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PvhofjoCTUxVVtFMXXMnIzzcz+Q+NIrFmHYU56+IClmAz27nfnJgTePkvzRZ9zuyeLw/uO86BoNne3fmloTkPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR10MB7093 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-10_15,2023-02-09_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-ORIG-GUID: sv4GhC7MkmmbobO4rVyUlYEkkaiEfDvn X-Proofpoint-GUID: sv4GhC7MkmmbobO4rVyUlYEkkaiEfDvn X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_121823_314114_FEC6B1E8 X-CRM114-Status: GOOD ( 16.54 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org commit c1c551bebf928889e7a8fef7415b44f9a64975f4 upstream. sh vmlinux fails to link with GNU ld < 2.40 (likely < 2.36) since commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv"). This is similar to fixes for powerpc and s390: commit 4b9880dbf3bd ("powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT"). commit a494398bde27 ("s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36"). $ sh4-linux-gnu-ld --version | head -n1 GNU ld (GNU Binutils for Debian) 2.35.2 $ make ARCH=sh CROSS_COMPILE=sh4-linux-gnu- microdev_defconfig $ make ARCH=sh CROSS_COMPILE=sh4-linux-gnu- `.exit.text' referenced in section `__bug_table' of crypto/algboss.o: defined in discarded section `.exit.text' of crypto/algboss.o `.exit.text' referenced in section `__bug_table' of drivers/char/hw_random/core.o: defined in discarded section `.exit.text' of drivers/char/hw_random/core.o make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1 make[1]: *** [Makefile:1252: vmlinux] Error 2 arch/sh/kernel/vmlinux.lds.S keeps EXIT_TEXT: /* * .exit.text is discarded at runtime, not link time, to deal with * references from __bug_table */ .exit.text : AT(ADDR(.exit.text)) { EXIT_TEXT } However, EXIT_TEXT is thrown away by DISCARD(include/asm-generic/vmlinux.lds.h) because sh does not define RUNTIME_DISCARD_EXIT. GNU ld 2.40 does not have this issue and builds fine. This corresponds with Masahiro's comments in a494398bde27: "Nathan [Chancellor] also found that binutils commit 21401fc7bf67 ("Duplicate output sections in scripts") cured this issue, so we cannot reproduce it with binutils 2.36+, but it is better to not rely on it." Link: https://lkml.kernel.org/r/9166a8abdc0f979e50377e61780a4bba1dfa2f52.1674518464.git.tom.saeger@oracle.com Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Link: https://lore.kernel.org/all/Y7Jal56f6UBh1abE@dev-arch.thelio-3990X/ Link: https://lore.kernel.org/all/20230123194218.47ssfzhrpnv3xfez@oracle.com/ Signed-off-by: Tom Saeger Tested-by: John Paul Adrian Glaubitz Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Christoph Hellwig Cc: Dennis Gilmore Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Naresh Kamboju Cc: Nathan Chancellor Cc: Palmer Dabbelt Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Tom Saeger --- arch/sh/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index 3161b9ccd2a5..b6276a3521d7 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S @@ -4,6 +4,7 @@ * Written by Niibe Yutaka and Paul Mundt */ OUTPUT_ARCH(sh) +#define RUNTIME_DISCARD_EXIT #include #include #include