From patchwork Fri Feb 10 20:19:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136375 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 64107C636D4 for ; Fri, 10 Feb 2023 20:33:15 +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=FJ6Z8KFGOzVFmWb0tzOTrUrhD2hHHL1E0YLWEoHIgzY=; b=FX34mgcmsDtaNe J4n1LFGxivWbQQhMnnexfUA/tizXtZrEyhpKo3PvmcUOKA9Oa/4Qtf7Yh7ttIDDDHd0Ye6iS96itv 3mH1xWCkz4s7EwogzK+KPSAjWUolgHI96VbNrGsU2o3w4mIRwLhF34SPchPuHNLDtXoAtJRmXY8g9 nxWvX5RzQTL6kv3kkyoMkIaT3tRHldqhUGwpf8v5I1aNSP1MYMHVXq7VFhSLJR5EB4W0neJPOOsuj 1LnNVSQUmb12JkXmS0w4dDpX4cvS6eHFSrgkLmlEVXA1wM1a30T86WpjfYwOoPRVi9m24gquOGdAr SBRhMLPbes2UoBpA6K9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQa4v-007Prk-EJ; Fri, 10 Feb 2023 20:33:05 +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 1pQZsJ-007Lrq-13; Fri, 10 Feb 2023 20:20:04 +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 31AI0A5q029778; Fri, 10 Feb 2023 20:19:50 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=kfNfns9B5e8vAxdfNNVCTOrSp6ACTnHzEBkIAFG4xog=; b=0BKAw6XQuYZONwo+3sRLHEzuR21+F2iIv1RgPkS0gJIsNQUsMDQ4xtJ2SRrTFA8ITlS3 C+5yybPlp2i6HdvkgHiu5ZZdkwYSPWVuJLQeITa9oi53D91myLxuuum8rDGY/b+o/wJE npfObdKfIjWMwAVJmr0dYZfTJWky9JeVNrY1Ejjm8H8KvIVYW2ZfeaKBglR+hgWdovxq MGbqaRf5XhVMQPtMGXgoUf50qSKH8JL2qLwFi2IDyNpkm2xUEJ9JeVJm3tt0qHuuzvJz DlpUhl26jfpaU1xRciNiu/TMyZA9FY16DjWiyYdnBiN5tE81kmZQq1wg2F9oZpUKeItR /w== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhdy1ea38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:19:50 +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 31AJoiBm003053; Fri, 10 Feb 2023 20:19:49 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2045.outbound.protection.outlook.com [104.47.74.45]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdtb7hev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:19:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fDGZMTs9E+qmjI6zCdtTyv+eMRJdeFCtNXescD6a3nOUl/8nNFUKCTioB4Ad1SUHPxRW/DBjyZ7THUr5IJSDLZUnl96qHd2R5fLPFTCpdDKFdZ4YwI9FvLT1mjjYtYSecFYJlWWilONlGX393ixRyoNl4WKeLPeH6/kA+JnKvhL3dWhschm09A6KP+nh2RWOilHamqoO4lGog0gELn5u8SZGXIN2M9YSByXrIdZSVPIn1U5qJFWK7Op0Idg5ImJhduSLSqv/nsy7/uRKMYxbfVKpp/1LpDMejhjVL38mt9gdFhSV52SzBzlH8SvJH8Ya5/1EJ9kF3BSrjBCMyaKGHg== 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=kfNfns9B5e8vAxdfNNVCTOrSp6ACTnHzEBkIAFG4xog=; b=GANVaZbErifQdQ2CyB81EsIiDcX3IWwYJPxnylI1pL4qOoMpPOgyeXsdLoEPJnkF+Z/KzBDL3fQfYICwCqaC+qzVwS1ICON68bvibqDuJqt6illrAn6WI7umylZJywTPDbxqMDxQsVwFJkzT0BuocsT7DHwqSlo4hpTPq9+zMN3qhSSvjOAv/cQaVBrfS7pyeMO3gxcnNFdOwZr/DKXl6YoozS5gDO7fqVYsa22YMMSyq8uUwoSmzUy7ARgEAnNO0dfLDxSDBNHlQe9yBaqyJBGwYKthSPj8ezCrULFHAUPRaRFW34aNk+kc7l5sx8ORDRhcQVZSDoOJkR5+FZRAjg== 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=kfNfns9B5e8vAxdfNNVCTOrSp6ACTnHzEBkIAFG4xog=; b=NOKbzqKffdcaDEgprm6QLibvlSU0MqEbETos6aH0VOX6r0XiJXqMTxJLdClX8go550wxYCZHrMoijDQ3Ke3nKVEHX/IT7toAW5Wk01PXTeo2kEWjWOgMa4bXfPhJT3Obl1zt0dIXGOPLCOIxojM+SvO/pSTBLYdWhyfEftbpwFQ= 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:19:47 +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:19:47 +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.10 v2 1/5] arch: fix broken BuildID for arm64 and riscv Date: Fri, 10 Feb 2023 13:19:35 -0700 Message-Id: <20230210-tsaeger-upstream-linux-5-10-y-v2-1-ada7b8d36096@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-5-10-y-v2-0-ada7b8d36096@oracle.com> References: <20230210-tsaeger-upstream-linux-5-10-y-v2-0-ada7b8d36096@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: BYAPR08CA0042.namprd08.prod.outlook.com (2603:10b6:a03:117::19) 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: ec01a323-d73c-4663-2c9f-08db0ba42781 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W4JMfRyig3JdLzCjsJk0zTNGxYQmpTBiWO/B7V2joEqPcAxTBA2pYmKjxjHP7+scANuyCRtBbwwYYzYR/KxfzqLLDxfc7v2+dvZsA08JzM27PeE4iu7fVJLgNjO2rDTPam/7/HAUdOsK9cS4jDt1nlKEMcttaD4ALCbP0eRZIuOU9p5qDyAscY5zSXopRDFclzTu0HyhejoZKXfsnHl7gJKO/zjRn5VG7tE9Z5oX7+WVguFg5YHmZ4NTHkphkexZ8J2G981r2WGyIA+o8Dwan3RUrc2vrwTgPuZ/mBeB6AKQk0IAmdxQgtfBp6ASwYcPy+E6WC0Z6NO5nfWKps6s2FpqV0p3ESzN+jBANbCT40IcxKn2gHIKvu2CSxWCDUjwWQZv3Nz4TKj7AYGqKnJtUICereAdJpl83gow9yfBmd2mcn4w/NGcEZ0MwyYw+l+GrgLLjhoCHkYXGJU+6fUkXFTbzcWce2L6UOvroUllLHaqrLgv0/+tO1wvdPxI8/tc/IVGrUQSEjX84CD5gPdxzFlOs+nKgSjEBa7uWZmqW+f4R7D0cIbL8FgtnSX3AIGGbfOFgPTP0t188wzdzEyNfvk9xzvm6HSseeDSfjzB614Daswa2/EtXgulrjaWfYM7hC7WaJPPowRWFqBX+b6s+Ojyh2V3wb1/pf4uhBPIjsI= 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?Y8LLg82PTo9Uk9L3/tsz81IfQmcK?= =?utf-8?q?aorBWxHdQztJMQBJeOReZ2co85s26bvYSCq3iwdU+dnl026nGGEHn/HEESJAlkcHv?= =?utf-8?q?XNt1jTsH2caWdyoLwI4ELhPD9HYZITIBju3IRFZqb20L6CjNhGCDcN9SYKUd6Cl1e?= =?utf-8?q?d1DzUPgNb79lom+oyfM5LP702zyHXp/KaSyLjPucDbH8l6p+eDuTFRPzLEqCFf8/F?= =?utf-8?q?/sRhFtXxnyfqNLpA9hV+5SyLYHcao8FRIQiRbZF8uZDbVVLIqa+5G40oXTDZig3xg?= =?utf-8?q?ocjaxSZ+t95LPJTe960ONiiZ8ZlaOjhRkzD7XimNeZbhSmYn8enc9i/r1VquhL8VL?= =?utf-8?q?a7ylIJ9OGiT2IFXUcTfDxGk8ZV6qWQKY9HJ/OWbxxrgo3TlWEtHrwCKOIFzg90GTw?= =?utf-8?q?gPsuS0x/ZZPOZo+RpqQOPTu9uJHDz547yy+NzuUZw34MsjTMhehVon8EjmP+pn/uf?= =?utf-8?q?C/X3KdtFaNejM6uiWMDZEIklx7FhFCR5r7qz4PC4AQJLbBRkVe45aHfYa96n3bZ1M?= =?utf-8?q?ViJN3oF72qRPmiyBg/wLt5EDHOSldormoeOUi/g0LapgeeiIAWT7CMzB/9MqkVxnJ?= =?utf-8?q?TUFBSksxqlWhfBTqDGjsU0FJ6TeAvdf64G+FirAFADBoGslmBwiZUBRSCzkpWy792?= =?utf-8?q?xwiYGDkekb0pXrFiQVvgyMHrkjeuX/EmSsOmLW7vaHHHpLHGSrCFYFMC4vpMfM6uP?= =?utf-8?q?qPbNyykUyw7tz/Tp9kGgu1zGPmwwFDXIQTDFLuiudzsQ0+EFu8xbvIfJLelIAL6ei?= =?utf-8?q?vq3UXdUudPk51mAYtkFiE/wlsQPTvcOWKcFCRKvXt1/Ssaa0B3+txQkZYWk1xx7xi?= =?utf-8?q?6zeLrOxjHh46G6WVZna073vQ+XeIIBEQjtqrVzRdg75WgaNMgmZM5iALVk923S8mS?= =?utf-8?q?cs+WgO5T/C/7OviKX7fUZcuzB5dqbginS/aU9My56roDcjRSy95sa2705ncXlpRP/?= =?utf-8?q?BtlL0tIDyavBtK2qPD3igjrPH+xEh6sSu+NudtpcYoEkjxbc7empiZNibXWRUPUA7?= =?utf-8?q?dQU1rrxtg9cLWXYEGl7sAfUolJ+Y5nPs45T7yrJbFpAentOxfVSogkOTLMfgkgdgM?= =?utf-8?q?ZIxusxn7QHQIIddmq8wsnLttzCMX+v2UJIl2bsieJG45CkBUQm+GbTGJKWXHn8ZZ4?= =?utf-8?q?AukdIJVEOgLKQxsxfWnKE7QEhSYXBXg7Z4ezAngpJ8gTsQ4qow65d0ltTdwXv13B3?= =?utf-8?q?x8VNGjJw7Csvva86rZrv7wB6AJlT9FE5VaK2BnU7/w7Uml+6TQvNQPz7SijQXQn6p?= =?utf-8?q?PBvmB74efUtQ87qYphYlV7Qa4FwnOpFytPcboH7OwAsRiHU6MlHc5CZB2sHI1KyFy?= =?utf-8?q?/EIHH/pN62uVzoKN7CnrwSLt3WYpZX9LC1aNfcMCAQxEX6XYSTzNK74vItRQW+oAa?= =?utf-8?q?cR8QzJBbCUvnBxi5FeffeUbheyZfSKacV1C2MVtfCN4GUDBTnpYNQkG3JpUsdNdaW?= =?utf-8?q?GjhaOGTeLU+8F6LGkrq4Giyd6ZF5VNZ+pZUb6FF4ZP9+vo+VDBM7tOJCGt5v/1fLF?= =?utf-8?q?tYGIdE+l94S/CtCguD0sLoDIVwKuctOBQPpBO1SstgryiBdDcwpHV24=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?FcLcXk+KR8/EyjbA?= =?utf-8?q?iMFAvUGadfjkf4f2cjIvSwH588MtGRgcxOd3H+C8NkuXoGvkvP7cyoOXcmz1I8aMr?= =?utf-8?q?cAMt9rQ0nsEiw9sTt7huYHuZc63Y4OvKv0Dynfyl4e98h843BUbjDtFd2kSZZojiv?= =?utf-8?q?iyL62BszI6zK1AjxT7kFsVv4XjE/DQfekv6AxBzjUSFEK2srj7WJkmBDvrZwV7lpD?= =?utf-8?q?phjmnEW1C1+RLJo2wuN2SuR37B1IgVDlsgb2p4rmMYKKBbyOC4+mbJUYB8FLph6KC?= =?utf-8?q?9nWCH1yydmMNueKc6nhZxx80QzLqsIGucjhGw03J2owYIju7FrXwZvDhbdmS5YXvl?= =?utf-8?q?OZxHWd+4U93Gwz9o5L1N4Df96bZ9JGZcUkCRKKnawTzZom1kr0VUkZWCWpbHkW6/X?= =?utf-8?q?bjKeMSUhYAXZmSDT5D3OcJSGxSLynTa4lVcGYozI5JdHVgwXvBCQ4iMp0LgkibULo?= =?utf-8?q?z+RNzYpIvraVsdoM3hYuun+WQOYM1k53ih6JlirmLOS21vZ6nfStzNmEF67HoSc0N?= =?utf-8?q?8ztjxgflBVEF3neuWNq0V0CHjxhrc+1LUWii/pfzheLyYa6i/vJ5t2xbW3VtgxoQb?= =?utf-8?q?AhP0piUTE/e64aEk1Z5jMTq2NC09w2rPfBs2PJiXXpey1wbnhLkBOiJgsICwYMWcz?= =?utf-8?q?Mha7pwgvQNsVcqfpKQTgfomXb+PqW+K1M2qJ2MCkZK4rA1afcbQ2zenT0PXUuosMf?= =?utf-8?q?naX3W/7Jj2ukccz3+hOU4cDzxMlTn2UCPo1gUvZNMT/eXX5pSgWYf5W2mhGfq4SvK?= =?utf-8?q?wMve74duD+drqQpsad9VpGJHSxZN8mGJ+O6oSjee6TIjZajAq4nLfiNAb6kFNRtYi?= =?utf-8?q?oFss5JqCyRhloW/oQ6dsXYCNTyT1yjWh/EMaeVP54Sv6Cevh47k03qsbvrahXomVI?= =?utf-8?q?u5Gr61u98cWexQpJ9ue0AOWe1HKIvxFETikSTeO8Nlvw3D7db7IBnpqUau1svlya0?= =?utf-8?q?cM4E9uF6fHPl68tjzim2O1ebGrcd6DZZaOZWBkEGv1LJ33e8aW8xQZlJxR1X1rmTn?= =?utf-8?q?dvB4R+Y60PSgQ+jEmGKloFvgJocTfRitfEKUd6NN48mvp3ySw4EhJ9x4BNB2xaUTS?= =?utf-8?q?zOaxnmbD3wyhCQR88FIXrgknlWNeH7zKHEwzJJuIWCAvk1w8c0xVpamHfB6TFYlEZ?= =?utf-8?q?YOyDYYOOWuz4/F5iz7F0Mz9hwKiHLO?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec01a323-d73c-4663-2c9f-08db0ba42781 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:19:47.0251 (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: ZAZBPX+hPi8RcgBMEISru1DNLrxDbENKlLzGTRPynbxkDFZAfEQYFopNMcwX8JKVeZQ+4H05RFrbN56MnJTs+w== 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: kUSf0n_RBSwb2mbVk3WNzB30xdZcuVkg X-Proofpoint-ORIG-GUID: kUSf0n_RBSwb2mbVk3WNzB30xdZcuVkg X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122003_174974_376811D9 X-CRM114-Status: GOOD ( 21.07 ) 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 d233f9e4b9c6..44103f9487c9 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -906,7 +906,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.*)) \