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?XTOz7Iv680C6ERmxqEwuqGKxxDW54LMjs6zUWRNBIlNLSZPV6xicJyBiXWVLTNkLC?= =?utf-8?q?mkBO5GXBk6GOz9OzdHLU1kNutAhAqyZCrHqZI7wyANIS0VjiJ2JfhLoe105ljWI8m?= =?utf-8?q?uHMYfLuiNuBEUPEHPZ1ajsipsr/UIbMGh5VSQ4jYP80bCcUUpw3im03mXW1wcgHqM?= =?utf-8?q?n110xXy+GjUQ/rwbc4tlxkZ0qiRXJGhyGmB7gXRGGav1xk7V3+yauv9ugOz3o/+bu?= =?utf-8?q?ZrhoPXe2rjo+p+LVodSheuiAgjju6SRU4aPZUb4BsuawknhVBS/cTBMvsG+f0EMTq?= =?utf-8?q?MZzlXGZxB+dffsPK4150ags3ey7zC5HSZ5cUBcmWlj21wQ2ldc31q/LzrxLPtRh7a?= =?utf-8?q?wdjMbS6C3gSXo9Heuhc/CQAMd4Z7JM+INEIUQ0Y3dLUliD+oQ08pdrM5hP5qrJc90?= =?utf-8?q?a3Pdt5xepVognl1NnqUIMrzZCKK0YrvuKet+kMqnsiMUpWY8fCcN8tKwP8V5a4LFh?= =?utf-8?q?v4bt2vYlE1G2feES8XNZcKO4hYpaiIzYPXPW9KQN76hMMQe731xSn5uWqp+N6ew5i?= =?utf-8?q?rm/N8T83XCoLz+P1uc2U29GX0tDzctlS55UhxGyO1rjRgpGQecNCl5vMGnJVcPpTT?= =?utf-8?q?sNQST9JXv0JFMX/cPVE8/HPAQX0MpPngx/8u9F9MVOvs5nOwP12GJU7ctufxSfeg9?= =?utf-8?q?aho2ZwMbDsqeJNhnxR2fIA8S4AuwXeO646r2VyeKGIBddv0K8wj1PzqRv66z/1jmU?= =?utf-8?q?nuD0jprGc9gs8qAZ3lK3+q3u/Ct6GqhZ8Mq8VVI7dg13rIBIjvnpe6a/QaQPNL5yx?= =?utf-8?q?NCx4mwKsPtFQlQaa2sIeOq2b/a1ZVJS0uhIokKps4FTTF3m+mV5vlmr/O77Y2Z74w?= =?utf-8?q?bCyZWm0prIvx/KGP9yp/11d2+LFG1ZUcW4jHRrQtwR6hd/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.*)) \