From patchwork Fri Feb 10 20:18:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Saeger X-Patchwork-Id: 13136359 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 B233AC636D4 for ; Fri, 10 Feb 2023 20:25:09 +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=6iXV40YRMssQfV5UgiWqLWkYaJoYVO/4jIApzKZj6Z4=; b=lJmLEceyjfVgUH Ics6ceTIKmMLGQBqa9VPB/AoVUkdlWbMVM+3wkK9h7nFsxOovbYPT4c0nKg/zlkwKRP5mtRBPthQM JQ+BpS9nUBbPiWkrioRPgxNR181mSPBeYPQsUTfOF1Xo9eu43NJVWq47YsgKND64a1WUVyDhcHs39 qsiSV8ndusS3ocPh+Sld7beaRX6hlkhcL4wXyXj4vlFCX3yWkDMKmEejtOtAOUDiNqr6gi4G9OYeg f6l95+SMEJbiFvmfeqyqirCab8jbZpw132e8pe/BqqohU1x0trARFWzJtYSTui4PpTQ12y0+oNgQB Y33m3a6pCLIZsMSpWr8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZx7-007NXB-0s; Fri, 10 Feb 2023 20:25: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 1pQZrQ-007LYk-26; Fri, 10 Feb 2023 20:19:12 +0000 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31AI0GNP020903; Fri, 10 Feb 2023 20:18:58 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=aM1KW8fcv9x3Lh1wkqmDnC96s4GncSh1wfFQnGb8NXs=; b=pRMkbVnl9jZUPG9nsEnVyp9vQQ3J3nw0cNpjTm36nO6sA1p1lYX6kJu5ZVAVvVbVTmIp /OFu3uRMz347DOVJDsOb+oiLDGi7YrTiokJFXbZHi7pcekIvZfuJGilabkNfX9zQ/Z3Y +1ZL1vwSjPZxlXOVcn3HopLKuT5c8UUxm8XkUYHBTgn8C6PcsmVfpJTBv0c8D7AVWd7g Z40GECzAZs4UUj3VcqGslVTdrQEKPlm6mLy0UObVibYlPX0ouwkZBoCCC8+pw2dGvA2W CFEsw+wpk8eeTo3eEcjdH0r6aRH0sWOAuHtCtrBsA+yKt4Xzq9ZNVr/q5BMLST8ygutN Zg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nhfwue4df-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:18:57 +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 31AJ4KUq003058; Fri, 10 Feb 2023 20:18:57 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2102.outbound.protection.outlook.com [104.47.70.102]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3nhdtb7gnk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Feb 2023 20:18:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xa4+iGR9JZv69PSqnm+QkarefCirF4FbelCO84BQJoqOz7wxDh1LHDIQfQMgAc+HvN6stLGQ85hC5mvEJA4MFI4IzW8nzN0Lyt3aoJsJurhFpaQNtFy0JD2dhRb3fJQ2RhchsHODd9bNRa/mHlIulLjGf77tavvpQpEeszsGqiA2kqcYKQy5ivXFVTsfZdIZt/styL/5yrGQI0bJfTQmqbgVxuzJBURH1HVojleJgIqRWd6HusR8ESOqXovVS2xEU/KWGWlVnVOk22IHVFRKfgp4MTOMILA+jFfDWq0NKocDxS181mOHr5tyxwC2nql2FDA9+ZT1fL4LvGlhPD0jGA== 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=aM1KW8fcv9x3Lh1wkqmDnC96s4GncSh1wfFQnGb8NXs=; b=mhGGYkSAt5PE1iAhPEmtTX9c35JGDbTnXJ7VAhe8eMz12PBY89jBxwSHhkfehlwwSlYq1OI0ihVvLFCZ55JNbVRxRNGREjWZL0f6/dhLOGkvkxl3bmtJxT5lgSdVqnoDjDjimFtuwUM6NbgpX5hWM0n2aGBrfG53iKoaLSqBgBYQpCKGFCJpKANhwSRd55+AiwgvKV4+UYUImBn0eNLlcVlcQ1hAXMwucDbpENQStF10AqrAPnKgJbqS4LzAD12BFbCqKAH9hZq8VRlhceRlo38wH61txfi5lRPgZ8ZUNOJDIewylxfdSC1qpdnGp6/Fdkk7dfIPI/ymWziw15ovTg== 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=aM1KW8fcv9x3Lh1wkqmDnC96s4GncSh1wfFQnGb8NXs=; b=SpGGF9i+r8cZtv8NMLUmBIVoGDrP4JMlq8brshsRW0/Asjq8wHWDwFazbyVt3g/bbV9ULb+MXBAAhXnd8hOM0PHX2JHeHWOWxN6HQceHsQKVXDcm466i4Ja/cmj2gjBl3gThih0N+72iCRPclma9UPBeynCVZpGKfLWd8ErFCg4= Received: from BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) by PH7PR10MB6083.namprd10.prod.outlook.com (2603:10b6:510:1f9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.6; Fri, 10 Feb 2023 20:18:54 +0000 Received: from BY5PR10MB3794.namprd10.prod.outlook.com ([fe80::f37e:ad45:7d9e:d84d]) by BY5PR10MB3794.namprd10.prod.outlook.com ([fe80::f37e:ad45:7d9e:d84d%6]) with mapi id 15.20.6111.006; Fri, 10 Feb 2023 20:18:54 +0000 From: Tom Saeger To: Greg Kroah-Hartman Cc: Sasha Levin , Naresh Kamboju , John Paul Adrian Glaubitz , Rich Felker , Masahiro Yamada , Ard Biesheuvel , Nathan Chancellor , Dennis Gilmore , Palmer Dabbelt , Arnd Bergmann , Andrew Morton , Tom Saeger , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org Subject: [PATCH 5.15 v2 1/5] arch: fix broken BuildID for arm64 and riscv Date: Fri, 10 Feb 2023 13:18:40 -0700 Message-Id: <20230210-tsaeger-upstream-linux-stable-5-15-v2-1-6c68622745e9@oracle.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210-tsaeger-upstream-linux-stable-5-15-v2-0-6c68622745e9@oracle.com> References: <20230210-tsaeger-upstream-linux-stable-5-15-v2-0-6c68622745e9@oracle.com> X-Mailer: b4 0.12.1 X-ClientProxiedBy: SA0PR13CA0002.namprd13.prod.outlook.com (2603:10b6:806:130::7) To BY5PR10MB3794.namprd10.prod.outlook.com (2603:10b6:a03:1b2::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB3794:EE_|PH7PR10MB6083:EE_ X-MS-Office365-Filtering-Correlation-Id: f469b6a3-a479-47d7-98c6-08db0ba407ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OwsHmfP5yhXlq+yX1XGwEC4FQ4rlSzZntdZFqW24mk5F/wHbtFAycO3eeKuITm8RZ+0rIDr2uqkJxjexntk3cLxhO9Yw2l03b/495VTlSVuAB8kiqe3hp+fddxDbuQP2OT81zjpePzKdae3NuRY1/1UdRCox4vqH2bmAD3ONI99MVcj0cXSlJJd54RWFm1Ihug8alIK1TbLU1msPEDdsqBQ22KSBOGMM/pteGgl+j4ndruO+Vd8ygBKn7ujqipd3FMRf6T7egOcu2qu31yEYTlN+Nu1sTL6Sk9DEkp5B1LeYWyB6kfisMEvPNN/76gW1BYuqJ2Jj1QFTKmq7IwlWtMQXKMagCrDW/uue++bnipC0a5UJMecPIaDfRLyzsNmvR/ax8f9s3bLkjHbt/w7wsIceV7s+CjNEusWB6P3YJUiDmLKTTYKb1PnO/B6Zmpdy0GAQNqobNuUWaKKrKl88ECXJ2DL2rNWpZwTsLciE/HAiMDuyOJ0DKRMfOvGQ5rOa7OOF+T2OCZ5kOigCwjx9O0sWkLVSqF9aO/aAa0PMqNipGC2AseVm0KX7uIc82wTNCuT/Rf6N+ADgjBVkakKhjz4pg8FV8Yq3nGconDrR0MnK3saUMvB4yWczeLJHVYwt9KEFDEX8/enbKYg9Q81PZDM+TWdRHK6i9Pm8V4s6pJY= 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)(346002)(376002)(366004)(39860400002)(136003)(451199018)(86362001)(36756003)(38100700002)(6916009)(8936002)(66556008)(8676002)(7416002)(6512007)(6506007)(66946007)(4326008)(186003)(66476007)(41300700001)(44832011)(5660300002)(6666004)(478600001)(966005)(6486002)(316002)(54906003)(83380400001)(2906002)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?q6BihXUEHdK/KHTqWV2TbTDDOKkK?= =?utf-8?q?A5kPhzlrKEgr2zwjS/MhIeS0HlKYE199sTEIBlXAmscdZ5M8m4BLQIuYEXAaSN+v/?= =?utf-8?q?nrX32x4TvaUN50KbkaM/HvwpwCPDJFq4AFt3WIzPOgBBdb7lNQC+Anv5h8YD2CTX4?= =?utf-8?q?nSatBDriUC7TpLzID9oRfKJBFzsgbZ/PFdaCILL8lsw6UxEDrOkGM/1Z3cufRd4tv?= =?utf-8?q?1l+ZXCXKk6v9KhTWitdYpKb8TelWYWSrqwFVWV9aq7TPW4hBJlZtg0/elSsm4nsmJ?= =?utf-8?q?TAmhk0PLuf6siLwXHCQVtUWGd/EdefaMus40WeAFkSkSA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Jk2xum4DGHsogrh25CsWR8cMs8MxSCIDmL5A?= =?utf-8?q?HHS9TtsbBKqlmU5n62Uymi5857V0K6O5Bm41j+yd/JzOIJin95QCwwgJFbkcL01Ca?= =?utf-8?q?sZ+uHLZqPjE+VcL58KJUJtgU44EAwfMbKiqipM8fc0lwC8a414c5IH5LeegMpiP6g?= =?utf-8?q?nvu98YVmBu/YO2EYlDMwvw+MIs6APlPBbdVo1G0mrIaVshkSBp2IpDurcHo/suqTQ?= =?utf-8?q?n6JBkZsCm5B8rlW94PDz1B3fv5bP3rBbnsYMN7cBQ7sEZzLoN6tRN3Gi4z6EhgvOR?= =?utf-8?q?X8Hyg5eVNcm+fTBoiWhdklqCHPxKJjsXst6Xu+Pn1yLC07n8PQdOQjmv0DsvoXo6n?= =?utf-8?q?SV69nuXuUIPkB47GM7cbOl95fS50MB0g23SiwaJDKbejsgJOzDkiXENcJ1HSemKx7?= =?utf-8?q?zXDlJ8uRqs/7kPEucmOV+NO+AVistvJbbrY2eMKzpmpghQ1HtoszTvoqvXOFnW4kA?= =?utf-8?q?qmZeZBGpxIawgOc5eJPQT+OSsu14KcCcWsJMm6EvixSFsY0pZqk7ywzJlXir0DORz?= =?utf-8?q?pgOanJlrBi/0C7ZeMh1TJD3yrAG1jvZcpIHOmtzkPOeFoBnhOdFrFt4T7EqiY3TDV?= =?utf-8?q?40PJEdN32jQmOzM8GcZ7mlj8y4OhDbjQNEoutpnYcznT85IAWjOlgY6L54zE+igCV?= =?utf-8?q?8deOIdIkwJ1MnoNtQ2mfj7gNbgYhExIQ/SrhV5BM2haeKdiNTOiBi/HBgpS+penV5?= =?utf-8?q?CA7VbAN2Gqaik/9ugBD534IFkXsIX4?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f469b6a3-a479-47d7-98c6-08db0ba407ea 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:18:54.0601 (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: APyFQ63QZs6gmh02jHjJY/myGbobLlDcqN59E6JJsskLesKm34dRuHFbH8nTB3sh6FZgX81ZQrtN+8d7bTeFQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6083 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: wMLQTl-kvQVt7gJFxMf26em6RDdSHm-O X-Proofpoint-ORIG-GUID: wMLQTl-kvQVt7gJFxMf26em6RDdSHm-O X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_121908_182895_91D3402C X-CRM114-Status: GOOD ( 20.86 ) 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 e28792ca25a1..8471717c5085 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -903,7 +903,12 @@ #define PRINTK_INDEX #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.*)) \