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 X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 248FBC11F66 for ; Tue, 29 Jun 2021 14:01:22 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D738261DB4 for ; Tue, 29 Jun 2021 14:01:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D738261DB4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Eg224hhx0EU+ae+dHlC4uzE/3KMQ34kLbeWRZ4za4O4=; b=kkPqgP2aHbcBMM lFIygnb23uuLLHch34Piz1wMw6ByULWaGfGx7B6wTXwacGzJyZooajagutuFGYkKQP77X1SGnGZoS 58IwoEm8wgcm+/Mm/nZ82JabeuZQFlW8vjoY3Efg4iT/dsNsaZ8snHivMDAgNQivbwmVrChkZYy0l ShMYajhtGeKmSLsIrOtsT9KqQgJHkZza+ucfloQPBtWnghcNcZfSjr+gAuNvDWL/TeKFu0z6ccz6n 3erBplx+UYdeAAAOb6SLHzpzY6H0XK3075kYilC1O46/NNdk4IaS0d5L0ln2DpGPJ49PvaqoIvlxg Xm4kwn1kTteO7YXGAz/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyEH4-00BBpq-34; Tue, 29 Jun 2021 13:59:42 +0000 Received: from mail-eopbgr70085.outbound.protection.outlook.com ([40.107.7.85] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyEGe-00BBdp-RW for linux-arm-kernel@lists.infradead.org; Tue, 29 Jun 2021 13:59:15 +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=3KybZ1FFSkFYnrmbEpfXZxWk0pb38oxGHqhix2AGIpA=; b=ZlARAz9NWoZ5HBrZs7S/eOtk6mpyh0+SMhmDgjRMAWUOItJD9anciD0QLighIshE1jHdjzCTRPpKbl/69GQwrWcPP6iZoeq90B7M/Sy6stA0R1TmlHit9byxH6aFMIyFGh+GqZ+7wbkKidW+IaRGsNS5k1/BfZNODUXyb+qCuHQ= Received: from DB7PR05CA0009.eurprd05.prod.outlook.com (2603:10a6:10:36::22) by HE1PR0801MB1883.eurprd08.prod.outlook.com (2603:10a6:3:4f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.22; Tue, 29 Jun 2021 13:59:08 +0000 Received: from DB5EUR03FT011.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:36:cafe::47) by DB7PR05CA0009.outlook.office365.com (2603:10a6:10:36::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.21 via Frontend Transport; Tue, 29 Jun 2021 13:59:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.infradead.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.infradead.org; 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 DB5EUR03FT011.mail.protection.outlook.com (10.152.20.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Tue, 29 Jun 2021 13:59:08 +0000 Received: ("Tessian outbound 507383c3c879:v97"); Tue, 29 Jun 2021 13:59:08 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b8f33d406c2c1937 X-CR-MTA-TID: 64aa7808 Received: from 1be7e0ca022b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A4B3910A-89FD-4D3B-938A-C9ABB448FC65.1; Tue, 29 Jun 2021 13:58:50 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1be7e0ca022b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 29 Jun 2021 13:58:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MKBg1cNhsATREh9IudVJ7jEj0UwK16aHVz/FotUNFs6t2B1HA8GOir5GqWfoYEePYoo4evLmFpLqJ3khXqr9Qv+tnPcMJGA9MIlhyLBBqjMFi2F1GZWLziuugw8NNuN0pLq/iQPegIb75QAy7ZGTLi8vlMaofF7XcTIj9LLzTJ+Tz8sb/UI6I00MJxxH+5hyZMYxT9jMVdilKqkJFm+0iMU7D4Om44nfhRMpycVcxeYr0CI6fFh2DFDJ40p57wbQGxN2fsmWeU3v62SbzSD/wiw74gcoSpC5s18ZH7bspv/Bz6I3MewZTYJDHKFaUX3ZKr7pcvURjbkkU8qru0X6eg== 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-SenderADCheck; bh=3KybZ1FFSkFYnrmbEpfXZxWk0pb38oxGHqhix2AGIpA=; b=T9zgPtl2do6U+2G7LQGV4CCp37uKtOC+O0vuzd1TxDzI5F3Eb7D2JNalHHGw/eT/RQgL0Pn7lzGr41OwIuWNsnud+MGRg5wkVUwofqLuGx8Z16nlmtmgAgDtBc8Dq55Kgl9x2MA99bZeBY/bO+tfGLcQzdIOXjj4fY1ks3BykU6DA5L/KcFpb2XAlLNkwZfxFu0z6P/M40DAi0kjFjytDdZDQVd9iWIKdiq6WHTrxqpL52oQpUE+3+ib7yf2hZ2g5z37YoK4d+u9yRsA5h+cnLOgVdtsoRMobP7Hex3aAo1hDEkZfvbha+O746GJF0b5ExaSjfPlVfpgSN69JcY3jw== 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=3KybZ1FFSkFYnrmbEpfXZxWk0pb38oxGHqhix2AGIpA=; b=ZlARAz9NWoZ5HBrZs7S/eOtk6mpyh0+SMhmDgjRMAWUOItJD9anciD0QLighIshE1jHdjzCTRPpKbl/69GQwrWcPP6iZoeq90B7M/Sy6stA0R1TmlHit9byxH6aFMIyFGh+GqZ+7wbkKidW+IaRGsNS5k1/BfZNODUXyb+qCuHQ= Authentication-Results-Original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com; Received: from DBBPR08MB6313.eurprd08.prod.outlook.com (2603:10a6:10:202::19) by DB6PR0802MB2358.eurprd08.prod.outlook.com (2603:10a6:4:89::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.23; Tue, 29 Jun 2021 13:58:40 +0000 Received: from DBBPR08MB6313.eurprd08.prod.outlook.com ([fe80::ada5:303a:de76:b0e2]) by DBBPR08MB6313.eurprd08.prod.outlook.com ([fe80::ada5:303a:de76:b0e2%5]) with mapi id 15.20.4242.023; Tue, 29 Jun 2021 13:58:39 +0000 Date: Tue, 29 Jun 2021 14:58:32 +0100 From: Szabolcs Nagy To: Will Deacon Cc: Catalin Marinas , Peter Collingbourne , Vincenzo Frascino , Evgenii Stepanov , Linux ARM , Tejas Belagod Subject: Re: [PATCH v5] arm64: mte: allow async MTE to be upgraded to sync on a per-CPU basis Message-ID: <20210629135831.GC14854@arm.com> References: <20210623085530.GF13058@arm.com> <20210624165228.GB25097@arm.com> <20210625092253.GJ13058@arm.com> <20210625120137.GC20835@arm.com> <20210625123959.GB3170@willie-the-truck> <20210625135350.GD20835@arm.com> <20210628101448.GA5503@willie-the-truck> <20210628152023.GA9308@arm.com> <20210629104625.GA7168@willie-the-truck> Content-Disposition: inline In-Reply-To: <20210629104625.GA7168@willie-the-truck> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [217.140.106.55] X-ClientProxiedBy: LO2P265CA0463.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::19) To DBBPR08MB6313.eurprd08.prod.outlook.com (2603:10a6:10:202::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.55) by LO2P265CA0463.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Tue, 29 Jun 2021 13:58:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 170c18ad-0bf9-4aa3-196c-08d93b0610d9 X-MS-TrafficTypeDiagnostic: DB6PR0802MB2358:|HE1PR0801MB1883: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 4TsE9NgEvcQ4Ry/+MkRzdtgkU/NjAn50sn+YncKZZNqCelGxwSaURNvizhtReCtt9uEo7M9cR3Y7K8/2GgVXrlkf0iuzxPf03W3f2CkGOa9yYdG1z/WgUWTcCQBM3KogoPqX9x2Z1Q7tJJp6PBDyPhGFO6cxdw4cSTtzyf6lKqsG6QkmPSnk67eMGckJhZyBcqX52s6wfxkvsq09TkfqE6deh++AbWaBSwGLuafmE0H11Fye7IYC8hmmrJrvVJZgk5Jlk/1fuk01a442Onah+uUPA9hIojT+fiT+pVsOIyy5xB+JlJtkffNQ+MiTl+E2gvQ4it7rsf/FMNPNJCF+x+HW2oHDLrE1aM4juSZFgGn82cGxPOOFPmWlskmimQHyETUbdh632pbvNic3aDSOeRIiNVgNA2DoHUpBcVt2NTa9lsVP9T4tmsOuX04s7PtNbzr+7/egjFCIflsFRsg/OCuMxRnpuTVil5pjURw+lE6HJocu0gTGrnIOT5mVDzutIaTL38i0F5AZFh9IzQAN5E1hqwwwntUNVeqbO78OkIzNC08YzG6hyzsavgUC4sG7xNwCB8FiDTI+g7msJIXoITMBAWkwGlobesvaAqZsgrVY7piakwCGxRoGGUC0K04ROFV7WaiI4hhJoH9WYuduRw/WrtiABPJAda4u3iFKQX6yg6au8Om/IEoDGDixwwppFcmJh6oKnJFU69WXYC6Kag== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBBPR08MB6313.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(366004)(346002)(39860400002)(396003)(8886007)(6916009)(16526019)(186003)(44832011)(38350700002)(38100700002)(8676002)(7696005)(6666004)(54906003)(316002)(26005)(66946007)(5660300002)(66476007)(66556008)(8936002)(956004)(2906002)(1076003)(2616005)(52116002)(4326008)(36756003)(33656002)(478600001)(86362001)(83380400001)(55016002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TVBIQUJCWmo5UWJUbm8zWFYyd2VYOHJYYWE0WWtrbnBtOFpNWG5pMWhwWXlT?= =?utf-8?B?R2pmUFlKRHc2YVZ2d0VpSEluVkVaOHQyQ2pjRHBrU3EwU2FJYnU3RTlESmVT?= =?utf-8?B?YWlSRFlMRGhJMVFJVzVkRWNCKzRYSnVLVzJpcldCUW00dStlVExTNE5wdTNR?= =?utf-8?B?eGhZYlByL1ZSY3FyVHQ1QjB4aEY3S3hHVmpEaWJZMmZMK1NrbjBwTFJXa1ZE?= =?utf-8?B?Sk9xQ252KzBwWGxrdlFoZ0JhSXI4c1FxYnErUkF4Mm1Ja0M5aWdSaEcrdGk4?= =?utf-8?B?dmROVHpONXdObXpSTmRDdWRIdkVuWUdJQm1FTzc5R2g1MndkcldPcVpWTEg4?= =?utf-8?B?M3ZRYXkwRmlweHBzc3hscis5Qk01dW5Ga2g3b0plQlBjcVNaZjY4RUhON3U5?= =?utf-8?B?WkhwRjkxNVpCNlN0cnVxaE1JOUdJbWZtUFQ1WXkxK1M2bE9WMUJReDNmWW9M?= =?utf-8?B?eXlJS2FGQlNJcTJCeXIrcnNlN2xaK3JZWEJUQy9TTmRLNlNla1FtZnBkMWRR?= =?utf-8?B?bERlcjh6WmIram81SDVJL1JCWWdhdnNqQ04zRityYUFvNGNJeGZ5Rk90eFV6?= =?utf-8?B?Z2xiSWJUYmVGa1RpeE5VZmJIRlNrM0ltOVV6aTBDN2NsWU5LdTM2cnNFUEdE?= =?utf-8?B?MVh5Z0F6cCt6KzM4STcyNkJvTFhDVzQ5bGR6TitaZitiRXFvL0grM2lMdzZC?= =?utf-8?B?VHhBRWZ1cTBQTk1UV01ROGNNQWxwUTNBdEVnNDlLa0lFL0hGYVVQRlB0SDBO?= =?utf-8?B?ZTYzVzdZZTQzeVJDOGYrNUgwb3BrNnFTL25kYUY0L2cxRklhZDNUU3EvNTNk?= =?utf-8?B?WDRPWThMTlkrMjRHcmlidHZIU3FoNzdlM2lSbGxxUUI4UkJiK1V2cmZ5emVY?= =?utf-8?B?bjFKQmVpRk9XSDZvYlFYSmhLeTdnL004dzRLMjU3Q21TTmIzak42ZEgrRGc2?= =?utf-8?B?bENORitOVlA0Q1F1eHowODhtSXhDUzAxd0Z4MnpDZ2Y2UkM1akVZM0piWDVu?= =?utf-8?B?dEExVjJIVFVVbFM2VVVzLzIvZFNvbFhOc2NmcDA2cnl1SnpEUHJvVDQ3ekh2?= =?utf-8?B?bXpwYmM2V0tjRmhsN0I1Y2VKWm9iTk5DUlpLNE80akJYb05NY2x4SWZMSm84?= =?utf-8?B?aU4wTUJCZ0dzVE9nS3BrNm5zSTg4aklhMTBTc2ZXeE9HTXBBR0x2UitjWWJs?= =?utf-8?B?YjJ0VmFkUkNzakdZLzRCV3ZuL21WVnNlWUxDMFFaV2lRT2ZFWE1WOFplb0J4?= =?utf-8?B?Nml3Vk93UUt5RDljSlNLamxsd3Z6bko2MnpkYndUczhYV1RaWmtiTHpRa3B1?= =?utf-8?B?VDFGZW5OdjUxaDNiOUw0cGZ5TWVVdzc1ZWJicGxMVnB2Z09qMzBtTy9WZzA4?= =?utf-8?B?YVJVUlB1MzNGYjBwdGJmVThzK25NSThjd2xOSVJObHk5ZWNwaW1uN0c5Y0M4?= =?utf-8?B?RWlYZ2V4cDhFOHFWd2w3VGFyRWRhOVcrdHhHMUhFZVRWZ0prNjZJVmE4b3Vx?= =?utf-8?B?a2FTQ25QMUdxUEJ6ODVPNTNjaXV2UEFkQWRrTGxFK3BWcVVvazBmd09kNGw2?= =?utf-8?B?a0d0VjgydENOc01nYzNvRS9GOURibktjYm13dGkzSHJGZ3o0aHJMUlY1eUxT?= =?utf-8?B?NFNHNWxuY0RoWk85QkFYRGFhVTFpM3JhcmtkS0czRmxqZng0OG1iUXFhWVc2?= =?utf-8?B?YUNqdnlSdmNjdXcxS3FGU0FCbWViQzNEWWpFMWVFWXBsY2dFZzhrbkI4aVZ5?= =?utf-8?Q?asHwYBopN746tOwTGCPznbou9Rmcb+OXeCns8wb?= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2358 Original-Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 1915f217-55e2-4e35-c3a0-08d93b05ff6b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2ZW1JFs+M+uEHFI3Y4xzOJ21gDn+vjv4ar1BcXpMPVBnzpUUQTAPPoQs4JuPJKpFG7FRhHaM5To+xSTJUGF8B5RFjnDqQ7LoHcDpRckXkmA6EExcGIIJPYd8aKedC62KfCPdkv0o0tA0ti6FNdDggl/+Hin/kZm+r+GqEI7S3rYSw8wVjJgOfyDVX8LZt7kqVpavNv1BdOwZqLGQYO2Se2XLsDKPTK1hvZYH6OwNBnt20ubfRpmXXXiRyCgahgniRV9P8ccDsDumqhxk7i7TVJW/xZ1dbJDV6DuHZ7Raasv3wPy2Pn+0W+kRuIMXxGDnfQ/zDeH1YcXepStPV0n/bcSWYutSsSOFtZO5vjsifNX+mIwT0VLLXGhgrpRcjXHtPocPw8pSliYgRzTRxVzV5BSksoMzAHeuYcidF2x+Y628Wxcb3jMljMylSrdLKM481bw4joNKs2p+hPUK2QiVPxCOoj7BzGbdgcHzCqLXY5h0L4/jSHqn1urLV3kb0EBrHZ4UR+OLT+ZFmTfti+vGc/J+ixMW2oY9q1srEQDLyg2quUw0W9tpTkN8Hps8cqNXYlBRFAyR8BvJWWk1dju/vhbBhnQVFOBx2G3pfIlG4JzmGA5DDTseGeQzQChXos0FaZx54fCNDan6wBZYEWLiGkgmjejL68ERsNh/L3t8Iiab2fGMDezxuAYYeADHEZizdkOGiogP1JGtDzly4PeScA== 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:(4636009)(346002)(136003)(376002)(39860400002)(396003)(46966006)(36840700001)(70206006)(70586007)(36756003)(8676002)(7696005)(82740400003)(81166007)(6862004)(55016002)(4326008)(86362001)(356005)(82310400003)(16526019)(8936002)(336012)(956004)(5660300002)(186003)(36860700001)(83380400001)(54906003)(47076005)(478600001)(2906002)(316002)(1076003)(6666004)(33656002)(44832011)(26005)(2616005)(8886007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 13:59:08.8061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 170c18ad-0bf9-4aa3-196c-08d93b0610d9 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: DB5EUR03FT011.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1883 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210629_065913_193430_F880ACA4 X-CRM114-Status: GOOD ( 22.92 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 06/29/2021 11:46, Will Deacon wrote: > On Mon, Jun 28, 2021 at 04:20:24PM +0100, Catalin Marinas wrote: > > Another option is a mapping table where async can be remapped to sync > > and sync to async (or even to "none" for both). That's not far from one > > of Peter's mte-upgrade-async proposal, we just add mte-map-async and > > mte-map-sync options. Most likely we'll just use mte-map-async for now > > to map it to sync on some CPUs but it wouldn't exclude other forced > > settings. > > Catalin and I discussed this offline and ended up with another option: > retrospectively change the prctl() ABI so that the 'flags' argument > accepts a bitmask of modes that the application is willing to accept. This > doesn't break any existing users, as we currently enforce that only one > mode is specified, but it would allow things like: > > prctl(PR_SET_TAGGED_ADDR_CTRL, > PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC, > 0, 0, 0); > > which is actually very similar to Peter's PR_MTE_DYNAMIC_TCF proposal, with > the difference that I think this extends more naturally as new PR_MTR_TCF_* > flags are introduced. > > Then we expose a per-cpu file in sysfs (say "cpuX/mte_tcf_preferred") > which initially reads as "async". If the root user does, e.g. > > # echo "sync" > cpu1/mte_tcf_preferred > > then a task which has successfully issued a PR_SET_TAGGED_ADDR_CTRL prctl() > request for PR_MTE_TCF_SYNC | PR_MTE_TCF_ASYNC will run in sync mode on > CPU1, but async mode on other CPUs (assuming they retain the default value). > > We'll need to special-case PR_MTE_TCF_NONE, as that's just a shorthand for > "no flags" so doing PR_MTE_TCF_NONE | PR_MTE_TCF_SYNC is just the same as > doing PR_MTE_TCF_SYNC (which I think is already the behaviour today). The > only values which the sysfs files would accept today are "sync" and "async". > > When faced with a situation where the prctl() flags for a task do not > intersect with the preferred mode for a CPU on which the task is going > to run, the lowest bit number flag is chosen from the mask set by the > prctl(). > > Thoughts? i'm happy with this. "lowest bit number" flag may not be optimal if there are many flags, but i don't expect many more tag check modes. no separate TCF_NONE bit means if we later want to turn tag check off per cpu there is no opt-out. but i guess this is fine. will armv8.7-a style asymmetric check use separate flag or TCF_SYNC | TCF_ASYNC may enable it? i see arguments either way. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel