From mboxrd@z Thu Jan 1 00:00:00 1970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BACD0C001B0 for ; Tue, 8 Aug 2023 10:27:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3FE096B0074; Tue, 8 Aug 2023 06:27:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AEBD8D0002; Tue, 8 Aug 2023 06:27:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 226B78D0001; Tue, 8 Aug 2023 06:27:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 130726B0074 for ; Tue, 8 Aug 2023 06:27:55 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id D14D8C0583 for ; Tue, 8 Aug 2023 10:27:54 +0000 (UTC) X-FDA: 81100561668.29.B60113D Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2072.outbound.protection.outlook.com [40.107.21.72]) by imf01.hostedemail.com (Postfix) with ESMTP id CA0174000F for ; Tue, 8 Aug 2023 10:27:49 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cw6GYSFj; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cw6GYSFj; spf=pass (imf01.hostedemail.com: domain of Szabolcs.Nagy@arm.com designates 40.107.21.72 as permitted sender) smtp.mailfrom=Szabolcs.Nagy@arm.com; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691490470; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UE5kPNIMlO4tcZ4nCWzcUYTT04UQF69YFkcWGymoffY=; b=azeXUp5wa3WpgP/+r8RmZhvVMvRyLcRSRMcnTSuQDW22FkMdKEYVVtaVlCBeDddDGWVisz dUOU8V8rSEIltawxIOAGjCMlMrrgjeMrQqhAu+kdBuS9s4G9/RVVALhy+f5liBE8JL6GTy hPu8CtJLRZLXLxQqpC28IuhqR7dNlsU= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cw6GYSFj; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cw6GYSFj; spf=pass (imf01.hostedemail.com: domain of Szabolcs.Nagy@arm.com designates 40.107.21.72 as permitted sender) smtp.mailfrom=Szabolcs.Nagy@arm.com; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1691490470; a=rsa-sha256; cv=fail; b=xYnC5SfgIj17oiLGv2sVpnceqBmHthwXjy4zMe/t0ejt3OlTBDTMInaTdIIEw2N/TQrhbK A/+p5QgvCwWzmaTzzk7pl6VdnNJhbDS14tHqIa4weXguhfOAih2iXtteTlvkqgH2DpTfTd PdOy1r6HWKqvhqrXdWrjWfoXoL7Pl2Q= 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=UE5kPNIMlO4tcZ4nCWzcUYTT04UQF69YFkcWGymoffY=; b=cw6GYSFjV2cbwC9Apj0Lx0DyfNq9stmyh259w3IoSM3ItTNiw/QxIFXbE/X+RtemITZeaKjiiiVJgn/h2nF9/5xzunGqX8mOTDNjFckztylCXXQz4323AiOQ9H74kvgKnyU3iCGqYebQGYwWAHYUEf6+kDkkeOhn7+WdAPftMaM= Received: from DUZPR01CA0188.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::27) by AS2PR08MB8926.eurprd08.prod.outlook.com (2603:10a6:20b:5f9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 10:27:46 +0000 Received: from DBAEUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b6:cafe::d5) by DUZPR01CA0188.outlook.office365.com (2603:10a6:10:4b6::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 10:27:46 +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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT017.mail.protection.outlook.com (100.127.142.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.16 via Frontend Transport; Tue, 8 Aug 2023 10:27:45 +0000 Received: ("Tessian outbound 997ae1cc9f47:v145"); Tue, 08 Aug 2023 10:27:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1f1ba2880768a8a7 X-CR-MTA-TID: 64aa7808 Received: from ac7166f9e101.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8898ABC7-85A1-4579-8BB4-BB77337FCF53.1; Tue, 08 Aug 2023 10:27:34 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ac7166f9e101.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 08 Aug 2023 10:27:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fsemYnMKlTdajE97yZpVtiHGovEaRuF6z/BOMUHkeg1nIEBf45gp7He5utI5N8cJ4EFPRt5dALNO1R5JpO1XBXMOgaom4YfcaKCOcv50H+sLMTmuUfGeQ7Ntif4rj/1TePlNs+J0LNS7hbfjxAZExE+mj1raXvakjCJa9M1hX4IHBIpwBo4KEeEn9xrxOtMozf9MvTwJtZmtSfYXk6B5Rm9eKrMslwObE5hy2YVgf6nS161pgwLASCoEoDprfZhebIa8f8H6lMZX/TkUvpKSiwJZHlvEm+1SdiV+S84brIuItTBpvA5G65qgKyV6UcoS5LHJ6jkvgXhjtXLVHEe7lg== 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=UE5kPNIMlO4tcZ4nCWzcUYTT04UQF69YFkcWGymoffY=; b=HM8HI7gP+xw5gj2zv7iNNiuSn4crolZjxTLpjlTGq73gb4lqCd88Pg4XQ/qnLGAibwlYiR2FlO1TY0SSsBjaFdtt+cCx6AzM9Y3Th1HA0KgtJvDVpUB6TeQTquTfueXSGbG6t7QV7oJtCVmlG2ydR1c7cRjO/kUGb9jbyFoiFI4XESpO0OT6Qab1Yq10SP3yCljoeRpF95Xkbf6rQVszwcRCrP0HTce1NdLOV9HpSL95GubO2nN5a6zrY2BQsiYArbVRRPlWTWuR3i7Wxa5A/jY6CN1eexhjBwtbiRwuzM681+WS5OJ7lhkO12jnpSifdH2ZobMvMRIXdCQLew6Bug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=UE5kPNIMlO4tcZ4nCWzcUYTT04UQF69YFkcWGymoffY=; b=cw6GYSFjV2cbwC9Apj0Lx0DyfNq9stmyh259w3IoSM3ItTNiw/QxIFXbE/X+RtemITZeaKjiiiVJgn/h2nF9/5xzunGqX8mOTDNjFckztylCXXQz4323AiOQ9H74kvgKnyU3iCGqYebQGYwWAHYUEf6+kDkkeOhn7+WdAPftMaM= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) by PAWPR08MB9688.eurprd08.prod.outlook.com (2603:10a6:102:2ea::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 10:27:31 +0000 Received: from DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::adb0:61cb:8733:6db2]) by DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::adb0:61cb:8733:6db2%7]) with mapi id 15.20.6652.026; Tue, 8 Aug 2023 10:27:31 +0000 Date: Tue, 8 Aug 2023 11:27:16 +0100 From: Szabolcs Nagy To: Mark Brown , Will Deacon Cc: Catalin Marinas , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Kees Cook , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 00/36] arm64/gcs: Provide support for GCS in userspace Message-ID: References: <20230731-arm64-gcs-v3-0-cddf9f980d98@kernel.org> <20230801141319.GC26253@willie-the-truck> <09b7a94d-cc88-4372-85de-52db26bc2daf@sirena.org.uk> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <09b7a94d-cc88-4372-85de-52db26bc2daf@sirena.org.uk> X-ClientProxiedBy: LO4P123CA0689.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:37b::14) To DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB9PR08MB7179:EE_|PAWPR08MB9688:EE_|DBAEUR03FT017:EE_|AS2PR08MB8926:EE_ X-MS-Office365-Filtering-Correlation-Id: c3f56c2a-072f-451b-68a1-08db97fa1b2c 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: 9cLDC1fUdsJEOGiuPVBjxW2Q1857Uegdfr0Jm2ggFbE+jiifRedqBudePRSxqsB4XQ6GHpP8h3OuK40TyQKga5Rud2k0nGu/WLA56N9jDUM9kisrWMxh1PG9bvysG7Ux313pexYzM3yq8Ofx7yi+Yr6TGnWqqWfDt/R9Qj0laqC93TW18GEQ6GnMHEg7Gl8KLHDn8wPLz+K+uZ3xYaLoO8bJ48r2UTVMiDM3RQRhqpOOgbnkHkk4xNgbjdfHGDLtkSTeGFpkgMM6fUP6WpxFX9palb31LAlcJe009WsnAQoCJXs3fcXcckW6kL60ENSUbaaExSxXfTvd4nQGNgJEP8YXejtm2PHkbPvhbZXxEBPRyf58nhfw3m5XsAkYS+EXG/Na3YvpShP84kVHap8aac9MOiHV0TyxbDEZYGJhU1CkZMgCWneqdfMQHrK9PLYR9uPiBoJ94im9gZW+4IoKETNmxegyNkoxCxDiR++HojFOrYZIe9rG807GboXk2EijNCJAACtdV8Q5QJT49KfUqGHxJq+BHYHlfQTOt+3l11NmsJzGKJpaGZ+DcGMkQIlD X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR08MB7179.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(136003)(366004)(376002)(39860400002)(396003)(186006)(1800799003)(451199021)(2616005)(36756003)(6506007)(26005)(6486002)(6512007)(6666004)(478600001)(54906003)(38100700002)(110136005)(66946007)(66476007)(66556008)(4326008)(316002)(41300700001)(8936002)(8676002)(5660300002)(7416002)(2906002)(83380400001)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB9688 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 904beafb-c8f7-4eb8-9f6c-08db97fa124a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W/Iw1OecXz5Az+9jTi8V3rt9NAQpuDi7zIxJtHy9by+uybAmF7YURUTFcHPjk1RGMzlyjJtkJpzxcHai18Oc9xJtjHgFtshXpVKvKhn4r+9fCfx9AiOF1IkWn/F6CkHov78X2JQjtt+240CrmOdL+MV7Q1orwthPx9zqhSXoS8XIjXdYQgwW0VICDImzmmcImlKIZSSjj5bxfa0t/4+1wmDoqpEmgxRTOWe/jtqnBYfXPA1V75ZZJCBR97tP+Z/My5mIn1odKJ7VgVnFswuFgmmAbCHGF+32D5sw25g/toq8h0vG47oCKfZV2Mv6tMVYkbX4kpUOWPPfuwjFC/HGHy0gJiM/le6YJiiNyivumJiTSqUuu88DKtpNEZZDTHyQ+GlxC2wlyla+9Qy7lRtKsKpdhjMIUkMn62nmQJ/2ij6TyEx9LRaFtWelyawWNKGv3R+Cf7Fp3QGUHlqA4h0uHdoNtuQBw7aFU9KD9/XfpAILhsullglSnJks86t4sft/RPZlz5PZcHSYzTejbDJbsR7RjPv+N7U8bAuiiGDuY9x8OWrGu1TcIQwD9ppQudMmzAZl2Nw8vDCknNviFksR+tleEUiKBN84gPID1nhTE/pCb2/bI9vOoNHBKydywWimM2nTB6oyoeksgBUYVYPEcNYXM+257v5u/oyNWdCOWG+ZLr+wFlMcPsG2EkdkXPnoRxDo3Q3ImJK/F+a+uSDaUfIBhySF8o9kFJF5k8ljGI3cTk53klUHPNt1c/JHuwOv 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:(13230028)(4636009)(376002)(346002)(39860400002)(396003)(136003)(186006)(1800799003)(82310400008)(451199021)(36840700001)(40470700004)(46966006)(41300700001)(26005)(107886003)(2906002)(5660300002)(83380400001)(8936002)(36860700001)(47076005)(8676002)(2616005)(40460700003)(40480700001)(336012)(478600001)(316002)(82740400003)(54906003)(356005)(110136005)(6506007)(6486002)(70586007)(6666004)(86362001)(81166007)(70206006)(6512007)(4326008)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 10:27:45.5633 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3f56c2a-072f-451b-68a1-08db97fa1b2c 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: DBAEUR03FT017.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8926 X-Rspamd-Queue-Id: CA0174000F X-Rspam-User: X-Stat-Signature: gw8d7ri4dqxc4jg945ap8bsmy4wtgwdt X-Rspamd-Server: rspam01 X-HE-Tag: 1691490469-59361 X-HE-Meta: U2FsdGVkX18atR3nKoEBcDM0WPd8ePZQOUEUP165AGbeQAG27IPIuvIDlobI8PgDeWv3+xzrQmBSycgvvZvZ50aoP2sXRR0OAkF0YZslD/BaL3pbA+6kCBF8wtcKUsWUEVMnoSj5Tu2TsEzmsSCJZiJx2NsflLfNZxeiG3OCzD1aP2O9WlEMy28gWihDTUaBNYRvt7giZ1p8TQBTEkCYFaXWsQQigoPXgXHCteisTas2NMFsOVK1qsPyENfGnZdQhCC7NWZOpNDCSaDLGmuHxB6eFjLsgyTutY6UTyLlbdsr+o9rJdBMuX+CCURh7u45Zxx2nXln3SASdJp8u5hC+uGCXcAnXkPCeE/PuzaoG9bqKq8sqoQV4En1i1s0sk1z/TY1BSXZCjv6J2ufmhjcxwlcED9Ky5I8WURp42pzVGTCj3M8nL3Kh+B4d5BLp7TFt30UhqQa0lHd/gKYwFtp8Pvp4HkFvzWwKHKoNogima4XN1cppkurlRu0ubRf5d14iZzxj1ZTw30XH1J7UL2f/fiRxbgD7BL66r2zWP+4xKgfTyZlKfkGqmsybgeo/p9B8n7+ckFLYEr/BDFS0ZvCosEOGKxAWRnUPobRoaEw5IwTQAQjr2e1+3PG9JRnojaCyaSz8jSmUh3ZOJZnKrTkPizJy4iOl0tLuvRaO5+ilTCHUkRxBWQwWImuiNjEYH5oGIBk/4+8Lbkb3yZro0sl47ypZsfYTYS6DtHlusFj1sGXIYQqOG78L2Ja3wEhTg+Hie6oPz4zbPySVsPpmjeu0Klyhtu8hdWZDzxM5qcR+zfHM/TGokUF8hRcdwjxZsMy/9+4Mu1ZhWaM7DF2wOFUJfUyr7/X+FNiIy/I3PM6qDONUwU4ynNueDeJdUwvh4LcEhSdiWgA6Sc2p4sbPbiNKPTS3R4/riHFkSXitmOgM86HdgXO08LYl5R4sxU0S/9PYza5L2i44zH4gBqOpWe 30YDNeNF SNYXGC/jScGJhDygljr7YviKeEx4jThg+HbO4MLf/sBfVk2RyOGh0i3/82Y8sK+HEwEYAvNNuF+Nx3xv6mADITlcaCCx2AW3UsCWnkcASG3t8eCx7oOcw936ok8WlANg6yZkmMySJ2PX/cOJcYCMqd6pEVjn64uG0+ZFOOBEriqraxmIxzT1+CsMmL72UmUZ4uJZdbln766w5skODBA8n89dIIzJ6nmhbVtdBxhibuI+uYGHRWsyfM3PiWhuaVkDn4QXDhx/ztdd3MmiQ+J6qTpfpAuSRNQoWhrdlp6VNvZthRqb06OB5x2Q/MY2JA/3NprOeVBSFaA9MJXdv8flKvbQnDnIda5f5dWpggqbMlCp9V2bBIjAKzpd25yGKpkPt4/xcvDWt98Tkz+KqYTVZG1qoLiNK5wbG/STXZIwRBngFZoD29wlKFfEspuBTxbN4RdUlZxEPD4K1EWFzXZ72bmqJC52tGWGJqZd0YRTkoE1SQ3BT+tHwDrM3KEJCbOFnTv66DsAVBjcR5cU4sBMVxNSFBIp5i5F9apq5YPDjcT9RWFXycHNC0KilcBj44EfogHxp X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The 08/01/2023 16:09, Mark Brown wrote: > On Tue, Aug 01, 2023 at 03:13:20PM +0100, Will Deacon wrote: > > On Mon, Jul 31, 2023 at 02:43:09PM +0100, Mark Brown wrote: > > > > The arm64 Guarded Control Stack (GCS) feature provides support for > > > hardware protected stacks of return addresses, intended to provide > > > hardening against return oriented programming (ROP) attacks and to make > > > it easier to gather call stacks for applications such as profiling. > > > Why is this better than Clang's software shadow stack implementation? It > > would be nice to see some justification behind adding all this, rather > > than it being an architectural tick-box exercise. > > Mainly that it's hardware enforced (as the quoted paragraph says). This > makes it harder to attack, and hopefully it's also a bit faster (how > measurable that might be will be an open question, but even NOPs in > function entry/exit tend to get noticed). clang shadowstack seems to use x18. this is only valid on a platform like android that can reserve x18, not deployable widely on linux distros. with gcs the same binary works with gcs enabled or disabled. and it can support disabling gcs at runtime. this is important for incremental deployment or with late detection of incompatibility. clang shadowstack cannot do this. (and there is no abi marking so it is easy to create broken binaries.) android uses fixed 16k shadowstack, controlling this size from userspace is missing from the current gcs abi patches. the default gcs size can be huge so this may be an actual issue for gcs on android where RLIMIT_AS, RLIMIT_DATA etc are often set i think. but the fixed size has its problems too (e.g. there are libraries, boehm gc, that recursively call a function until segfault to detect stack bounds). i think the clang shadowstack design does not allow safely switching between shadow stacks. bionic has no makecontext so code that does userspace task scheduling presumably has to do custom things which would need modifications and likely introdce security weakness where x18 is set. (this also means sigaltstack would have the same limitations as the current gcs patches: shadow stack overflow cannot be handled if the signal handler itself wants to use the same shadow stack. one advantage of the weaker software solution is that it can be disabled per function however a signal handler may indirectly call many other functions so i'm not sure if this helps in practice.) as usual with these sanitizers we cannot recommend them to users in general: they only work in a narrow context. to be fair shstk and gcs are only a little bit better in this case.