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.5 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,URIBL_BLOCKED, 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 02064C433E0 for ; Mon, 3 Aug 2020 12:44:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 B522C2054F for ; Mon, 3 Aug 2020 12:44:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qP6mYC8D"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="XA/bRGmR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="XA/bRGmR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B522C2054F Authentication-Results: mail.kernel.org; dmarc=none (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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References:Message-ID: Subject: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=JX8rGHXeEEmrz3n6h+EWGyl9A3A2eXZNl2MukQJ1fak=; b=qP6mYC8DxKt97TGNzFj0cD/oQ 4currtIOFyT+V/KwnUibY5sdfUKQWxVanJdff/WDeaQV/+UzdrFVGzD8UVpH+FGtXayphbeKbWSmw 7NZhtKo8yaaDf8s0U7yhT27hJ9/Gx7+jzTZkvs9zROxnakHAw5Sat58NpYGi6lIK0SzLjLsyIy+HA YgD2C+pa/WUnv431GX6VIklyIOdjsp6UZljB/DQzhcGT5jHAlun/SOJBX8RKl3+nNuP72FT4ZaDSX 9KqSD9K6RZC0atDGDTrSAKPG5bdAsI1BM7t4MXevamggNGaafjPUoOVErRxfrrtjfuFFozfczDsYR Fn7+pkChg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2ZoN-0006MH-7T; Mon, 03 Aug 2020 12:43:27 +0000 Received: from mail-vi1eur05on2073.outbound.protection.outlook.com ([40.107.21.73] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2ZoK-0006L4-Gq for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2020 12:43:25 +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=T/Kn/llKFrxePEP85B+SBaK0iufG9zXVECQc6FhyP8M=; b=XA/bRGmRHkvWN2eRCIkwPVLlgAAt0CzvunsAG3SUHRAECbNhtb+uwnu3gdN/GPc7WUIjn9jo3+kNZJE3hTZYXYuDqLvsfOppKfPYM3qytBE8fT+tFJY09P7Y7W90xCy47aJ3KecoGkn6H6Soo5QQKQ9c1gFhBhg31pUHGkYlU5w= Received: from DBBPR09CA0005.eurprd09.prod.outlook.com (2603:10a6:10:c0::17) by AM6PR08MB5220.eurprd08.prod.outlook.com (2603:10a6:20b:c3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16; Mon, 3 Aug 2020 12:43:20 +0000 Received: from DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::16) by DBBPR09CA0005.outlook.office365.com (2603:10a6:10:c0::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Mon, 3 Aug 2020 12:43:20 +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=bestguesspass 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 DB5EUR03FT027.mail.protection.outlook.com (10.152.20.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17 via Frontend Transport; Mon, 3 Aug 2020 12:43:20 +0000 Received: ("Tessian outbound df763aae78fc:v63"); Mon, 03 Aug 2020 12:43:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 84dd5c9c336bae18 X-CR-MTA-TID: 64aa7808 Received: from 211586358827.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 29E533A4-08BF-4486-9966-48CF1249D349.1; Mon, 03 Aug 2020 12:43:14 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 211586358827.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 03 Aug 2020 12:43:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MgIJcZUrYmaOvwmoQdr2plVV30NLjDxD9s+LbKYUWdoUhrug9DOaAs6wojLL66Q5hwTsPHdDmikXxSxVN5JheuI6dTusizkoNl4enOCj31A0+6hbAW6L4aIBVvjWyvpc++/0pXKSr6F0Vm1Sr0+PC/vwipvzZdvnDgFG3POvAmrHeTMR9NHLCubrFMcPaUtK53lJTQfnbFpRHgCrbfR0boFqSFIU/F6xbHlfUYDgIuJ8iPNJdZNpqg2nBNdi7zAnyhCrLjMxxcp5PyrabXSLdTfp1JS48y5KCc3VFVU1gmkhwsL7+KGO9EWjJ0sE7q5EtRBtbXrDhCoPiL1EsYaHsw== 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=T/Kn/llKFrxePEP85B+SBaK0iufG9zXVECQc6FhyP8M=; b=AP/wPG7+LSRqOsPym2MKDrGyygzFCOXhbPOmWyKkVrwJr3+IE5kijAMKayAwL6PO2qg5/ZWdduZD4rBvvE8SwFBJ2Z883l1kAu1Ubo0jk6Dxl6W4Kw2NCpeUkaMDI3ceoM0tMvHur1NbDnsvx+FhG5taz2ifAJMLP9IpJl1PMDYUpqEjX2S2X8XcSkWwuTRj7ltUX62DVGZa66ne8kiHlQQEGwpnlvxGUpVjD/QzzUiVrwelW6ZzhhMhLxSlK5ucaNLHn7RDNY5HZqHVJJ+0muulTnrI5ydMzZlHANUL2QlH1ML0LHlD1KCs76IhjJSAfvcWGRCTyBCYhkBQtB7sgg== 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=T/Kn/llKFrxePEP85B+SBaK0iufG9zXVECQc6FhyP8M=; b=XA/bRGmRHkvWN2eRCIkwPVLlgAAt0CzvunsAG3SUHRAECbNhtb+uwnu3gdN/GPc7WUIjn9jo3+kNZJE3hTZYXYuDqLvsfOppKfPYM3qytBE8fT+tFJY09P7Y7W90xCy47aJ3KecoGkn6H6Soo5QQKQ9c1gFhBhg31pUHGkYlU5w= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM6PR08MB4296.eurprd08.prod.outlook.com (2603:10a6:20b:b6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17; Mon, 3 Aug 2020 12:43:12 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3239.021; Mon, 3 Aug 2020 12:43:12 +0000 Date: Mon, 3 Aug 2020 13:43:10 +0100 From: Szabolcs Nagy To: Catalin Marinas Subject: Re: [PATCH v7 29/29] arm64: mte: Add Memory Tagging Extension documentation Message-ID: <20200803124309.GC14398@arm.com> References: <20200715170844.30064-1-catalin.marinas@arm.com> <20200715170844.30064-30-catalin.marinas@arm.com> <20200727163634.GO7127@arm.com> <20200728110758.GA21941@arm.com> <20200728145350.GR7127@arm.com> <20200728195957.GA31698@gaia> Content-Disposition: inline In-Reply-To: <20200728195957.GA31698@gaia> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0443.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::23) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.55) by LO2P265CA0443.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.16 via Frontend Transport; Mon, 3 Aug 2020 12:43:11 +0000 X-Originating-IP: [217.140.106.55] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c2f46427-87b7-4a61-e2a2-08d837aacd62 X-MS-TrafficTypeDiagnostic: AM6PR08MB4296:|AM6PR08MB5220: 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: UZHYahv5jdbugdh3T3msdWQ8fEmWKImAnodp9jYmyLzZP3pQOoYK+8+ln/JPq01651jeUPt1O93Tb+aCRFGWHkjRfC8/PFwNtQk4fgXmPKCgyz9uxHRg2AwmFPYaSYcH7zeR/R6sY9kHpbtg9R5sKKSHRP5t9DHf74jiwNjXiSCivnzitIct/ud7EADeLRu945khabuWZU+tK5oGkK+iRUhrD0Vbhjn0326+SoIEHotie1YVd3Bc7vboCXkYNlHBWgE+v7KaniThHK4ml3rIqJ9hQWzRjcD/xQLMvMM4i/VxBMC68qUKqAKm95qqULCwPEoEgYOjqiBMfqMY+sBY1Q== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB3047.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(136003)(366004)(376002)(346002)(83380400001)(52116002)(8936002)(86362001)(316002)(37006003)(956004)(8676002)(36756003)(4326008)(478600001)(2906002)(6862004)(2616005)(66946007)(16526019)(44832011)(6636002)(55016002)(5660300002)(7696005)(8886007)(66476007)(66556008)(186003)(1076003)(33656002)(26005)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UiV5+MNemOKVjQZPPV9yP5detMdm/WX/i4Lq9Mr5KQH84mAvPUrstxG1U2FbBjf6MGyeO7+6CPhPpyP4ykGsD1Nodu0Iz7hKwePKa0xubzQYp8wkwHJ9hchVqulRnB/FmeVhB4eKZO+vgpJlgAzG88IVSnV/y6I2QNmPIAg/+YPsRBA1WBTXVDGhnVhB3BXoQB9DK82RRa9iCW71w9UbOz36meywb6x2HnZ6AQB1r19yGzBmgatYezHL2Ugdww7c8I2oJo74XjK3IQ6RGou1Q9kCBUE4L1rsaZTw82AWkRnqUJyknshivSh7cA3I4bFz8D6/5hY3ey0hr2kr7/QgTktTinz5d96JviEwqJY5Zkgdd2kO4UPtYgzwhQENm28avdlpbLy8hiXfLnNWwPnRujzPqpF59YKD5iMfJi1VpWg1kX3oIBQ5oTWyqat5mlJiATMIfPzfa4dMlsXCgRq5o/+c0leTO7u/DmH/pdGQpxqoxgl6sS8aDB+vKDIyTdsiriz66uZZ8Eimd7koTkY0ogtj2Np8zvaQhtgNN96ErWKmrXQl6TAIcm/GSapIsWkrU23CxMaRVb+ouLYzjiTVacM4X2kVXEAUqjI4FW9AiSzCtKqVVe4j7bs5cr5ezG+phkutU3+tlIxWSEsC4XPp7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4296 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 342771a7-cbc0-449b-5c48-08d837aac869 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5ZuUXxfiaKO4PrQUBpcCEcwOi2UmWC0tB9rKbpC+X+m3WuSx9tZj846MoikfTNsfec0bjnFwZTU/4sQDXVKLg3tMBtzO1a35K2mfFgdGhDB9oN/cIWTv0GZsdUqK8C09QiK9UPXoz4AkEUhCH9TPMZFA1ArMx0Ta7Q44etLjxoYnYtJqvBZSHIDPvzAsH3X5kU+nMMhD4Am8McFqwNjHO2O+Knnw3Xgdz9BPHbQh5jpE7QWPJZvhDDg4sbkFLbwkGDmWqqHU05T4y9zI24CNkBi7IsPfqLv3/ZcCBcbEYRYydSgUAY22uQ4aLd/0R7bITCTttfFnXCnzQDGdhXq4oAAuecHFsMraaBIX7t6ErJMFxLY9/kSLhIG3mMEpkJC2/XFf8hP8EFPbaNaX777QqA== 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; SFTY:; SFS:(4636009)(39860400002)(136003)(346002)(376002)(396003)(46966005)(8676002)(316002)(16526019)(186003)(8886007)(37006003)(1076003)(2906002)(70586007)(44832011)(33656002)(2616005)(956004)(478600001)(54906003)(7696005)(36756003)(336012)(70206006)(86362001)(26005)(81166007)(82310400002)(6636002)(5660300002)(83380400001)(82740400003)(8936002)(4326008)(55016002)(356005)(6862004)(47076004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2020 12:43:20.2643 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2f46427-87b7-4a61-e2a2-08d837aacd62 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: DB5EUR03FT027.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5220 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200803_084324_693861_708F6E67 X-CRM114-Status: GOOD ( 18.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, nd@arm.com, Will Deacon , Andrey Konovalov , Kevin Brodsky , linux-mm@kvack.org, Andrew Morton , Vincenzo Frascino , Peter Collingbourne , Dave Martin , linux-arm-kernel@lists.infradead.org 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 07/28/2020 20:59, Catalin Marinas wrote: > On Tue, Jul 28, 2020 at 03:53:51PM +0100, Szabolcs Nagy wrote: > > if linux does not want to add a per process > > setting then only libc will be able to opt-in > > to mte and only at very early in the startup > > process (before executing any user code that > > may start threads). this is not out of question, > > but i think it limits the usage and deployment > > options. > > There is also the risk that we try to be too flexible at this stage > without a real use-case. i don't know how mte will be turned on in libc. if we can always turn sync tag checks on early whenever mte is available then i think there is no issue. but if we have to make the decision later for compatibility or performance reasons then per thread setting is problematic. use of the prctl outside of libc is very limited if it's per thread only: - application code may use it in a (elf specific) pre-initialization function, but that's a bit obscure (not exposed in c) and it is reasonable for an application to enable mte checks after it registered a signal handler for mte faults. (and at that point it may be multi-threaded). - library code normally initializes per thread state on the first call into the library from a given thread, but with mte, as soon as memory / pointers are tagged in one thread, all threads are affected: not performing checks in other threads is less secure (may be ok) and it means incompatible syscall abi (not ok). so at least PR_TAGGED_ADDR_ENABLE should have process wide setting for this usage. but i guess it is fine to design the mechanism for these in a later linux version, until then such usage will be unreliable (will depend on how early threads are created). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel