From patchwork Fri Feb 10 20:20:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136430 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 8D65CC636D4 for ; Fri, 10 Feb 2023 20:53:36 +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=ikQzuCwY8C3tXEOzHdNY90rMZQ2r35qmLUGn8gePzbk=; b=sY+uFVBNRE90id TLfRs9PIpjTXr2B7IKJPi7Mj6Caf8FLkK9kCbt41nCAQXxJY4erW61Ey92GXVFHz6ARotNVg2o4z0 cIv6w2OZEnvo9QDXjFRY8y/st/41JgWnFB+j/qFumcYCH97ajOZ5gek04vJdZohzTSF/iHjb4G7L9 XDGfjqGjmAJjqu3DNBdGGBVSv27JQ2uffaE8wIcHtElqpDKuY1JBk/xcz7e6jPgnq8Nz2Lf1hTMVg CjWSbFRC7ymV4pN27IcY4ZeSOvU5xYkEH7c5C2yc4tjkin9Jvst2s2CAOX0aUPBv+WuiJor9seQCB pxDLzWNn27XsKk86M0dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaOc-007V84-Md; Fri, 10 Feb 2023 20:53:27 +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 1pQZtL-007MG1-J6; Fri, 10 Feb 2023 20:21:09 +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 31AHwepV007741; Fri, 10 Feb 2023 20:21:00 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=PYDN8SoG5y7Xsuz/xXeD50LzGPZBWZEQK/CZBZ7kdWo=; b=SLmgHs+MjQxxeFhjNbImFvK1oazMRZifRdXVUNqvd3KVuiUnjQny3PU4JvIECQ1WwRO1 GVVkwkTKXiiTwkksq5DmYEG3IbSvOB5UbW0LgjVmLLqLS1Ps/6zqBBAOW+zweNWTwv0f zyiKxaepoXR70Jurlr9Wpife2fI8rT44PG6arKuX6YwjTgL4MHPeAbEJBzlxK2GAr0Oc 1ocIyap0+zYiTDwS/zBs40QiLxk1HJsvcixIqMxg3nOauTh9R8ZG8vMxJ/EF9uapWsDb PUEOhDgJ+BT9nfbdUPK/JQkXciQ/I8hEFNNMvwk9PW5OuLfK8MHLvMVbA546dVgoZ+zZ FA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhdsdx4q4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:59 +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 31AJKduP025749; Fri, 10 Feb 2023 20:20:59 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdthtg6w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NGqvfYxDSpjIqn5jKmggxqNgupRzJ3WjL0BqvIX9lHihXraMT0hz8I11r92WTqiZOXPbs3XPgH7m1OdRv9ZHPqr1kzV83kYLu73pooTtT+hs3IrjeZOLciuzILyQJibucETMMdoFIbO0oantcI9MbeiVEaBMUDv5br4Kq5LQOi7mDo0Q8uV5cany91sBeQ7Eb6Z4MxAF1Ilh8bim8qHFHcv20/mnfMfLP5uxQyo1M40Z6VL3JMd3PqrpdmJyjEoN/jivOx/4UxObWV9KrWV5gsVHnZDcsbzi67szxLNrt2idxOkMFIadoypCHsGlm3ZyzyMS86SqwXxYZVS/NtwKiQ== 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=PYDN8SoG5y7Xsuz/xXeD50LzGPZBWZEQK/CZBZ7kdWo=; b=QMIMH3fT9AQ1Bt4CmFA+cjrkArcfS1XnxF2A3vDkBo2VukHRJDvq2lDfJFju6k4foX+0yfwrMPllwM9qE6dfls5lDH4AX/aRtkN/jt7nDa+xmSGaYiZe6D58cdXHaJXwUX8/T0v/K+1FxdGAaCE6qjW+8Y3zkVeCjycbYfolhDoguK+uyYPrmei7KYO9U39pxT9z1YDHxpnoOD22qH47H8K9F5387Cbru9GPAbjLVUPmqqC1Xx2VmvVVgiknPElPe3HXHoIZJfl9emazGY55qauIEcT5gmiYRg7iMfbP6CTYy4GfTXFleRqD68GZeJVkPK0RD/oheoYda6thrfRtyg== 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=PYDN8SoG5y7Xsuz/xXeD50LzGPZBWZEQK/CZBZ7kdWo=; b=IsPDzBy9p95Ypk3RVzyPAD24NBBx71iuM6L2MO1Gm21GO8NsrlZxEafqdtnUH9SCkhWko5g9/qMaMimqX0zuhvz62sHh/eng1ODfamBfKKyHO2Dn0TWnKTVIcRtvSWBwA3oeqiQjqFXYwj56s7HMe0P8CnR4nvHDSN1JjHMSdEI= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by SJ0PR10MB5567.namprd10.prod.outlook.com (2603:10b6:a03:3dd::22) 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:20:56 +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:20:56 +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 5.4 v2 6/6] sh: define RUNTIME_DISCARD_EXIT Date: Fri, 10 Feb 2023 13:20:27 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-4-v2-6-a56d1e0f5e98@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-stable-5-4-v2-0-a56d1e0f5e98@oracle.com> References: <20230210-tsaeger-upstream-linux-stable-5-4-v2-0-a56d1e0f5e98@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: SJ0P220CA0030.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::6) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|SJ0PR10MB5567:EE_ X-MS-Office365-Filtering-Correlation-Id: 25add614-f2d1-4afc-fa36-08db0ba450bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bHvzdR0/H/bKojGJcg75eFcAC8gX8Glhp5pbdOMtLSyQ9jiSaP1/2uG24poQZ3Wd+N6tp9msZic/Rz7G2mZaSK8GadfRJlqv8CbdKPBqPfKTxOBpENPXqFrHKc0HuQofjVWIEgw/fzmPOsRHmd/jeMBff2tBgc+VjgsLgcm70LRFo1cP3jF56E6Ls27GPS8uSs0W79ZKzDWpkZ0yurKxDGVQQTcSvBzQ9MmqZCqZiRAOcm+034OZUrgneeTQcXvL7H14aueuzUF+wairjyydPm9Ka+rmZvyTm3RmtlvMTtsltlDvZPq2u9V/pcXtn7HqqlgBuZ1v/M0si1YE2JXWDviaClh09yBywGe9O10zmSH/MtJ703UrBnziwVHf1Fe2te6nXRqWdqxGiLHZAcoOAwmLUv9/sb1UG8S22osdwuT+sY/DqTQNit6tQNiQxArSV4kloxF1Z5fr011uSPHOijAuEW3AOkCO7xpDH0IdvxfEaXLSvRJhac8MCzoGRjUSwJWhF3vOiKH6h7IffxbQqSzwFsex1s7CxewbkCUdSSkl7AAyL/qV3v/YqU4AoDPeK4/L4It66a8AMtIPEEcwf9uRrxrQi03R/j48i6CihzsRXZBKF8W/F4gVDYZWDuz2xdgsGLKwBVweRFxQL9p112v4VzoD+FWCdEJg1VcxGSpmesCORhLQiwzN/9V9pbteBPh9+UCH90l0ypwRKWXB9A== 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)(396003)(376002)(346002)(39860400002)(366004)(136003)(451199018)(86362001)(36756003)(38100700002)(6666004)(41300700001)(66946007)(8676002)(6916009)(66556008)(66476007)(6506007)(4326008)(478600001)(54906003)(6486002)(316002)(966005)(66899018)(2616005)(2906002)(6512007)(186003)(7416002)(8936002)(44832011)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TQzQpm2nTufkuZvMWBseI1vNwMZf?= =?utf-8?q?ugH6mgAfPv93/Qga3RMmxUaHw6feTAsruzqq3x0+Sm9i4OzJWQusCtlo9gqdTuZSv?= =?utf-8?q?RbXtaz7Hd0WEugkfUHxgOI3jZFKcCWgumsrjJNHMomXWzWZFjVqYXHrgfIF1eTK6N?= =?utf-8?q?ik3UApeMCMKRrYv3G7tHoq0xaf7glSJGI+RiNVJXFGkXPdNZLuTvD5TrQsjsulwK2?= =?utf-8?q?FzAKlh3dB+OxQBp9Naro+mijnH8Y39H+MKHqeq67j06xhJ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drK9Iwvjuqx576wnJ2m4ZH?= =?utf-8?q?7tZtLSWfqGWGYhYbLRKA4FsMKzNIc1FlahJHu++K6KetmG6USYMNWsazwE5VsxHxg?= =?utf-8?q?19w/XrFWGSwv4nZvzMk7/cQQQRofqZcpE1HEjs947O20BWqj3tF0PLihwhlj5hANs?= =?utf-8?q?vCZ/m97LB4Jhx4fz9P4e60Fk2IBpsRLKEX35BtdwC90CVeKIHlGjXYd9UllYVj81x?= =?utf-8?q?WiSy+AInwYUg34vjBAQ/PnQMKrdxoJbAR+BdUoQSlm19Jz4DKbRLU2mjv7X83PAJV?= =?utf-8?q?w16LDXwqBcEKakX4cs+s9q61vxtWTCNdSizDKaf/KV4whjYdoaK5jNt+hayVEs18H?= =?utf-8?q?63e3zLZZSQDhTFXiMvQr/V+JTdmK5VJIGtr5sXo7IRLoHhjhPbZTTC/+7bYo+80Y9?= =?utf-8?q?IQvSpe/kqk2teLoL6osmrqIY+r8fJnUacvAXSti22wzQggv2tFsnZas=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?8fJAI6GGJWIdGilH?= =?utf-8?q?JUEGnNPznk5qV92rggvrJjUowASXxLWml/a0gnBpPSkF0/45mBaQ0tWROroTMfXqF?= =?utf-8?q?JAyL+uxa1VHM51WPC8anq4wmTe3hlYkCglYeWkBupO9iv6pfwLFN1q9ld4S1s2SaJ?= =?utf-8?q?L4VfQSvXZx6qa3pdLGiBx0b7jrTB64D1S7ACIi8NSGw7dxPVckGyapeS0GUFolAbv?= =?utf-8?q?swmU5nZwOvr74WlIfcX4PpuReriJr4flGjealGZ5utclAenJi+5nibuyyH47mJmQH?= =?utf-8?q?DV/q1xWhzrD6payfq/Uhw73rJ1bsaygwkF8hyBLB/xxSQzLwlt20nEc9mTyMxcjnm?= =?utf-8?q?pTUrDjW9c7skgP/iHP2rrFcpcJxT/DTaZJybgGH5tjgAu2Ii8xC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-MS-Exchange-CrossTenant-Network-Message-Id: 25add614-f2d1-4afc-fa36-08db0ba450bf 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:20:56.2857 (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: AMfq7I8N7SitNfGEvFRf0NsD/iMe7mV62UMgPSv8hMZpuKSYRkWcm2IMOYH5lzFN9L/ld+Ky1DyAtV2bsL/7zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5567 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: cfemz4eN_O_5kqvim0wAkUmoFuQQLVEd X-Proofpoint-GUID: cfemz4eN_O_5kqvim0wAkUmoFuQQLVEd X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122107_803189_EFEB0ACB X-CRM114-Status: GOOD ( 16.28 ) 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 77a59d8c6b4d..ec3bae172b20 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S @@ -10,6 +10,7 @@ OUTPUT_ARCH(sh:sh5) #define LOAD_OFFSET 0 OUTPUT_ARCH(sh) #endif +#define RUNTIME_DISCARD_EXIT #include #include