From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cyan.elm.relay.mailchannels.net (cyan.elm.relay.mailchannels.net [23.83.212.47]) by sourceware.org (Postfix) with ESMTPS id EB5993857811 for ; Wed, 25 Nov 2020 16:23:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EB5993857811 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 322B7401A5A; Wed, 25 Nov 2020 16:23:20 +0000 (UTC) Received: from pdx1-sub0-mail-a90.g.dreamhost.com (100-96-87-12.trex.outbound.svc.cluster.local [100.96.87.12]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E082940227D; Wed, 25 Nov 2020 16:23:15 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a90.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.10); Wed, 25 Nov 2020 16:23:20 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Thoughtful-Reign: 26915a422144c060_1606321397786_479921857 X-MC-Loop-Signature: 1606321397785:3122007988 X-MC-Ingress-Time: 1606321397785 Received: from pdx1-sub0-mail-a90.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a90.g.dreamhost.com (Postfix) with ESMTP id 9646F7E602; Wed, 25 Nov 2020 08:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:from :to:references:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=TTuwaO xlMrkzP7hcuZ3jWrlHmf8=; b=Z24t1+k+9Lk18E/xcxuYPrX7f7zAaZmuWXQznI Q4TdaeNwooW+JoXoEMC9H2pj4+JmF+5Y4a9VtrolXGzkX38bFgrUHGDPUcG9HF5p dkVnZUtvtBsRhivzhtX8UWb8pUkiEH0oH4uFG2bpQMKPjn4f4UjdkGvuYNtBWb0u RjcTg= Received: from [192.168.1.111] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a90.g.dreamhost.com (Postfix) with ESMTPSA id 673577F955; Wed, 25 Nov 2020 08:23:12 -0800 (PST) Subject: Re: [PATCH v3 7/8] aarch64: Add sysv specific enabling code for memory tagging X-DH-BACKEND: pdx1-sub0-mail-a90 From: Siddhesh Poyarekar To: Richard Earnshaw , Richard Earnshaw , libc-alpha@sourceware.org References: <20201123154236.25809-1-rearnsha@arm.com> <20201123154236.25809-8-rearnsha@arm.com> <1b6cd0c1-e9d2-820d-325b-40b65d65d870@gotplt.org> <75910b2f-8c24-c3ca-7fa7-13e7ca37ad4f@foss.arm.com> Message-ID: <9963e88d-062f-c3a7-69c4-241b1743b987@gotplt.org> Date: Wed, 25 Nov 2020 21:53:08 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Nov 2020 16:23:26 -0000 On 11/25/20 9:50 PM, Siddhesh Poyarekar wrote: > On 11/25/20 9:36 PM, Richard Earnshaw wrote: >> Well, I could rewrite (0xfffe << PR_MTE_TAG_SHIFT) as >> >> =C2=A0=C2=A0 (PR_MTE_TAG_MASK & ~(1UL << PR_MTE_TAG_SHIFT)) >> >> but I'm not entirely convinced that's a lot more understandable: it's >> just a bit-mask of tags that can be enabled. >=20 > It isn't, I think what would work is a single macro that describes what= =20 > (PR_MTE_TAG_MASK & ~(1UL << PR_MTE_TAG_SHIFT)) is, e.g.=C2=A0 DISALLOW_= TAG_0=20 > assuming that that's the intention since I can't tell what it's for at=20 > the moment. Of course, I should have read your response properly before suggesting;=20 ALLOWED_TAGS_BITMASK should be intuitive enough as long as one isn't=20 talking to their kid while reading code. Siddhesh