From patchwork Wed Apr 13 10:18:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12811847 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 5F3F1C433F5 for ; Wed, 13 Apr 2022 10:21:00 +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=ehNtfeouNRl3cwcpq3AoOfp7YcwG3TZksa4w5H0euFg=; b=qUF5rkbufs9YsS /jYFoUlDTE7T0lPX+QLY8i/g+I2iLQGOJGpNuAhuQPdfwipMHg6B6GurJ2HH+xcdIO6PMSIzFDLII UTX0+MGEMkWR4QaZQOodFF2L3No17wyKHgFk2YicsbnMbqwSUYAyWc+ELNA8VxOLx/6iq+TiyRkbR m7LGFpg2Y3ZdQR4BNoMtaY7pRDmxbsIMINmFYpeVsdH7xbk6g/2DOZYz+Z/qcfJGJg5hiQMOmkCgb /QXpcSHIhle/6rU8IOPKIO3r49gdwBPRQ9o8wuLs5abTlZ+QoytI55s5n/jKb4ejTFnBivkI6bJGr XRHfJogwhOs6yJrS6SbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nea64-000VHV-EE; Wed, 13 Apr 2022 10:19:36 +0000 Received: from mail-db3eur04on062b.outbound.protection.outlook.com ([2a01:111:f400:fe0c::62b] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nea5a-000VDa-3H for linux-arm-kernel@lists.infradead.org; Wed, 13 Apr 2022 10:19:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RsRfDDcpeV2Z/xX+XoG5Pdd86PpgBSX5S3+YTzH5iK0=; b=J4/fLC5H0yKn5c+BNYPKK5z4ER127LiY2Ys1tHO9GBWhz2SkqFA/0xBBhgOdTaMLdshTR73/O5coloqpsCSosaKgk8OXt7nXUArS0LQF80fvyNmqk5KILwY9eWk/1eUJPYhLV60SQhDKASw1rwAREb7CSgx85F/FlrExBSesCf0= Received: from DB6P192CA0016.EURP192.PROD.OUTLOOK.COM (2603:10a6:4:b8::26) by PR3PR08MB5628.eurprd08.prod.outlook.com (2603:10a6:102:8e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Wed, 13 Apr 2022 10:18:49 +0000 Received: from DB5EUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:b8:cafe::6b) by DB6P192CA0016.outlook.office365.com (2603:10a6:4:b8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20 via Frontend Transport; Wed, 13 Apr 2022 10:18:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT004.mail.protection.outlook.com (10.152.20.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.19 via Frontend Transport; Wed, 13 Apr 2022 10:18:49 +0000 Received: ("Tessian outbound 9511859e950a:v118"); Wed, 13 Apr 2022 10:18:49 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 09bbf7c87f3251fd X-CR-MTA-TID: 64aa7808 Received: from 65ead49e5221.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E2D0FB41-FC7D-45D2-BCE4-9F530CE6A5B9.1; Wed, 13 Apr 2022 10:18:42 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 65ead49e5221.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 13 Apr 2022 10:18:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AJfWgVZP7ISv3poyJyCpRcFP38pniTVLnCqtMnTA/aDE+rYg6gt06b4pRwxZUqweB+yGSRIr2Zz5ysDNtbWpqm2CCYjkZ8ziuHLvszvKdMLjuR3xuN6TY40ujJ4kRBvg2QHzE8GfgPd7CrWVkv2tMEQmEyp46+9BO3FaM1eh2SRwR6pUfEvUTQL2BYM35dc/26PV9c9wfmtUjMAW0LSdsw7lX8d/aRc/RUkOzsgcekGOdRNq1lU4gQ8Cy8AOah4Uhwy055IHtX9YDTkRiq2Ykoon3CWrVDU5GndUUBCvpovvtSkNE5B78sKg4LMuj4iFafvsFvA2PgqGvMMXj9x/ZA== 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=RsRfDDcpeV2Z/xX+XoG5Pdd86PpgBSX5S3+YTzH5iK0=; b=TLWn8v5mv57GJTHABEQ+kkIBMFJaL9f3lHn1FX2hEIyDEU8lobFpZj8LihhHR1Xo/5dQplPgpeFwZQmkaRTbSLwG2GZV4jk3UQBQ/OMXnThkpQ08Da2L7Rk4LYk2e7cBR3cLzW6W2C60x0E7PIhrK5BOrGwBwK9p/dO2PLIz2LXciM50dAR4z8LxGPyQeJaoyBd2Xtmm5DrIxAgunLHKaysiO1FPHwbMfawXIbBvXZn3Fd8KWIHnqB5b1Im7G4DX57TiD+PvqS0SFyFa0v8PmSBEbJMKY6oijZJj8HLFM9aufgYVjjbyDSXjEaqrPRUV9NGw+Zz7ifK5g0DvT5D7Nw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RsRfDDcpeV2Z/xX+XoG5Pdd86PpgBSX5S3+YTzH5iK0=; b=J4/fLC5H0yKn5c+BNYPKK5z4ER127LiY2Ys1tHO9GBWhz2SkqFA/0xBBhgOdTaMLdshTR73/O5coloqpsCSosaKgk8OXt7nXUArS0LQF80fvyNmqk5KILwY9eWk/1eUJPYhLV60SQhDKASw1rwAREb7CSgx85F/FlrExBSesCf0= Received: from AM6PR08CA0048.eurprd08.prod.outlook.com (2603:10a6:20b:c0::36) by AM7PR08MB5494.eurprd08.prod.outlook.com (2603:10a6:20b:dc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Wed, 13 Apr 2022 10:18:41 +0000 Received: from AM5EUR03FT058.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:c0:cafe::ec) by AM6PR08CA0048.outlook.office365.com (2603:10a6:20b:c0::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20 via Frontend Transport; Wed, 13 Apr 2022 10:18:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT058.mail.protection.outlook.com (10.152.17.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5164.19 via Frontend Transport; Wed, 13 Apr 2022 10:18:40 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Apr 2022 10:18:44 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.27 via Frontend Transport; Wed, 13 Apr 2022 10:18:43 +0000 From: Joey Gouly To: CC: , , , , , , Subject: [PATCH v3 2/4] arm64: vdso: enable orphan handling for VDSO Date: Wed, 13 Apr 2022 11:18:30 +0100 Message-ID: <20220413101832.4594-3-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220413101832.4594-1-joey.gouly@arm.com> References: <20220413101832.4594-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: b4141466-b8c6-4b86-b7ef-08da1d37006a X-MS-TrafficTypeDiagnostic: AM7PR08MB5494:EE_|DB5EUR03FT004:EE_|PR3PR08MB5628:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Mev6B9CdRPoaC2bjRmfxXO+XH/ag/NrarainVteTtqjbsIPnO0HJJn+oSOVsZaqZTzK6+7aX5xfVAPJEgT0eiyVoaPtHEjRiy2yj4leQeQ6qZXas+vc+S3IEOaevTFmGcGOAjk4CsGZkVFTC9+JWiFEFJ7VKtHsj4ONO56C63nRscVaDRFF4HOIj+T5OQjw86r1k74oSKvNFMrTOKlbRNpAfWSfa2+L6sTfN8PI6Aa8Sk++lZsYPVk8rHjSAg4S53Pktbq8X4XbryUIi2NJHp0TBxXR9bCl7fgGRuP+ao8GhzOmGGk6fuh1GN7KyPuuMYEE9zpaMaJ5p2lSsI51x5HPo7Od1HdPrEWXQR87jUikSydPDNhp24nRuQTesrM5o4dmUEurzIGv+Og1SoDf4jApQQSfEr5azvhHI7pRftEA6NwUMmxIbrnhJXmqK6imhCr/991lpRN5V+kYXp8/RJqXewESOhZ/jdP/q0SGMo8fuk8pVLiVEBY11QMnbrPh8qxTVVkMHNL1Jigr0HSotr7Gh3ubuxjv/+sd5/tdagidSdz9qiJ8u1E5Mcq6ijts9gRuAssmAnEaLfsOPxcajfeDwpJBERlhv/LJWGR00T3N2ZEts7GlRFeCagJr9Iqn13Q02UrzkLSzqu9+PpEvrlN8NpvZcU9DrRCAUvXvkNjBo5MROw7c49xQuazymoEh+9tYDTnz4291nDA3pA3aMTw== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(8936002)(70206006)(70586007)(4326008)(81166007)(44832011)(36756003)(6916009)(7696005)(2616005)(508600001)(186003)(26005)(54906003)(1076003)(47076005)(426003)(40460700003)(2906002)(8676002)(336012)(36860700001)(82310400005)(316002)(5660300002)(356005)(83380400001)(86362001)(6666004)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5494 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0d2afbd1-b9f8-46e4-10f1-08da1d36fb3d X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UtvkSYnfSAh1DQmPHxxn7Fgy/LYDmsb36yuadZ6YOqQi+SFXszzlpi3B0zH+XWyUQSnJfFZmWMxwy9m0U3u/RRQEGubD5lEt3byRsYG+lYI/rBJ7dcP1SFxvAbvEBs1LS4NdbSTaBifhjoHGzBzuOgown/GkIuzq9hDC0b86/8/5kRGtDA1cjmVtKmptSEct71ugxmzTHMHcAJ2fwuynIkiFi0asH4o2Tx/+/gc3R9KrK5m/F6U4Xh1qxlr79nb8ckC4myB/nC9wyx37geI2HRQi0atIrNmOjk9ijKyeQa2piYSuIIl6YoFuYmulmY08ISLyNLWB1w5WR/zdraat0ZQYhP/f3OEvol9FPdQW9wa4q4EwwcIzWACy0l2gfOwGfCmW78KAybbXeKmQho1Xl9NCwTyLFV4ISXzvUgCUbe3h5xTmEPZRfNP4Sl51Aa+FDmNvbD0GkEklqJckVS7EsxM6j4EqZT9zohkVgtBS6Mt3G0vGeRBunxg3e1saAhsbCfytPcjdQfXnKSj27YJIE5zSrjOOsSpLp2ggn8wzFk2P1wK7tRjiZ8/7ONOb82SABE5ebFafrCjoAFs+RpTQ+XXOlJp36AIxcG+AMcHmrWrB4J14+kmoiKdOpd9+x1bV5R6DZ63+DGFb13ejsBN+WpCD909nXFO4VU2x7MY9BupUoLpYTrX5tn9foSdtF+fn X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(2616005)(508600001)(47076005)(70586007)(186003)(44832011)(36860700001)(54906003)(316002)(7696005)(8936002)(26005)(83380400001)(336012)(426003)(36756003)(4326008)(86362001)(2906002)(8676002)(5660300002)(40460700003)(107886003)(6916009)(70206006)(82310400005)(1076003)(6666004)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2022 10:18:49.3590 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b4141466-b8c6-4b86-b7ef-08da1d37006a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5628 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220413_031906_180446_1BBC0C8A X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Like vmlinux, enable orphan-handling for the VDSO. This can catch subtle errors that might arise from unexpected sections being included. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Kees Cook --- arch/arm64/kernel/vdso/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index 172452f79e46..623d9ad2c717 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -24,7 +24,13 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti # routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so # preparation in build-time C")). ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv \ - -Bsymbolic --build-id=sha1 -n $(btildflags-y) -T + -Bsymbolic --build-id=sha1 -n $(btildflags-y) + +ifdef CONFIG_LD_ORPHAN_WARN + ldflags-y += --orphan-handling=warn +endif + +ldflags-y += -T ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO