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=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 9DA02C433DF for ; Wed, 1 Jul 2020 17:32:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6323320771 for ; Wed, 1 Jul 2020 17:32:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pO/d3N3X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6323320771 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D95E68D0055; Wed, 1 Jul 2020 13:32:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D46938D0016; Wed, 1 Jul 2020 13:32:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C35A28D0055; Wed, 1 Jul 2020 13:32:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id ADC018D0016 for ; Wed, 1 Jul 2020 13:32:53 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3BAA6824556B for ; Wed, 1 Jul 2020 17:32:53 +0000 (UTC) X-FDA: 76990202226.24.elbow33_10133f626e82 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 113391A4A5 for ; Wed, 1 Jul 2020 17:32:53 +0000 (UTC) X-HE-Tag: elbow33_10133f626e82 X-Filterd-Recvd-Size: 5585 Received: from mail-qv1-f68.google.com (mail-qv1-f68.google.com [209.85.219.68]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Wed, 1 Jul 2020 17:32:52 +0000 (UTC) Received: by mail-qv1-f68.google.com with SMTP id ed14so865117qvb.2 for ; Wed, 01 Jul 2020 10:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xuCr/BLFRQfPju0k5opNS+uQpQU/MMeebcyxccV+Kjs=; b=pO/d3N3Xg728f4WsB1qavsUXy+ZK7+q7tIJpZ2wzis1KZZD3n2gdYZmIdpvWKbRKZC yQ9LX2Z2PTexABsE16Unr/jZMCtppHaMvfSigdOUGY50DxoiD6uHTEr94W2R5VE1zPhA ws70+fx0zBPuGAtZsX+g4iByAOgveKwVEL0kJroWJEB8rjeSKnBHAdoURcjeY/v4saEB 9ikoMAn7t+3cd9Gm5DaByasl06D/2Axa1jOVQuAk9LguSjFExqJ5euZZbAquA3S0S4Zv E0iZw4bK2S97VcZeQrrsXfcKlkli5N8pc/VFypcjz6TCLUdyOeupY6obkuNaagxVC6Uy iJvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xuCr/BLFRQfPju0k5opNS+uQpQU/MMeebcyxccV+Kjs=; b=CGP/Yz2Bx9CPvF04566S6xStRQqO2ZknoLkJmEv/98P1qyGwXgkJhLhwm/ydGUQ2RT UvCjhWNIcTb5JiqS5wlCDQRAYCCTX2VZLH0cr01kNfSfg/w/uWk1uDTtubiKFsAxY4en i6n/irSJpsbs0FEEA2cd22gB/y5mE7cgn5hQVe1zcUUneM1nttSEhqKtpgTD1aW5GJyw mvUGksVjaX5qWWT1yk7i+PLJJ5VZq2wHlSlxLkBSKV0qq6aGIRcvKt3az8Ahf7EbVLxd jpRqjxS7Y1GoVXbtL1vc2Pc22VsztGhu9sIrZqNaCLH9tUChC6LoYAlyvYfbEbk5CLjj oWWA== X-Gm-Message-State: AOAM533fLueKooe5FasH8t0X/VpTMU1UVB+vstLApNLNup5JjOzf9Ass tuh3WRGw9m/4rvtINzfDEBnxUA== X-Google-Smtp-Source: ABdhPJzVVqbDUHvpYLFYeLSni9YkmFljvxbDGK5K5pHm9NyYA/JF8Q5vRLzZ36Ihn+4uCU11q/5lyw== X-Received: by 2002:a0c:b7ad:: with SMTP id l45mr22714066qve.132.1593624771735; Wed, 01 Jul 2020 10:32:51 -0700 (PDT) Received: from ?IPv6:2804:7f0:8283:20c3:28c6:c7b3:e1d8:8a2f? ([2804:7f0:8283:20c3:28c6:c7b3:e1d8:8a2f]) by smtp.gmail.com with ESMTPSA id t65sm3418141qkf.119.2020.07.01.10.32.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jul 2020 10:32:50 -0700 (PDT) Subject: Re: [PATCH v5 19/25] arm64: mte: Add PTRACE_{PEEK,POKE}MTETAGS support To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, Will Deacon , Dave P Martin , Vincenzo Frascino , Szabolcs Nagy , Kevin Brodsky , Andrey Konovalov , Peter Collingbourne , Andrew Morton , Alan Hayward , Omair Javaid References: <20200624175244.25837-1-catalin.marinas@arm.com> <20200624175244.25837-20-catalin.marinas@arm.com> <7fd536af-f9fa-aa10-a4c3-001e80dd7d7b@linaro.org> <20200701171549.GF5191@gaia> From: Luis Machado Message-ID: <8fa5c891-0f4a-c925-679e-94c41a546490@linaro.org> Date: Wed, 1 Jul 2020 14:32:43 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200701171549.GF5191@gaia> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 113391A4A5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: Hi, On 7/1/20 2:16 PM, Catalin Marinas wrote: > Hi Luis, > > On Thu, Jun 25, 2020 at 02:10:10PM -0300, Luis Machado wrote: >> I have one point below I wanted to clarify regarding >> PEEKMTETAGS/POKEMTETAGS. >> >> But before that, I've pushed v2 of the MTE series for GDB here: >> >> https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/users/luisgpm/aarch64-mte-v2 >> >> That series adds sctlr and gcr registers to the NT_ARM_MTE (still using a >> dummy value of 0x407) register set. It would be nice if the Linux Kernel and >> the debuggers were in sync in terms of supporting this new register set. GDB >> assumes the register set exists if HWCAP2_MTE is there. >> >> So, if we want to adjust the register set, we should probably consider doing >> that now. That prevents the situation where debuggers would need to do >> another check to confirm NT_ARM_MTE is exported. I'd rather avoid that. > > I'm happy to do this before merging, though we need to agree on the > semantics. > > Do you need both read and write access? Also wondering whether the If I recall the previous discussion correctly, Kevin thought access to both of these would be interesting to the user. It sounded like having read-only access was enough. If so,... > prctl() value would be a better option than the raw register bits (well, > not entirely raw, masking out the irrelevant part). ... then exposing the most useful bits to the user would be better, and up to you to define. I can tweak the GDB patches to turn the sctlr and gcr values into flag fields. Then GDB can just show those in a more meaningful way. I just need to know what the bits would look like. I'd rather not make these values writable if we don't think there is a good use case for it. Better avoid giving developers more knobs than they need?