From patchwork Fri Feb 10 20:20: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: 13136414 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 D8A49C05027 for ; Fri, 10 Feb 2023 20:44:46 +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=gRdwWBAggAfDlnVVlBbid7mJtjIcETCmLJzmoLNLfq0=; b=EUtazhumps7ceX MTDKotSDtZQIJlaBo/Jstjzdu7gDKzRV0OT579/BnijJHLsEp4O/RDzs14S3TWy2Bu7YLwSQJ1mie G3exqhKCYOvOTOPaDHNG6T5t1I9Cv4L4zJXqkVkh+4Bp3UNeMqPLd6Bw85+d/qO5xvejpw8QphOUZ w5fHIfjdtIAwiroo+rPUZBjWCvcKBSxy0DHQ8sc8oGlKAyuTKGXXKDoA0sh8a7bEVAU5eoJIj8H7w 3GR12bA8GOZKhA1tEREcZLfF6lTCUvpnUMSWr1Ds6La36nFDA1qPZi/sASBWFXht2XeddG8bPAfx4 iF40JQfF/13eEGF9+1Aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaG5-007Sla-Sg; Fri, 10 Feb 2023 20:44:38 +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 1pQZt2-007M6n-PE; Fri, 10 Feb 2023 20:20:50 +0000 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AHwhii005533; Fri, 10 Feb 2023 20:20:40 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=r7KjTkFRoyk1VYqkeou6pOGL5sJNyxPRtaHo/h9tUs4=; b=td2IIriQsY4Yhbz5BRc/YhawONYFAifA/mc8pYlYglNvwK20uZ6k4JSVegu1seacsyBp oJH3V/SjWfxAt0DqkL+f2KtHHRPUg7DzDulE3zoWBrUtTlJT/P0hvKSs6HDHTEMfuAK/ qPQXns6EHhdfq3P+wpY4puW9pFrQGxEWEQhV4BTwr7iuyvooWUYSTwVl9L+GIFXW0zyj Mr3ZdwHZCq+fb+Pnb8pibSbXRvIIgIloHfyW7dg8cLDPm6Bik6lWQxdt/HslM1cqchdo vZ5DR28TUjZtca4F7EyHUpIgg5kWWtgmYhhS9ky6+2/1g7W1CzDkYnI0FXGqTiV1/h29 rw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhe53p6f1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:39 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AIvq7E036260; Fri, 10 Feb 2023 20:20:39 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2044.outbound.protection.outlook.com [104.47.74.44]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdth2d4c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CmaaECtac0rTQ3EqyeNDJYAoL1MC1wZPXcML4ONGBK80MVY840x0xijOtWwgsXvvd0/azIwVqCzYN/0tJB7G2R42Y795gCimfweL+nvebdd9FYfRgvgkml94fbR4QNElEKeyaO8yuNN50tnkPW2N5MtoxEsnRPCD0iOMlNQnMKi2qBYOiHWhv1St28d7MVtdPgj0dWIf8J1bRS0bJThBW/ex9cDSjuLD5EolLz4HLIY5gJLdEQPMQRqYFVm5/zLCIdtAFtPdlMrB6G+5UlDZM9ghi4NWEY5hOmNos/KjkWfWQ+xsSEVmjuRmYXHDjYf24aGzotxZI3YdKi6pzGpyrg== 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=r7KjTkFRoyk1VYqkeou6pOGL5sJNyxPRtaHo/h9tUs4=; b=iCuK3Z8jjPn7fYdGVvPARXTnJ54OkTvZseo7a1Re812FOXltJWYtCHp5aVhUts3meRg+ZLcA076aLxzahdD5EViVI78TdctgDpX/Z82nf7TsNR3BpQEdWZnLgVK5mtg5ZqtQkQ4KTFldY6t/n1PdREIbgURT4RVWExkgLvjBRrB8gRRDVdr+M2yJ9VrRZQ67QwUJ0dHNd90SoA1ZW9lj3KRlFxl+8tIAgLkS5GKvOVkmESJ1fZVH1doRHxCS+owMoGUZzY5mtg/lBZWPlyaOfBlk9f6sA7J6JJ2k084BDGsUpIecM/jpLxHwhV76058iqSmbt7xcaRn2zG8odX2xPQ== 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=r7KjTkFRoyk1VYqkeou6pOGL5sJNyxPRtaHo/h9tUs4=; b=ziOesL+sZc3dpUgkrQlS7GShnvTgrDcDPWK0nYbxmL0+UOXOkFj40EilnY46KKYwDgUOa8H1jU6/IzZDR5/2YP7g5RM5nUxNgnjxYfYqnqbgR+KOHkN5IDohl10UqgQcV+J5inQ86x0PGhuW1x3YDR88YPRPELhYNxCFjCLyzqk= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by CO6PR10MB5652.namprd10.prod.outlook.com (2603:10b6:303:135::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Fri, 10 Feb 2023 20:20:36 +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:36 +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, "H.J. Lu" , Borislav Petkov , Kees Cook Subject: [PATCH 5.4 v2 1/6] x86, vmlinux.lds: Add RUNTIME_DISCARD_EXIT to generic DISCARDS Date: Fri, 10 Feb 2023 13:20:22 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-4-v2-1-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: MN2PR10CA0026.namprd10.prod.outlook.com (2603:10b6:208:120::39) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|CO6PR10MB5652:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cbc6105-8df5-41a8-f748-08db0ba444fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Nm4e8+jCFEttqehWGgvpMzf9DLKgaqtst2yRQiIN++Tq978u4H2E19Y6xZjmQhsnnVCM61yqHTf7XOEuPdOiK+BvN0RbtTElLBTbo10Qv5rJRubOx6sj98irJ3xMg5CeveXgN+SwG5dbmwbRCSVAYbVQ4oPCZGh8i1hb6CpquqknPE/CwVNCOTu+/dLP25T6tkz/x/t1zOG71pegH1EntWVwFJG97eB72JqKETk5IjrwiHQqOt5mJZLczlI0Ja6fiRVqsBYCYU7XtvphtXehZMBlRCBDGj9eWJn2tgEBcwYEVxiK5AvORn0IrDcReP83TC6QUduFK24PYAUkGvaphWGyG+iRsV+wdPGP5Agr6dxdN52l7uE1y0m0ItaisUu2YEH5hbF91/gjQHHU2LavaxOclw5nr1tYW+AUo3hymIew3U7+8ySFW7C9qTckPphT7IbD0PVEo3ldBvOKtMYrHPkqEt+NNsXFXQ8vPJmjv7BNrV9lr2wOZqszgEyR8vyVZU5MOy60bMb5pGuYUMGLyFf3BbGOEk7N8s/JtUaujbTN05JO75geri9c/b+38jx0jwlmtTSGHDak/sDbgTKT7uEdJz3aGybSCBrPC0+zOysmo+3i3stZBRPDzxnDr3A1kkuYTZN/gIMe7wnH1AxrzcHFor8JLIgU2xLtYga4ClpeqZUnIT4cH6qWor6XeZB3oKJaJc4b1dyA2N1UJrL1kRWgkv3t6ng/v1iKYCnffSA= 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)(376002)(136003)(396003)(346002)(366004)(39860400002)(451199018)(2906002)(36756003)(966005)(6666004)(6486002)(478600001)(6512007)(86362001)(2616005)(4326008)(83380400001)(6506007)(6916009)(8676002)(66556008)(66946007)(66476007)(7416002)(44832011)(186003)(5660300002)(316002)(38100700002)(8936002)(41300700001)(54906003)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7JiSNYOJAyv88RvQWAgZ0Y5b8P3g?= =?utf-8?q?FD//C7g+/1/Tpcu3ZeXbJDafeg5BCZD/XlG6jvN4v8i5Vb8ZCIxctz/bHwM7R6IDC?= =?utf-8?q?Xn7RR1oZ4AB0pnlK7TX7Bekp4LtXBXl86PJmMLW3+PKS/n7qQA+AmHnJoZpws2VSv?= =?utf-8?q?BwvAtAIkmB9fHKpZGLnRL6G57W5Ar4pG1mWrLLoWIuloz5Ps8pSnmVPANfpPLnnza?= =?utf-8?q?r1uZd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?22ThoNLPxVkCoYPUB5YfHRBDMqf2iGwukIVlL064fq1OR6cqq+wpuZBkIz2deRDh5?= =?utf-8?q?J7Z63jSog6UPw0dJC8G35v+DqgNFDflN/AMZpD0q9w/fDxnQ6yJ7iwzUmyK3ca5ya?= =?utf-8?q?RKZAIRcaXsS4O3dh+ImSSKSTVPQqP4kolpw/PULTCDkr4LjazlinYNdG//0AKU59N?= =?utf-8?q?8XC/Fe/cfmyOsR++e2mZg2Qqhw0aLOqSZ8N7ggshyngF2nFIFYNT1ZwqmtTGHodoX?= =?utf-8?q?7xzUSWVQbSwWC/Ozrnuc6WlQHIAyS8OlQQn56Tn4IVsiFPC9qt1keZ69SIehNWMyu?= =?utf-8?q?jZXUMhphAUx24o9Fw+l1LY17kqD9LPaFe6+56pDClSY3AYWEMOpHLIPLv83C5RC/d?= =?utf-8?q?BOsC3mH4dfSJTFGSqCy1GyUtwleT/6ZD1ivzC70K2gYcbgrifqJoYevK83lSM+H47?= =?utf-8?q?/5jWIl1d1qx7ftSQaXA9qYGjRjndnsLTcF9/2j73Tq1WDbTbfmI5K0A=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?ehONV+5AJwr42jCs?= =?utf-8?q?SCyWYcmbnlR8CoPVk/wt+NdO05B9mmxb2djc1+pwxapln9LV13GP4l7Jrdn/dI4o4?= =?utf-8?q?ezw7Q/vBdkcLTO352a2KYkYzbXrPnOBGQhUcs82fCRZibxUn9q/ZXwwZtcRm9bXE5?= =?utf-8?q?UzyWBqA2VO/BK6Y+FcwYZ6LmBuwqDuqfC8Ys+eN9R4Wrap9ImErkpfpunWyO2newR?= =?utf-8?q?VF0j9JbhD452IVh545EKrLTvkft9QhxX8ejKKGbntI7VPh9pEAYXgFJWyYzAFBGj2?= =?utf-8?q?YZe2ixvmkZvOR7u4pnk4xrTq3XnmEHXzwYAV/dyjALi9xwtry8lc4S96SiV14Nbs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FgU//PmhxXJFwjhXNIvkBnM6P5CottGvXwPDNw=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cbc6105-8df5-41a8-f748-08db0ba444fc 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:36.5684 (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: 7F8JeDv8woMptHQunOU/qj23XY19YKk5CXiygNAD00rkUARpvapXqbAWjEIW4PCxZ9P0iJodL36lyjYKPotWFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5652 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 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 phishscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-ORIG-GUID: OmZkZ9rXb3vIbezrscjuRnPcng-x3xVA X-Proofpoint-GUID: OmZkZ9rXb3vIbezrscjuRnPcng-x3xVA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122048_985303_0021FF7A X-CRM114-Status: GOOD ( 19.24 ) 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 From: "H.J. Lu" commit 84d5f77fc2ee4e010c2c037750e32f06e55224b0 upstream. In the x86 kernel, .exit.text and .exit.data sections are discarded at runtime, not by the linker. Add RUNTIME_DISCARD_EXIT to generic DISCARDS and define it in the x86 kernel linker script to keep them. The sections are added before the DISCARD directive so document here only the situation explicitly as this change doesn't have any effect on the generated kernel. Also, other architectures like ARM64 will use it too so generalize the approach with the RUNTIME_DISCARD_EXIT define. [ bp: Massage and extend commit message. ] Signed-off-by: H.J. Lu Signed-off-by: Borislav Petkov Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200326193021.255002-1-hjl.tools@gmail.com Signed-off-by: Tom Saeger --- arch/x86/kernel/vmlinux.lds.S | 1 + include/asm-generic/vmlinux.lds.h | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 1afe211d7a7c..0ae3cd9a25ea 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -21,6 +21,7 @@ #define LOAD_OFFSET __START_KERNEL_map #endif +#define RUNTIME_DISCARD_EXIT #include #include #include diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index c3bcac22c389..2d45d98773e2 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -900,10 +900,17 @@ * section definitions so that such archs put those in earlier section * definitions. */ +#ifdef RUNTIME_DISCARD_EXIT +#define EXIT_DISCARDS +#else +#define EXIT_DISCARDS \ + EXIT_TEXT \ + EXIT_DATA +#endif + #define DISCARDS \ /DISCARD/ : { \ - EXIT_TEXT \ - EXIT_DATA \ + EXIT_DISCARDS \ EXIT_CALL \ *(.discard) \ *(.discard.*) \ From patchwork Fri Feb 10 20:20:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136416 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 63E07C6379F for ; Fri, 10 Feb 2023 20:49:10 +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=oxDFE+ITAhy7leuWfslkGbjDZkgW/3xCjVbxWpmUd90=; b=YzPP5sIw0NmGwI Swymh67gHhQyfOHpzbdixdr2o0EKVng7n96sHdGF+0nOz2e0rq5+SXIIiacxpIK+mLWu3hp2zWtga wvPaIxSG0+U6FPM5FZfKUw47g1pMV8RxtacBWySwpihNN/72JHWvNmvh22ofS2phyIRfVo8a0s7tq N3WFR9bGpifUW/+UWotH6/+oJQLNfy/QycUnjnLACvvPHIvlwBAyfkUjtSDvU+IdISFlCD4roXXIN 4EsWPBytgDKb9UoenLv9eNvTs00rRp3AgN39ud4RV2EVggC351cGYzgQzmMtHqCkKKAonHNOY83j2 EZq34usoHBNiL1vrE7QQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaKL-007TwV-2P; Fri, 10 Feb 2023 20:49:01 +0000 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZtA-007M9x-58; Fri, 10 Feb 2023 20:20:57 +0000 Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AI0WOe017288; Fri, 10 Feb 2023 20:20:46 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=VrxY6FEeDrhSrD6bnLrKzJPNvn5vXR3scp2L28Wycvk=; b=qNI9wbxLSv7kWMSkpBdey5vfeY1V9skUwsk1UjqgkB+YZa04BuLZmcr1kWe2Dg2J/fNT bg61T4bN46ryJISn0MV2CLyVcg0sTjuPxzboK586EH48WHdFSIBqsfOEaR4U/fROfrmh 0AdtBHsAouYtQde4kv36eUX10tX7wt2n+F0JVGPsIJ91nZPzIM3J1VqbnQMMc9H1bEfp 9WXFmM8BakFh0e0rXKoQ2VkmxiZMjQ58oSPTy4ynyprJGycyzl8NxNWCQX3fECUMZ1HK 4Ek5S9epfg2BzKmvFolkbZC0zTJlLk5MLC30K4vNvoINr0ujMZSZ4/hUKP7jdxl786BD lg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhe9np5vf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:46 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AJZVFZ036245; Fri, 10 Feb 2023 20:20:44 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdth2d6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DoKy2Nthrr4tYEcrHbhtUAr5RMI2Y0UwoXsv/zSLakgqXSZRhrY/GzurSNlrd707KYMtaOi5gLtXoooHG/52zV/LRZlFd1cVsf7k1BipL0YArlLRiO/oKoW/Dh5ratCMYhJiUj9OGMJxkcKv0fsb8oUJZ48HldMpyz/py5mgzdNSvRvsMKHABhx4BmUJUDDq8H8Xdm5b/XS/LnQ+uO0vLhsrtrd3gPAwKqKmFA89uk2MrEFLNGC9+sAjEcIU0iBf18PoMcB8gKJspDWfSCRhFvq9YaK5tnXMkXz54CB9N4Sm0TLhW/zlBI9HCRICdazUbFX2AeyXEcLysnae4E5Ktg== 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=VrxY6FEeDrhSrD6bnLrKzJPNvn5vXR3scp2L28Wycvk=; b=IhXNMpsFqSCJMNECsphUzQgxSAlgRbfv+AXiMA8QkXmf1nXquywnV2FMoQUvlA7gKwCJ3o9y+r6KQyQjD4gEMnRPvI2UF/EDa0QRFEvl4nA4+vIkaJeKW8c8Ejao0AnkPHUBN5esL8esBpFSfPqufqKvn6SnjRq6veBTvEPVS4gcj3Fw/k4CJT0m1ZKh8Vp+JWwrfRiGvfaYCRaG3hYF6ad1mh1RqLbyl67WZhYUXnOB603d0HMV9CKmsgdzbmUKEQ/LZXVBSvOyBnXOpBuqm+Ky0RUkt15JJKAtlJLei122/TZlRQYrWe53rNRUpUHktjz6r/SiA/nA91AmgEIarQ== 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=VrxY6FEeDrhSrD6bnLrKzJPNvn5vXR3scp2L28Wycvk=; b=bvJZY4PcOHkyG3uCh8NZdwMBvjgJvo/xZ+R7pL0PFgriGrouJ0SE/w5TowqvEiCKLtCuVwFLJtZre46QUf/sqGECblBRwSZL6XIQLZSuAaFkQG3moWs1/glW1fm9yhwpX2NeCZKyKpW8yemvV6nz3R+VtKemvHhsHrTGMtz+/7s= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by CO6PR10MB5652.namprd10.prod.outlook.com (2603:10b6:303:135::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Fri, 10 Feb 2023 20:20:40 +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:40 +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 Subject: [PATCH 5.4 v2 2/6] arch: fix broken BuildID for arm64 and riscv Date: Fri, 10 Feb 2023 13:20:23 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-4-v2-2-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: BLAPR03CA0114.namprd03.prod.outlook.com (2603:10b6:208:32a::29) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|CO6PR10MB5652:EE_ X-MS-Office365-Filtering-Correlation-Id: 52d07fb7-ddc2-4805-0cb6-08db0ba44745 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ruZKfL6Vg08tBeLdIIsuTdYy+XmEAtrzFfy+gcmCgzIVfwSf87v6604Ix0OUBGCqI+AxkuWEUfoMQpb9myfNIcS++YYssMURP99AXKZf/t1sLsdGdqeULrMYpeoZ6IxL84GrqPrnePqwic+G4Wmo9ahRkdNzdxVEUOKdTcVyz56BozlapQmkZ4i75UejpFFthzqd6HXx9kHrR5e3DlfKzVd2TIbOl3CboBZl4o/MYrhzNxr/ds7l+cs2MbLFv5Vos7oHD/SyNBfsgxhg9OTYURdeJBA862pJHEuPdFXyiZ5WRn3nnp0qOKlW2DAw29dbhLqOcmpIB7zPujBMVz08+B1DfyiMnzCnMmieyuoBbEiPzGJ1CDGSPBqjLqc1ZAEumwwws0NYuNFiBUlv0CiqCP466mKA3qQdYPPdmC60Nf0X+gZQGiYrLsP5k0pYjZDMkiFDWlrIaOWsNLwN6hxAnrUYQm5woU99CXSojnF03KzvJUbYcLKu6XYYTk9SEHh5lgG7ACpzmK1JMzkAZBvwDGtmBRHDLKYVffSTgRhV9HV05u8KLmUtz4VmafGFsuCIuSraWwynx5wpMqIysbD8fBtQLt6Z6xiVumLWHRkeYwIc9fIOSXto2C8QL7YgL9VqR2FW+c1PnwEJ7jGWELqN3PJQ57qpAx2UGemTAQezETw= 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)(376002)(136003)(396003)(346002)(366004)(39860400002)(451199018)(2906002)(36756003)(966005)(6666004)(6486002)(478600001)(6512007)(86362001)(2616005)(4326008)(83380400001)(6506007)(6916009)(8676002)(66556008)(66946007)(66476007)(7416002)(44832011)(186003)(5660300002)(316002)(38100700002)(8936002)(41300700001)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?drSvgeZd7RVpKmysycHOPRfpROr4?= =?utf-8?q?dFnDNbgtlP+ypKmf9mYcQsuZ7V9DuL/j4hnpEK/1i1NW4tazoX/HZeQDAetTaxKPn?= =?utf-8?q?bbrW3y7kJCrCPlrSf2r/IMuDMCo5NJzztntjQx94F5lLzYkUb7GBHASlRZIVdkj68?= =?utf-8?q?Fm++q6Bm4p/HC+3FDUTIHOGAjidlDzj1OD98TDXUCrO3L5NVWdB5f62qUfJyejk2p?= =?utf-8?q?PD8Dyg2wNiDNbGN5GG2UzAJvjqnE7ok3BkQedYEYxYjc1c4VNftaNXi9PxAbkpkke?= =?utf-8?q?P1isyXRbKMnGX5XkYid6xn6ojxbTyXVhAFZPgZOvSHbB7qYbJ01nHZEkR4tr6kaew?= =?utf-8?q?XTOz7Iv680C6ERmxqEwuqGKxxDW54LMj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ZUcW4jHRrQtwR6hd/JljsQeEgXwhHliWqdic?= =?utf-8?q?BQCjx0xzjX/KPSCRDG6XIbaHTJRj7p4K+SdcQNXPbv9cJgJqupavXiHkgzW6Ez9Qd?= =?utf-8?q?j3zkWS1xUQV0rLNO7u/uX8a/hvbf3dlJAiQZl2no8luQFgPhbx72pVgdwwC/L5vNr?= =?utf-8?q?1kLk+B10jnNc9kx/yFnJrc6iA/E+D0OwmjYTenKUrzaotEAmSqmWjyPZ5AmmAu7UG?= =?utf-8?q?uZE6sZHNUOogsDHzaZkY6n4dFMyUySOIQswrGqpehVZOtVzzkKLKE14lFLZOzMkat?= =?utf-8?q?K/7ILWmBc6bX7xedRgweGUDbRLUH+4lJkO9PEPzaY72FdopwNGEYbZI=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?ox0iaROlrMu8RS3o?= =?utf-8?q?3yhRRqr3A1bNHO6PHxCrZu+Biww4oO7Aq/uJeAx11FVtK36Xe2ooZkvVFg7ORsK48?= =?utf-8?q?ZaXes2fQ5qJpXHSoaIwNYxAh1HdV+plUj/oVkroSDc+oL/zxsGPPX4nVSUv6hI62c?= =?utf-8?q?zXrmKy+v+7GvjOEKLwoBDTCkG0umkmLC00/x1/QLHXoKYXqPr6bK/aFvAcsGjd0eD?= =?utf-8?q?PI8DngImhKUVzhxR/ppx9ZqwBaAep4ESP4c0IP+7cUOHNb8ckvQknoWOwhY+dWSDa?= =?utf-8?q?sZDl39Lv+RvgP98y1+PwEKSxgRDHIpPFafwao2Fqcw3VjjolNrWXi+Km1QWzssd+y?= =?utf-8?q?Hy1117KjWE1WXAocgW/ev2AeX5fUJ5rvMSx02JL5KwFyGz1KNPQvSKPEiuUJjkvfu?= =?utf-8?q?4KS0lvrVoHOm69vOGzg4VUOOOnmexzLSHMZcQ1at7kjCND8zWComSJX4jy+sy1aJ8?= =?utf-8?q?/K4TAeA2Bq7UMpnSI8aMRZaqQdYcWOJD6XP5fIuAgEErcvZG/8xRZRKUIXvx689tT?= =?utf-8?q?NJQRT/WEAFoDze7bvYEGAdGzzb2SVrjjV+rTeg7pq1QmiIzlH3Fs0F0nnV9YhWFmB?= =?utf-8?q?XzQF9YJdbru/fe1w8RBekR5OzQnwnvdRtSe1HJGViR93Nr4bOjB17muZCwP3X3iMK?= =?utf-8?q?M8rqwNjc4qnamC0hSClh8yoob0Mt9Og9sutBpnSfqOePQSLIC9hwzCgKn2v++Yndr?= =?utf-8?q?Oo/AJzUNeDLVeJ8g7mVJ80ymPj2/WfKOO/Ejkp7PCKtQlDIwJ3aixfW0m13guXkPD?= =?utf-8?q?yQJ7jdoVzWUDQMu02Qfl0epWlm5zuP3UzwQ+5zwo7m33vTT9exsM3V4zMBlQhqfud?= =?utf-8?q?1a8LgEGAz7Hsy/WU5d/1wN0ZyzFMFzOUNl6qcZEYjiKJMKvr28oGYQy5UMpJckgpB?= =?utf-8?q?cuSCxSsSqZ+5n/KBJ6yiynrtbDO3dS5fNH+6Lr2+Q+YlM8nUx2nkCX3X78PAJNGJl?= =?utf-8?q?d7qyKyoXFxcSC5arB+WoZK/7zaOYzWjRJLZDO3Alx5LGQiFz2Olm9+OK//FPF+n0r?= =?utf-8?q?Fha9P4bdpnGiKRxpjNfMcCYWk35Qs6PKyGWPvOZHSUrkpPRdazuBiJcdH7uKYX2g2?= =?utf-8?q?xdtXrvDhj6FVacllM51UnSooa/l8cNJc3gMBz5egNQuLpscw8V2CV+Fu8QM3eJN/Y?= =?utf-8?q?AfKOgQXv9w91bNnjtBGgiVLbbarJWi?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52d07fb7-ddc2-4805-0cb6-08db0ba44745 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:40.3337 (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: UAjtaVZI8Za08TwmF6Ht0kSGyZQWL714modtBainm9TwXKIDyxxUugDIT5cPfKNpixW3jcr5b57K1SX0cRISMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5652 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 suspectscore=0 adultscore=0 malwarescore=0 mlxscore=0 phishscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-ORIG-GUID: EyXU24meCM88HAVzdZNV_09UdtD1bkia X-Proofpoint-GUID: EyXU24meCM88HAVzdZNV_09UdtD1bkia X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122056_307789_8F5DF23C X-CRM114-Status: GOOD ( 20.00 ) 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 From: Masahiro Yamada commit 99cb0d917ffa1ab628bb67364ca9b162c07699b1 upstream. Dennis Gilmore reports that the BuildID is missing in the arm64 vmlinux since commit 994b7ac1697b ("arm64: remove special treatment for the link order of head.o"). The issue is that the type of .notes section, which contains the BuildID, changed from NOTES to PROGBITS. Ard Biesheuvel figured out that whichever object gets linked first gets to decide the type of a section. The PROGBITS type is the result of the compiler emitting .note.GNU-stack as PROGBITS rather than NOTE. While Ard provided a fix for arm64, I want to fix this globally because the same issue is happening on riscv since commit 2348e6bf4421 ("riscv: remove special treatment for the link order of head.o"). This problem will happen in general for other architectures if they start to drop unneeded entries from scripts/head-object-list.txt. Discard .note.GNU-stack in include/asm-generic/vmlinux.lds.h. Link: https://lore.kernel.org/lkml/CAABkxwuQoz1CTbyb57n0ZX65eSYiTonFCU8-LCQc=74D=xE=rA@mail.gmail.com/ Fixes: 994b7ac1697b ("arm64: remove special treatment for the link order of head.o") Fixes: 2348e6bf4421 ("riscv: remove special treatment for the link order of head.o") Reported-by: Dennis Gilmore Suggested-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada Acked-by: Palmer Dabbelt Signed-off-by: Tom Saeger --- include/asm-generic/vmlinux.lds.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 2d45d98773e2..a68535f36d13 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -825,7 +825,12 @@ #define TRACEDATA #endif +/* + * Discard .note.GNU-stack, which is emitted as PROGBITS by the compiler. + * Otherwise, the type of .notes section would become PROGBITS instead of NOTES. + */ #define NOTES \ + /DISCARD/ : { *(.note.GNU-stack) } \ .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ __start_notes = .; \ KEEP(*(.note.*)) \ From patchwork Fri Feb 10 20:20:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136427 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 B9873C05027 for ; Fri, 10 Feb 2023 20:49:22 +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=soUvmWs5nb7mg//L80QedR9o9ZdiDag+U8KVXxpuqkY=; b=wwaL3iXQf2RSg2 RsHrqs5lf9OdARqt2+KgnHXzfabIjQLsAT2vlFyu4FtTqQN1aFbedyKdfn48RxAly54veFGuhdMzw xn4u7YgoizMr24jvUUsjeWr5aaYAebquv/U8CFH7JoyT+GLFnWxhcIhHs62GoMBnTgVYN74YNkPeq 9l8bim01Bi0r6YgS4AMYZJtxBOX2jrwzhIXRNcx/7hUR60qjd0TZRIJuXsaWJYR5iF41oKv8S+jT/ 7HHHjqKD/XvD8DuoZ1VHfA/jiRQmdjwYdvORTLcuq+ufX7+N04Tp/CAyc7veegp1K+AInfkHxSAja Hjw9SVJMeCZsT+UeuWzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaKX-007TzE-DZ; Fri, 10 Feb 2023 20:49:13 +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 1pQZtC-007MB4-D3; Fri, 10 Feb 2023 20:21:00 +0000 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AHwfgX019274; Fri, 10 Feb 2023 20:20:48 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=QqBCW0Bt5JbyYA2UStm7LO7bdepNZRe0BKllSHzxss0=; b=fwPffx00yD10rogBpQVgo+UGvP1AmlgCb0FJfZ2Y8MH6wPJIoSe+eotDhTDwHJzFPAyl pbl0E7qFortF3QGP8n3eYlYY8WJ4suTdrgEnvVfHz5HdmxvK1JYafh7jgaYAUZvoUCOR 1vopOaJRBlAuMvhRpoIX0pWOhrbKB2UDLzbAw+nx+UoWQruZPgc5RdiyUMRR9y7KJj4o xB7UYqtn1yANee+ynEw3/Iu2IlNXWrNrXvsIhSFocmLJapMMGno4nILrb8jFdj1r6tNJ hzXEitlx6ioUNHbIimT8MXSPibbSrwVk0SBEBzJRmVS158QG9YIbhWBq23q6tNC+Sjln rQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nheyu68ms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:48 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AIpDEY013624; Fri, 10 Feb 2023 20:20:47 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2044.outbound.protection.outlook.com [104.47.74.44]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdtaqmhn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AOOMIoZL3XnnfMkM8v1tMWlJL0TwrkraBAb0DRRb0C72kcVnYHDbXYnId23eV+Zu2VZYAoZahrrW/4XU29QA/NCrZUOUDTDNiJMtgAd1Tim1eSk3WYugX3bxcnk1g/i9awfKj0NhoLiINYPIkSx8dwNk4Co7s+KgyVnAQuzcJF5lmu56LKyNP2t+Hd4H9K9EHTYpnJQN8prFqzAihIPvGeGbik7w8J9NO0p9VGvrP4XO1k7p9C0Z9mJya7YfIVdLo/gaUA8I38E7HL417lNnsg+PcHBU1HnF9yyoqbzp0b4zNDO/XwrNzssOieACAgIdCUVWeR2CzgBny7sdJ+6Lng== 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=QqBCW0Bt5JbyYA2UStm7LO7bdepNZRe0BKllSHzxss0=; b=YNArriEPJXde6peW9uBD2gDHJbWWiGwUJ7GvDQVgA84p3pAChq5bnTUQClfi6ky158x8WaF1J9sXaJ8bRWEGRW3Y4dWLElVHTkC1NxFckllxfY9YIirSzEjGrXcxE2A3wOdPj1OhHAbb5U81q1PYPibOOlRxlSI8eEC5y0EqW9rRp/wjV9Oug4TLBzrTVZOKmpAic6c9BTkoazvCw+tDSfpe2tVXRB0wQIYWpK6EPqxJeJgVQmkJKcHI/tpk/k/OCt1qEuUJBOwz96fblmaWPPh2TVDE4RQ0Xrv6yIQ7ila7doGH2/WEv/a5oNNJx1c2ar8SE6AC0LU9B7og0cSOaA== 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=QqBCW0Bt5JbyYA2UStm7LO7bdepNZRe0BKllSHzxss0=; b=ZkC50hRN68ttvaMEf3SFSULgNIt+zodOzKd9wGyJQiH0iM/XmtKdkfiaO8cx2Tpg7RmHcD3O6PNDP63JBmlvmWAqLhCUFBUrL3IU8KsE0YevY8YCA18yG+sJ1zwlweNoMrIpOy766ttp0VbPlrO1kr4GFQ75Kg0z6f0HtX7B67I= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by CO6PR10MB5652.namprd10.prod.outlook.com (2603:10b6:303:135::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Fri, 10 Feb 2023 20:20:44 +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:44 +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, Michael Ellerman Subject: [PATCH 5.4 v2 3/6] powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT Date: Fri, 10 Feb 2023 13:20:24 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-4-v2-3-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: BL1PR13CA0298.namprd13.prod.outlook.com (2603:10b6:208:2bc::33) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|CO6PR10MB5652:EE_ X-MS-Office365-Filtering-Correlation-Id: 60c98fb4-b3be-440f-4513-08db0ba449d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RozIESzAEwyEmI7a7t6hr1nFT1qDCawzNDBVkOk/KqtZw3iu7vjxdr6dqsRZIZZWod8WbymkCIoWJWoQ6Lujyx5cwO3r/NF5exVfJR9lw+rEVT4NF94BUWQ0ipgLD9DMUYmhL/YuSOleGvv1NdshMHZDGHStuBPYHrfdJg0E4CKFyz3Wrsh+u/uuplcszcwbyjpmGBIjaOIDme8wWUNLctA4GQfHQZ0CJlTNtivdifZgSqcs1hN2Ek8Wienk+Taw7w1y1yBIZVhSs5uTLijBIy/hStYWCQKizqXE5rDc/IvUCQREVghJeNjm3ksWeMdneKAlvpg5kvoExOMWpY1o352hCzpRwvsloeUX9/+MSrkRq5fAPpOcbcBFHBCLJ7NRG+M3Le/xHCcHRfVCviPlYnHEtxeTVSKZWJZsIOgM+mQ0DSWWtZ6swOJEE9jLGoEuw9md+wx9QFV6iZupIOUIDc05ANtbaXdnteGcqRaoOalyqI1KynK29gstgZEBt2xuMKgVFr4CAAs5q6XJx8kYlZFGNY7FtTO0MDdzsKVcAuh/5Wo9n3Sv3Hm+ifr8tEQ2VBpjbMIqhRdw1N/wAs9yXHvck1JPLoOLCyupRw4fvmPEZnESYxTZLvwtjA+NDBKv0gtnisHR/URHIzpZyR8HDszCQQwreBbB9KqKjt3SZh/XHkCBAaAyRplDsuy5dW8uYsGjyKo3csbdE0E7Vz6mlw== 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)(376002)(136003)(396003)(346002)(366004)(39860400002)(451199018)(2906002)(36756003)(966005)(6666004)(6486002)(478600001)(6512007)(86362001)(2616005)(4326008)(6506007)(6916009)(8676002)(66556008)(66946007)(66476007)(7416002)(44832011)(186003)(5660300002)(316002)(38100700002)(8936002)(41300700001)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BkK4R524Q+yDQeKT5VHzr3NNY3Xo?= =?utf-8?q?b53+H5DhBoRJv/1apgL+F5HhEUFtX5Io9BkZuD2OBi8nnu1px86gQFHHjt/RUVT8x?= =?utf-8?q?IlCCqak7aBbkyQeIz2xmYBv/azmm6yhP8sEE0Xb1pMoG+wmxISPjp8kmKt4yT7vn6?= =?utf-8?q?i/s5mG+X7fGRdOcfSxiatSfNRSyB18uI6fvdgarqj9kODe3cm/4IL4yNLdIlHj4qx?= =?utf-8?q?7NLa0oNN70YGDvUL9vrCGFZpsMfVUpbeFA5QwADcQF7nJPmHk4McAPHdRrmTn02mT?= =?utf-8?q?8AKHAFDWWpmhAV91QzZ3Dv9lxCPaI0T6syqVlH8YQSsRU+ghlX7OsEkI/hgvldvAN?= =?utf-8?q?qSjV/iCn1adNi3mTQZowmRErlt/bR6xqSz0vJ619OwpatojO0UMruD72BsM8y0DLw?= =?utf-8?q?Ju+1NJWZCTewsZ9S2/9XPEZzaM76feD4LDIZ8HqwKvNgxJkWi0JJXRcWKF7oClKbf?= =?utf-8?q?hUAt6I50ri4Nk5xseI38urI0UCvB3065ySB2MaRFAi6uVDvDqA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+PpDke?= =?utf-8?q?UBqN1HIWPpxhPpbSsMeQ/Onnz89W8T1jFmt01M6ZH8Sb8yVYZgyOI+nMGc+Gb8GM6?= =?utf-8?q?HfzHQr1DmVj1qh6QNdJEGQaWsCATrf4gYPKdj25oYAVwwYeAs+HXBbX6fNkNBQ+kp?= =?utf-8?q?LC1Z24CIgnyBpM6yoaNS/z0ZtoZV8aVXKrzAT5R/72DE/58K0IJtpJc=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?Ts2zVf0tk2bo4oX9?= =?utf-8?q?xq79iOdE1/bJjXamg+xiGJk0HGSVmIN69OApC0E+V6pDq0yCdMBImHwhNeBBm8xDW?= =?utf-8?q?Oo3Y9ufN/88JFEUPsUK58gXnTzEmx8XIyRtggTKos4aeTe+b2aMfIWzqY37Et9Xa9?= =?utf-8?q?PFJLeotbkMvqeXaQJcjzU3tIBQvWLHBuvTEjeeekWLNwAKKP/MP6g8Sk/Kuj0bZeR?= =?utf-8?q?QXdDll61nAff/gIW39b2/cixcswyazuBDWKRot7IGdDu67KfKuwSUafozNYsjU99K?= =?utf-8?q?QOB1GOtQ53Qk8CKkaUhOov+caQPvkoxSEqg73svApp4e9cBn/8CDWw9niBNXDmkjZ?= =?utf-8?q?aiYTCB6tTJO5nO5z46To2q8wVP3UmQSv60P9Jkp+AtH9YZlBd28kWXe2d0/+ugKJ+?= =?utf-8?q?tJjOB9bRORJdOl8Zu/THv612xq4c4/Z52Bw3X5J6+4uaQ+hutwFYDctNrhY7jOFfB?= =?utf-8?q?0zmtZCJfJMQKU9kvh96fxX51OV900H62aKjqOb+UU0IYM00uW6ZlPWe7BPNbXGro9?= =?utf-8?q?NNQjG6zgqme0QpXuzCv0TFgmIT591fSMpJ9Prx291CMMJfZC9EH+7uqctZ+hMz26z?= =?utf-8?q?T7rbrR5pbKr+o34p5s1MX9mgb1O2HSXhcA/p6BhpUYQE3pRe2SN+RGoONjcdkdjL7?= =?utf-8?q?2O+giPxTj444RcH2F+lR83HAPYjSDjmsILUNCyI7gK43cbr7hdyD5hxEB0VYRhfGH?= =?utf-8?q?2sWES/ZS30SixNncfh6dWCqJ9PgDYcBYf+s0XAhyEmLic/0QYk/ktKQ0qInqhr6cl?= =?utf-8?q?eRcvWjM07RnZnWqPa+3dHxNBfiJor74Q4oL2Ua9FUUMTNUywy32MsEX7jQM7PqJiN?= =?utf-8?q?iREttdQPWMV0+C8cY5ARZV4lmhzAux58oy4zMI//5AHUdFBtFd7uz64kDSsnWbRc/?= =?utf-8?q?rxDKGxzq0WzDfqWzP+mHYHgOul/BW8lR04GbuUDb01sekIKJ5rM/fPCBWQbQmeDEf?= =?utf-8?q?ZfK3pGQzRqdp6sjmS4jYsj7Q7OVURl2xk/qxXVjj9/bNcXvtNyfNrZxcGtUheK3gZ?= =?utf-8?q?abA8YPdwSWHf39ofFgFEWj3AquRnyya5w0SjTZPUL9LrLT63IntqdYa5nXNuQ0YUS?= =?utf-8?q?vSple043ZGcWjsN0NTrwaeaJiP/EA5/TJ1MG8WRjkFM3/x5KSAg7lyr0OnZhbyOOd?= =?utf-8?q?WVxRtMVZYIf9iITGmUiFDPFkkx7ymyXS2mnX5UeyOhCzVm3LDWB0S4DHDh3vVrsnx?= =?utf-8?q?NCTfIlMQ=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60c98fb4-b3be-440f-4513-08db0ba449d2 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:44.6616 (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: Q2lGSjiA+A0OcCaEoYJpIT1n9g65RSNyickyqNgAGouBT4UD+d8OJniZC6OlOZVQUM6LrQPDHv/LfvBEPNuX0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5652 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 suspectscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-GUID: g6EWzY_tPUnH7m7dRgFDI37sTa3vt1ih X-Proofpoint-ORIG-GUID: g6EWzY_tPUnH7m7dRgFDI37sTa3vt1ih X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122058_621242_E03368C7 X-CRM114-Status: GOOD ( 17.04 ) 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 From: Michael Ellerman commit 4b9880dbf3bdba3a7c56445137c3d0e30aaa0a40 upstream. The powerpc linker script explicitly includes .exit.text, because otherwise the link fails due to references from __bug_table and __ex_table. The code is freed (discarded) at runtime along with .init.text and data. That has worked in the past despite powerpc not defining RUNTIME_DISCARD_EXIT because DISCARDS appears late in the powerpc linker script (line 410), and the explicit inclusion of .exit.text earlier (line 280) supersedes the discard. However commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") introduced an earlier use of DISCARD as part of the RO_DATA macro (line 136). With binutils < 2.36 that causes the DISCARD directives later in the script to be applied earlier [1], causing .exit.text to actually be discarded at link time, leading to build errors: '.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 '__ex_table' of drivers/nvdimm/core.o: defined in discarded section '.exit.text' of drivers/nvdimm/core.o Fix it by defining RUNTIME_DISCARD_EXIT, which causes the generic DISCARDS macro to not include .exit.text at all. 1: https://lore.kernel.org/lkml/87fscp2v7k.fsf@igel.home/ Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230105132349.384666-1-mpe@ellerman.id.au Signed-off-by: Tom Saeger --- arch/powerpc/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 3ea360cad337..4d5e1662a0ba 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -6,6 +6,7 @@ #endif #define BSS_FIRST_SECTIONS *(.bss.prominit) +#define RUNTIME_DISCARD_EXIT #include #include From patchwork Fri Feb 10 20:20:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136428 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 44882C636D4 for ; Fri, 10 Feb 2023 20:52:58 +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=lpDw5e9Cts4QEQSLwSq/EBbGLKpnRJoNw7nEStKrmXY=; b=TAqu9XQQu3t1ZV 6gT/hsNYhfuunTnbq4icxTEcfNZ0dRJZ1osPEaoGu0KHH1NJro5hiSSg0/iCG6H5OWabTvEfx3xJg zoJjylShLmDObEsaHjiaFU9qb8iIt6kw5lQRp94XXTIwdgXXS97aA05Vw3sI8n6lcHOpe20vRObV5 PkLAQOirHHVXTyoaJz3yVsB0hnpmaXMtT0oKJ02YtRanGbAA+qiiqf27qrAFuaxUPqh9y0j6e90qY ZT2WeiEwWbqP4lTKgpw8cE4uOzGdfiyqSRqvbm9AxtHZcd5crD3MfAQUDVQ9sZSjiArJ8M4+3OZ47 qsUjlLekEID8I7N9BCaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaO0-007UxM-GA; Fri, 10 Feb 2023 20:52:48 +0000 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZtI-007MEE-5P; Fri, 10 Feb 2023 20:21:06 +0000 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AI0AuY029674; Fri, 10 Feb 2023 20:20:52 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=VhfbtTG/NUQ7wu7lNb9jypTCgn4r0UxTOdaBvnltlAo=; b=pTm1Iit9zmzxv71Bd7U3vXObz98mtWNyRqbYnxhBDtKWgVPLd0Vz84m+574mHGB3ckrA n+M7gnDP334bwWsuAFMt0m4D3bKvdLj3rQnD/1kjEastqY3wxjy2iHYsE3sQHOtOcQBU E/1OlQpFf543W/5Meip04IvlzLql+PypMTa4MU6F5yGhmRDnknMoDdl3FkSuusBqFIBh HAq1X0AiJDUDVBE+07hR98MO0zFpbmMqvPRrhbrZ0we/JoJSXVDjjmo37zglVeYZh1aK EoNnnlm5MLWnAZCOsvKz26LuUy7gZoFYWKxsKetRB6WXem/KcPnVGTwyObEm1fwtliBD LA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhdy1ea5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:52 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AJlaR9003038; Fri, 10 Feb 2023 20:20:51 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2040.outbound.protection.outlook.com [104.47.74.40]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdtb7jn8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nFrxWels0pCeU26fJ7ZC2Bp/abtgdJtx9KNgk6cDwdDPc7MklL1r+aXdgaqz24+rlPky3LNXVZ6Cqimt2vPc5iq8QbGEXOLheBFszgKwcz/z4VKVfSwXPZlvmzLOn5Yi9RU5PS3gKKsHOHMPDFo/o3nNDVq3D1y3ekXT8547mZlKBHDNZpiYT2Q5NkHG/I7oP4y0sbZhnetmBlC+fu5nGovVvbPJ/V9PYDxdoxK1baLRDlJIqd/0uqnhWdZfSK1JWQ4MET1IVREdqL5JwkA7ypxcpmEa0PeQHmcKcW89OmkaDtd2UoEWj3foD+aCGHebotAMNJZiqu4JJDL0eti69Q== 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=VhfbtTG/NUQ7wu7lNb9jypTCgn4r0UxTOdaBvnltlAo=; b=ljwBpP+KvEUaf80t3C/O1vORhIlDnGh1lN17yGnkgiD5GswlrWW6gBflFEtdBEho6jEsSEJRf9vmk1Rq2JfJzhWjJhYO6O4AWh8Ff2ukcxaqAK4AU1AJ0JHxQRyrlvxq0c/9COOMicaWow6qN+GgoSRVOdByNqWsoNrcMRd7iAt38Nq04kkkZwd9p/lKxolXpk0q6DdTaX/6b8zXWPor/bmRgM8ZsYimfjpwUA4MzytAuUwL6gndTDZIv6mQbH6n1MybQJ2xQED81grhHeoR9KWiLbw38apdjJNOm3gCqX1TTS+KTkd4CjeM6FSyWgVQHMfm3eG1tHHcXI6SNF0iIA== 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=VhfbtTG/NUQ7wu7lNb9jypTCgn4r0UxTOdaBvnltlAo=; b=di4p5x9uKsvliWuBIj8Eht+qR56LMiv52xsSyurMg57B+IbtZONzs7V62rDtAUkpGKUQWXXi2l4FBQwyKah/8WDh5lJddj75QfF5ZSSS0LEh/YDCB6oQduwvogXUWTLHLmiDQQuMn0OcSDgeI6pHgyTtUiHKqBVEUzIWsoGI2ts= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by CO6PR10MB5652.namprd10.prod.outlook.com (2603:10b6:303:135::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.19; Fri, 10 Feb 2023 20:20:48 +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:48 +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, Michael Ellerman Subject: [PATCH 5.4 v2 4/6] powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds Date: Fri, 10 Feb 2023 13:20:25 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-4-v2-4-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: MN2PR22CA0006.namprd22.prod.outlook.com (2603:10b6:208:238::11) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|CO6PR10MB5652:EE_ X-MS-Office365-Filtering-Correlation-Id: 802d9a39-fe1a-4e7d-3393-08db0ba44c13 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X/gtWJr4gov0yTWARw8puQ3uwHNyOSbAvdPmJfumB+Lx9B8sWoSBX9Qs4m0r1airdf2lgJDB+NfaIUItB1IFh1ZXFvJW1GYxcDM37y+jq+I3xGuMsS35N0kSMY+F8aLWZWmwYcRwnNNfqwkL+btmeWd7sOGaQcGB+8wteZIXWuflCrjX0POb4byRku//+/CeMaf6q2/TPAjcUj6wl7urYZqCJFdcbkCbopsoXmw8SWWfBPgretL/ObA4dKW4kmKZ2Fa33stUfwhkjWq4CcTUp1pQoX9LM+y0zfDLiMfwrRvbTJs5yr44tOVWfp2vflv/0m32GioeKHOhKMbuSLnDeeOIK3fQHZs6Dj1ElAyPLkeZXJXRnz4ZXOT+kGVQezG/msm16GhuTjF4CYd33pEiBM5q56gJqluNBP3keIOTSs3y+HM7r+aiNdWa5XZUlNAKSzIVGbfNL9rGiq81krcmwY0cE1Il9zNpPgNfgJLJlxF6J92fez6MLAQzODLID52qAd3hbyV74DNn8/3rxzv57I1o4SIRFGbnWnOAZR4w2clfMO9hhyszaXZdwhlGh/foInxl0JhPslPXDzT5FWlB2x0uXP9OtiAJsGSzIZfRey7LsORfV7Lio5UJQPIwBV0UdPirHeRkOoe2sOkDQGdnOpbxdjrotrhvTGU6kyB/lnqFrK04biu0UTsC9QbrUCf3mVCAf6vg8mdLkOok4iPelHlS6OMZ+ugr2n0MPdlnGwQ= 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)(376002)(136003)(396003)(346002)(366004)(39860400002)(451199018)(2906002)(36756003)(966005)(6666004)(6486002)(478600001)(6512007)(86362001)(2616005)(4326008)(83380400001)(6506007)(6916009)(8676002)(66556008)(66946007)(66476007)(7416002)(44832011)(186003)(5660300002)(316002)(38100700002)(8936002)(41300700001)(54906003)(142923001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?sjOt1k8Tz+Oenu29nSZDuYbsbwxo?= =?utf-8?q?A8H70R++1LFFGlSoBFpEl6q0/TVq8y/nMmZwiTeyY5NjcxvW0sqnTwZeGclKDOfTa?= =?utf-8?q?ps9zijz6Y/0/J5lbh6gweuAzLkOjjhtSLbu4OmnrWR7gQ/bF3iwwV+/CYu/KCFqER?= =?utf-8?q?k/rlVEgldCN96NsrieYpVSSACmXttxuCPO+cNZuqwIiVX13clK+f31oy3zInTWThz?= =?utf-8?q?OY0Tpdceg1sKJiB89cO3oeDVMGwWocdBu0GfnWDr8N+SEyvuDwk1lPObSEL16vzQ5?= =?utf-8?q?Zs3N7xAIPxeUMc3DVvFTZHkffQLvbVjHouCxYTIeme+htc4BEYlaAB1N+U/pKj+Wb?= =?utf-8?q?VODLDS305CGTfickDWwFi25vYAP/0PnMacjJKs4MgWn4TtiHiw68YeGAId8P310f+?= =?utf-8?q?SLGSvTlzJD7OdxhNKTF+zfpvR22Tbtse50cY0WSSqrb3smhkYtHTCtnPp8k5KdQAk?= =?utf-8?q?Z7LfJ7uyTwNQhspz7sM/moFDVIh1QI2HwtoLmsCBbZVsktfijjP2nQb6hfXTnuRem?= =?utf-8?q?49I1XmAfBkiPwnclCCkoQ9xaw8E3iBxs7HenZwIR9ThOv+LjPyYs59yt5dtPVjq1o?= =?utf-8?q?OatLcwh7nadRvYIZBbPVpzEBk9dinBZObUQuajtpZJim0naPjsFX6RUcEvAW4w98B?= =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dvoLEpeh?= =?utf-8?q?hzAJE3Wd01tADNCC+CNXiMyWub5+5MgkzDhgLufz05JtIdsq8lFqg7ATnIcUAKOla?= =?utf-8?q?jXTtzBDeom76Af6MZe0FH5NI431Li11TO1lmHPTs9CkN3b+BHjQ7apoowjXC49BRl?= =?utf-8?q?nFFK8btWMUI6bpEEEfRwgmljs90JV3NF9/rqj6VeTTvo51yIXsX/D1tTZikNx+Y8g?= =?utf-8?q?ndsyo0Q/y1m7nZNRp8XMV02sYhpRKVVAjFLcuyBYWNkhsAmlfq5fPpw7V3+wLqLEq?= =?utf-8?q?QJXv0sFlZRkf6FIJgdTF5pw8aFId4fj/zzkSmM+zXleVxn0zmGKDMcCAC1F/sY5qG?= =?utf-8?q?yyq/tCPLwgJ9ecwK3vFP9DKtWm9T95aywcGPMtWPztqpyRDBhWnHXCHCjzLo2Em3F?= =?utf-8?q?t/2aKxMl8liQuGcmBWbeHoE9GXQyeMuLlUIj81YNlwuCWyh3EtJBggRW0pO3vV6Kf?= =?utf-8?q?Mdpv8G/c=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 802d9a39-fe1a-4e7d-3393-08db0ba44c13 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:48.4738 (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: dmIBfBt26LNRG84GNw18ElTtk2b6Ajyc6w6+ar5oljiss6sVoQEDhSXPe9vCdj5T55KdDo+Z+RvHWw9OVJyv+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5652 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 spamscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-GUID: _9SfZzz_hyNWvtKAa_H7JPZveok2GwwL X-Proofpoint-ORIG-GUID: _9SfZzz_hyNWvtKAa_H7JPZveok2GwwL X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122104_447699_D3A80F05 X-CRM114-Status: GOOD ( 19.66 ) 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 From: Michael Ellerman commit 07b050f9290ee012a407a0f64151db902a1520f5 upstream. Relocatable kernels must not discard relocations, they need to be processed at runtime. As such they are included for CONFIG_RELOCATABLE builds in the powerpc linker script (line 340). However they are also unconditionally discarded later in the script (line 414). Previously that worked because the earlier inclusion superseded the discard. However commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") introduced an earlier use of DISCARD as part of the RO_DATA macro (line 137). With binutils < 2.36 that causes the DISCARD directives later in the script to be applied earlier, causing .rela* to actually be discarded at link time, leading to build warnings and a kernel that doesn't boot: ld: warning: discarding dynamic section .rela.init.rodata Fix it by conditionally discarding .rela* only when CONFIG_RELOCATABLE is disabled. Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20230105132349.384666-2-mpe@ellerman.id.au Signed-off-by: Tom Saeger --- arch/powerpc/kernel/vmlinux.lds.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 4d5e1662a0ba..46dfb3701c6e 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -395,9 +395,12 @@ SECTIONS DISCARDS /DISCARD/ : { *(*.EMB.apuinfo) - *(.glink .iplt .plt .rela* .comment) + *(.glink .iplt .plt .comment) *(.gnu.version*) *(.gnu.attributes) *(.eh_frame) +#ifndef CONFIG_RELOCATABLE + *(.rela*) +#endif } } From patchwork Fri Feb 10 20:20:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136429 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 42017C05027 for ; Fri, 10 Feb 2023 20:53:16 +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=yVPUe+GVXCGfITGmLrPd/WnW5svzCtw6QWWJX+6wBTI=; b=qUxR84gGTAOFK4 xX0jCjqvtwQ5Ja7Yi57f0RoZp6PxdU28CwKCvhcG8bOOM5ZnUTQLPW2BXzW0Vhu8E8wLmzL1OUxU+ IdK95OjDg0Woy6N5mSeoYRtFI3YpXlOkkd9bCCtNINqfMmrfDetdSvb3E6FFOCk9n20qn1131u/BP XnGxdvgz234ncaGV1xyxVGAt4hZRAJeWK5zA47its7R3LPRT8++tGqOwietpooh17YQ/FgUhsm+PN Y0sbPsGWPzyll5h5B3L8QwVj+2QCScNEf56oLpgz9kGpSmyKEIGs8U//x+4mOaFDMNHN/8NB+bOS+ EoWrN4hgv5FmybFPlapg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaOJ-007V2U-Ea; Fri, 10 Feb 2023 20:53:07 +0000 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZtM-007MGd-Lp; Fri, 10 Feb 2023 20:21:10 +0000 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AI0HPs029940; Fri, 10 Feb 2023 20:20:56 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=fteaV//kM5gvfhNkB07KGHv/UjLnACIvgHB9+7jPycA=; b=CxjSFyQAEKpRv2U1DDr3KpZEOAHJ+B//MfBuQzxPEhRyCfnyVmU7zm+TahKbjfoda9OQ 0AnDA74u9iObOcdRtfHSUmd52/yflHDUP2VTOngMbNkrT9KwVfn7aQEZuuzGL/WmZ7jl 1v9cvHmuOiMe61OIDB7kq4gaS6CuHDgRsawEr6zfCc2G+9NLpTG4VQtRg3ykByVtgtse rJsZCeP+jrX3JD2XDYX5xCasfgdzqAEHRewQPXUtkY7r4BXJTL7/bhFE/KROKbddkA2W zvRfYm5MdW+pIrzdM3BQhBqEyowMW5t22ngC5BJ4KKHJua5zLNmoGgT0YtVdBYeDWtoS UA== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhdy1ea5p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:56 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 31AJAFZL003179; Fri, 10 Feb 2023 20:20:55 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2175.outbound.protection.outlook.com [104.47.57.175]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdtb7jq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:20:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aGwGqEhMWnSc3lSn2nxheyIoZ4yJyPU0xzTQNklYxaMzFnuRKEsXQ2epM+CHfltQE2VRMAimvq5AeKXwZgsx47MrHsdCojf0ifOP2BloTWb4Gk4/pF/xemSFgnkerOIwcNKe7mwYGpBaf7sNIAylU2sKeeW1m9sshFe/WPdhOinIAf/BuRL4xKS6mygH7D0iazE3fTY80AQOERhb65PlyhNUcy1XbjY7ZfmIRWSzJJub8fu0MIYnTT61Ki6Jf3Gq7uo7FdCWUX9OQzs66rSWA7lEndX5kzjLmES+Of2ms3tgftmDj0ZSS42mvhR0WdpuRfhpjrbBse0y5nYXnKaS3w== 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=fteaV//kM5gvfhNkB07KGHv/UjLnACIvgHB9+7jPycA=; b=nqCOlX8EChJnPF7gLKmEy55YOz6zV7J96Mrafj01o0VqiaRyqJ8tOcvGCk1qSZ1woJU3omuCk7zc2SYTXHjBhKrZQz3seARR3vXTvKJL2uoAxpjmn+0+8wBWG0KtDFL8YaKzzWZn0pzTPfa7Qulln53AEv1xgvhrFSHJbVbERP9Ux0aSVYvmOQwwc5jIsqYoaa7aXi3Yjc6xaoF0Yu4t0tffA+3iC3Abf6UIcxV0E51YEG5CHsIce8VfHsNzxmlDNjIJQK7Sd11PkGJO1kTSB5/Q2XilFxPrfjDBIoBQeMNos7IQSpOizHeMcgmjGQvvXBUFK0xiPvKWCSWF2Dwufw== 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=fteaV//kM5gvfhNkB07KGHv/UjLnACIvgHB9+7jPycA=; b=ev2/alx8OLWZqURw92fTK1LtbqqAYvLHKipZ/u9k6yKN2hzlFnb8P3gn0vTJjndhkO4ADmBoQ9f30GcjVa/4f+BOhwqDK+cj3Ylv9ZcnAjMmvkdvR17Dkoi1eRpIPF6Hk3GV2sUybK5cLbsVEHBXQlwshJww1CX0Fdl+cvTYkMQ= 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:53 +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:53 +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, Heiko Carstens Subject: [PATCH 5.4 v2 5/6] s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36 Date: Fri, 10 Feb 2023 13:20:26 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-4-v2-5-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: BL6PEPF00013E0B.NAMP222.PROD.OUTLOOK.COM (2603:10b6:22e:400:0:1001:0:10) 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: 9397c614-8cf7-4000-a559-08db0ba44eba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /XWEjnO4kLq9OZjK7GzZpWq8/2CJPer6Mbk0YlTjUdbIB7Yvq258z4Sv9Kr9aX6nIQ5T9d7oXBJiIG2go2QxT/EMLlOIg75hWbGmWESPD/LiPOrGsq2/ZMeoA/R+PnS869kEeVvgPZEIy/0pmTLGqO5SxBsN3jRhuW8Nm17Ihfq6/r3it2oHpkaGSYr9+6Q9ijGQZasmtSEaAbxNGL9j/tMnqdw4QOV06lo9qz/tl0VTfrzKS48fvwRKe9yd+v4TxGtX4snKhLfK/OKa0w+YonlnoK2GocoC6ZL4i8lvgnx8Aj1rXLFy7XQoujHn1SNmtUEeN+vscmCYfJye2iJbKnkqxiAyLq5GEtjcxL8G68bi8cfIaGneXaDLwdojAx2HBEXF5F/PhIplTrvaz2mI+SbYEtDXhIRR1AKjNlXbSuwsCIpwYwJAigbDl5F2+JDWJCTm3jCAy7YrLA4RiAbykawqNbf7p8Gb4D+Cvcc9EdPGZ/q+iodYR+wkOnYS9mCB6/hfT/TFH7kIvF26VumgBna3m6j0YUPZi1vnqMnohb+3cfpxP3T0M2vZdj6D2RCbpsXp0KUnYZIRMSi0OeuB/PN+cp7EH1o2SV4rhoYLDNROGLheG+PMbgJxQQCZSRxDwhb73rfaaJkKcLUflP+cqazNbm3Dt5GMLMLnUY7YnsNrUyJwvJ05ny0UEkUmz3eQpCRpsJ6l/wdrU+cIScyWaQ== 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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/4yGVWVzQyQIc7w?= =?utf-8?q?8Mesj3a8d5pjkbED20XJuV600spYyo9vEUku89DkFH7BvOtE6mYk3LkHmdYYYbjD4?= =?utf-8?q?aaAG2A1SSpgjJQLds0IsU3S0bEIJl18pyQqPj0HjZMUToC9/63I7X0SRPYu2j5l8i?= =?utf-8?q?EKI2UU3NAoOmNQiyROHi5uWjIKjTvFdeMj8wldel8AV0yw3pYHMUIvieanMhpPHth?= =?utf-8?q?fAqFrpNTF32/8hG2pHeHCgczCkC/szM0u1bi1xyRo+zMz+X4zI4UlZUditdm7AkVW?= =?utf-8?q?8zYMX2LVRaR9tyY/5YmTCY51aCz83+0zg/+hbbc+0DAJqwv/bQNvUDTpWVAFKy6XD?= =?utf-8?q?f9GqlH5FRyEgcq9Nrzct2Zok/79I13qmsIxlfNhytri7s6Yiw643WSAKljf9I2WAX?= =?utf-8?q?KIp41WMBuo/CF35PRsmD9vkEpZx3Zn4TGlt8BOM2+reTVVtJDsjPzkF/ID03xI2d+?= =?utf-8?q?Ovet+p0F7Lg4hkVMXW245PsMUIGVjkFF5MdVzzv4e8MisCJhgHRZQrKbssLKhT4eY?= =?utf-8?q?5+OoE0W8el/++IUSEmQdG0mp6TAvCojEFt+OOPoplhrxaZHC9JS03w0ENw/tR4EbY?= =?utf-8?q?B6WPyivcoJRDp6cqcQ/W6AzMKBHRVddffT4644XLnwb1XnAiVUvHNh+H6gnUgXc5n?= =?utf-8?q?sK++8NjnFDpMvPg2LF3pgmGm8CeJgDFPueNoWyWAilCqzvFeR+kShFNoyqbCFZi5Z?= =?utf-8?q?S6zX2ZToam4IOJyvKPjRoeUtIhT7qR2yQ0VaNb3XDPbTq5Ck1RL/7rg=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?iuYSERVMeXM0WG9G?= =?utf-8?q?AkiyOuViWXEkcR6v0rxRE8oGD/2ipDQqRzfRVrQFxBMgt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FUBIohjH?= =?utf-8?q?N/WFRygg9MvpaA+9s2oatUyr0aBWFcldBY5AR6xpM5zYCFhg13PjqA+9AiWRt8mYD?= =?utf-8?q?0VB9rKzD9iF9q7i8/qTH+U74PDtyPaFWRrIUcCKvPSTaYsWJpLQdSWYw4nCbeH86O?= =?utf-8?q?uQCNSQ5o3eIi0E5zjk/0w5P2cne42aylOJzTimdFeqUEYFfQc++EjwIH2UPsZYhh/?= =?utf-8?q?+YOidp0+s61inIonqgUN8lYm4A9WoQkUWh/Q+nO7rjvpOQW7J1Kg=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9397c614-8cf7-4000-a559-08db0ba44eba 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:52.9578 (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: 03eEH9y/69bLfboXTRVBlMr16Mxwf9dagcJUwqoF//v1v5JWgZNq/L90Dczqr88bIa+DorePWkP92633zO/ERw== 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 spamscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 phishscore=0 mlxscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100173 X-Proofpoint-GUID: aivCplTX3hyfRhQVBXXLfJ2hu9CNjWlS X-Proofpoint-ORIG-GUID: aivCplTX3hyfRhQVBXXLfJ2hu9CNjWlS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122108_820761_F8F57C70 X-CRM114-Status: GOOD ( 19.16 ) 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 From: Masahiro Yamada commit a494398bde273143c2352dd373cad8211f7d94b2 upstream. Nathan Chancellor reports that the s390 vmlinux fails to link with GNU ld < 2.36 since commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv"). It happens for defconfig, or more specifically for CONFIG_EXPOLINE=y. $ s390x-linux-gnu-ld --version | head -n1 GNU ld (GNU Binutils for Debian) 2.35.2 $ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- allnoconfig $ ./scripts/config -e CONFIG_EXPOLINE $ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- olddefconfig $ make -s ARCH=s390 CROSS_COMPILE=s390x-linux-gnu- `.exit.text' referenced in section `.s390_return_reg' of drivers/base/dd.o: defined in discarded section `.exit.text' of drivers/base/dd.o make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1 make: *** [Makefile:1252: vmlinux] Error 2 arch/s390/kernel/vmlinux.lds.S wants to keep EXIT_TEXT: .exit.text : { EXIT_TEXT } But, at the same time, EXIT_TEXT is thrown away by DISCARD because s390 does not define RUNTIME_DISCARD_EXIT. I still do not understand why the latter wins after 99cb0d917ffa, but defining RUNTIME_DISCARD_EXIT seems correct because the comment line in arch/s390/kernel/vmlinux.lds.S says: /* * .exit.text is discarded at runtime, not link time, * to deal with references from __bug_table */ Nathan 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. Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") Link: https://lore.kernel.org/all/Y7Jal56f6UBh1abE@dev-arch.thelio-3990X/ Reported-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20230105031306.1455409-1-masahiroy@kernel.org Signed-off-by: Heiko Carstens Signed-off-by: Tom Saeger --- arch/s390/kernel/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index 4df41695caec..a471bd480397 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S @@ -15,6 +15,8 @@ /* Handle ro_after_init data on our own. */ #define RO_AFTER_INIT_DATA +#define RUNTIME_DISCARD_EXIT + #include #include 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+MKHqeq67j06xhJJuM6CiiSaSWbvzlOBbk?= =?utf-8?q?MVnp8k2aizHsKaZGH7ugzStS8pn7bZsgYZ69H9oZRmKrNP2LSQ3Tj5KgFKfoBDDU9?= =?utf-8?q?qD9Tl+6Sd+UY5hHOlDpsUHQDXREMTF0p+D7ixBsD7sd4VfjF88QmPgaY96MR2Vr54?= =?utf-8?q?Wy5EAAgUwVkl3n6XVisKePh13cLxI3MccbIZtrFTDiTAK4R+6U11hY3ww/+Ym3BQo?= =?utf-8?q?r76yp9TTwfBV60oZUbmM1q+W7eG8WyKomDs5svNXIukRm+K9iwSH6Aj4S2obIyZlu?= =?utf-8?q?sNUqXoRWvPOygLcg1vb1PuwJw/gJajqQAMUc5kJv1iWOVVFKikev3F80ckpx5maY6?= =?utf-8?q?exY5KZcVFhgEHD5JUZA1aZzE7OQI47VxER6cVk4Z+i/9LTteIedWPLpoZpA+13VZ8?= =?utf-8?q?6QkjjWR+9CoGscKfBe9sjGTPr8t1QQoBM7Shi3ad+vw0XvstPEN0liCMbMnzs8VXW?= =?utf-8?q?vFQhTJTUBxX+jERe+SO7Y7ZY0Fyd2IEmNb5KFYgdwAojMy1ntQB+45kmKKyPuQGp6?= =?utf-8?q?LkSqNn5Tg835wL7d0b2+2QedmjO3yxVCkaxmrsWZqCIh9fMrvBZnA4QPPK6JAmqaZ?= =?utf-8?q?WXqVGJx7+w1DGXrNJHNN3bBwvPiyQ0VUU4FRP9xOselpgYQ5O+93mupADn7nmoGw/?= =?utf-8?q?+IjBJ3p+/+AQ+q8HK8k7QwGBntHmFwyzPewGm5v9eH9CPfsJzHFjkwXkxbR2oFOyx?= =?utf-8?q?tNUnhgtKUtL73/WmL50SW+teHsDQv5OAmbsDCJJAtLFeJaWDsTG0ZhS9sLyoq70e6?= =?utf-8?q?0yU1hlmlGSw8o3gwRF64lB85Yhf64bIPsVCrA7hgIXsQj2zPzA+K6udrzRKEAPb8I?= =?utf-8?q?jqdNR6Jfldp76izdvNs/jfarJsFD4zUeVWai32IEkCBdrK9Iwvjuqx576wnJ2m4ZH?= =?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-Message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Xc10i0Q1fN1Dkq?= =?utf-8?q?eF4HFMAuSwQ0naN8bzZb81CL0lZtMuMBGXG6k7q3STr7JV2mywvfudlev5EohRGX8?= =?utf-8?q?xUqAKKrcmKwd0WzwtEFyvDcpsU0MrWbDBIHJ+2tT9SgX4l10BNMzFPAFVYMbFOgmD?= =?utf-8?q?dbIkogbE220JoFik2++pAxjQcJU54m3aUOL1Rv6Ma7qqfZ5dY78DAuoXrWS7MEq9Y?= =?utf-8?q?dMRZloepspzEsdaTOMvyP4KE22v8YW/Kgqgq2/Kb1nL0TAcq8g85jpAKDYrpD9dF/?= =?utf-8?q?C7gxyTiFLpEUOrXyCCDAxBHWnxDUyrLFK5VEmXGWdv8ueONu1WVHdlDkIBeI4llzI?= =?utf-8?q?RG8VUd7fQ2uBE/RrJ00nSaqOkckGn?= X-OriginatorOrg: oracle.com X-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