From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id m/OZJ+Qj6l9mSgAAWB0awg (envelope-from ) for ; Mon, 28 Dec 2020 13:28:52 -0500 Received: by simark.ca (Postfix, from userid 112) id 944FF1F0AA; Mon, 28 Dec 2020 13:28:52 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 488061E590 for ; Mon, 28 Dec 2020 13:28:52 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A55C33875409; Mon, 28 Dec 2020 18:28:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A55C33875409 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609180131; bh=4nY9U+HW1KLlAixxoUNs+aVcLbfkDZQtYaHW7xHH9/0=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=qP295BmpyZ0lrvWZBnzCLrsiLL1BAflEpGu5FTmefQji+qAZRJxQ6ygh8pmtoG1Hk XvlbG0pQU7mM3hYa05sZ6xyXYDAX/gPttIFk/iPcMa8OmAEq96+me11qf/VaZLR95W oKgVWIz8TeVR4rs1zKLoOh+CvKRlC1nKzTrV3tOQ= Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by sourceware.org (Postfix) with ESMTPS id 9016C3875406 for ; Mon, 28 Dec 2020 18:28:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9016C3875406 Received: by mail-qk1-x72e.google.com with SMTP id f26so9585053qka.0 for ; Mon, 28 Dec 2020 10:28:49 -0800 (PST) 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=4nY9U+HW1KLlAixxoUNs+aVcLbfkDZQtYaHW7xHH9/0=; b=MeP5PkjBFZpluBF1/thGnaW19rHY03SURr2Kf1CQSbAOX0m+WIHUueekgH760WUYh1 uvakk+daHqLAVEfkuKAx6K5xXwmUiAwX894Q2A64Dfzjy3U7/0siKtC3lvdR623yGU9/ hkOpQ2/pXIsGDuYkdwGXMWNjTAhDxbyiPGvxSFrQJ0eyCa+Zw58vvNzBaTRHKAPG76Tm 2jhq9D1gge57hlyGxIMjc0O7OSD/dUr1y7nprGv9MWg5MBV5bOQFu2MUsp1P9yBeuMfZ EbFcu8L9+oP4WqV5pqZ+oRWS8y5HIKZ2CGZ0qz2eVyN/ktRRxkHNP4gSbLSu9wbx4zeu UKDA== X-Gm-Message-State: AOAM533eC0K/n4MFsx0tIYSbWt4BMfsGYKRMSPVQIWWyPGuFtg7r+sg2 Gb1NVV9qkHHCiuwCn06krFEufHH/BA269Q== X-Google-Smtp-Source: ABdhPJz/YDC8tm/cudT7nJNnf90OlbiKce4hO7cjn6P5xecKFtzRJ6zsi4imdI8Nh3vYUaQholCk+A== X-Received: by 2002:a37:7483:: with SMTP id p125mr12568655qkc.382.1609180129050; Mon, 28 Dec 2020 10:28:49 -0800 (PST) Received: from ?IPv6:2804:7f0:8284:370e:19e7:527f:e109:2734? ([2804:7f0:8284:370e:19e7:527f:e109:2734]) by smtp.gmail.com with ESMTPSA id f10sm24408432qtg.27.2020.12.28.10.28.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Dec 2020 10:28:48 -0800 (PST) Subject: Re: [PATCH v3 09/24] AArch64: Add target description/feature for MTE registers To: Simon Marchi , gdb-patches@sourceware.org References: <20201109170435.15766-1-luis.machado@linaro.org> <20201109170435.15766-10-luis.machado@linaro.org> <76339224-9625-b908-aa7c-6af422debc67@polymtl.ca> Message-ID: Date: Mon, 28 Dec 2020 15:28:46 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <76339224-9625-b908-aa7c-6af422debc67@polymtl.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Luis Machado via Gdb-patches Reply-To: Luis Machado Cc: david.spickett@linaro.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 12/25/20 9:10 PM, Simon Marchi wrote: > On 2020-11-09 12:04 p.m., Luis Machado via Gdb-patches wrote: >> This patch adds a target description and feature "mte" for aarch64. >> >> It includes one new register, tag_ctl, that can be used to configure the >> tag generation rules and sync/async modes. > > Can you explain this sentence? I especially don't understand "sync/async modes".. > Sure. This register is exposed by the kernel as a set of bits that you can use to control some characteristics of the memory tagging mecanism. There are 3 modes of operation: ignore, sync and async. From the kernel documentation: - *Ignore* - This is the default mode. The CPU (and kernel) ignores the tag check fault. - *Synchronous* - The kernel raises a ``SIGSEGV`` synchronously, with ``.si_code = SEGV_MTESERR`` and ``.si_addr = ``. The memory access is not performed. If ``SIGSEGV`` is ignored or blocked by the offending thread, the containing process is terminated with a ``coredump``. - *Asynchronous* - The kernel raises a ``SIGSEGV``, in the offending thread, asynchronously following one or multiple tag check faults, with ``.si_code = SEGV_MTEAERR`` and ``.si_addr = 0`` (the faulting address is unknown). So, basically, we have options to ignore the tag fault, report a tag fault without extra information (async) and report a tag fault with precise information (sync). > The code itself LGTM. > > Simon >