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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5B392C433EF for ; Mon, 3 Jan 2022 17:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XUtDj0okfuN//HLBPk8kiMqLFOyRrCBU+3c1FDJ4SkQ=; b=tVQTAgpjWs7tS8VZO0ZUias3rb VP+Grg7INUrCpp4iVU09HVWX6+/GZkJGJJ3gfXOpVxXrBRrJukUKtyfmDJZDAiH+flt2tMjw90yA+ WbrXraS2Pnq7f1vEzxgGFd4sw9t+TQQPxEOjIsWWU/yH2rIQ0FbFsbRb81nGmCsv3atTvihu21MEj s0fdhrsLlQzqgRQBQzKiMdBVfygDNnp4y1fQAjq2URAvwwFk1pf6n2g2W/L+BBtSVFnZAig+berw/ h8mHX9aj+hPktsyXUMOSSFpGPYjj2R3RvScj2qIEUY0j7SR8UtxsleQ7rLmLA3kBpKbaXaXZIcYJ5 MCMVNFgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4R7s-009fOx-Rh; Mon, 03 Jan 2022 17:28:05 +0000 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n4R7o-009fNs-Uf for linux-arm-kernel@lists.infradead.org; Mon, 03 Jan 2022 17:28:02 +0000 Received: by mail-qt1-x831.google.com with SMTP id j17so31116963qtx.2 for ; Mon, 03 Jan 2022 09:28:00 -0800 (PST) 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=K0/M+LvEGs1t8KpGRDuz7gGukXDrOZZjKzqGb2TCTcs=; b=C1yfIfH/DFradNiZCX2fNbGrP/zi25Y8cHWYdtMO8BL6n4CWWzLoHTwEiwNzr3wpnm RoN45Lhr+LyOXppgyQvCY1HmkubDEgS2bL0TIEJsN6DaQSqod53l2kYoAvDmSIO5bo94 oqKjb2SKPuCTmB1iZJ5lH1xqhtUEDuMS2BVhq6oThSFx9FJAbSi/e3iBAoM/z6w+nqWZ 27iIcSBBxNdksgHo4u7AVN4JJ5GU0F9PXTQRtGdU2QdLSnorckoSU70l+17KcaIhL+yT aNaYqde17xA0FLngxWLZtpD/imCaGhyPIAfejciF3r6vu5/GXh2tHAlwbTGQAUvlTO1p jQrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=K0/M+LvEGs1t8KpGRDuz7gGukXDrOZZjKzqGb2TCTcs=; b=qrpqKP6XYwUDiyxZCc3yWYWWflApvpaDWA4V513ivcllsVhqYWLAupC+9EHfSDlXon EZF5/HFXnZ5PH43wOS7Jmqoe3jtKmf9juvgKflEPbQesAzx8Ucp6VDW0Eau8rvKxPk9c PkLz2uKJzeVa2Qselz1TCdn9+ghMKyBbmMQqzMjFFePw0e2dsBJvLS46lI9pzxgKbF6a Ec1lX5Wpz62FxfmDnAf3GEHPNFvZWnJznckr4/ruZZzw9uS7/VVN05PhDGdc6XJxQ7MP qW+NFeVH9wXe5fG4KBrkrccOCot/++sWkrZirZceSpYCK0DAh1nOLgSCWx6FtwmeLCay E/TQ== X-Gm-Message-State: AOAM533OwxcgqmQB9glc/HWdgVwNNCD5N4nUM6VlgJXIZIEZviZ+kl1B 4e7RrV074WgHsZtOu7PqgYE9XQ== X-Google-Smtp-Source: ABdhPJybhVQZHflSpAfAe881KjDPDFmc0G07t5jXKZYREFQXVgCWN4YZH4lqgHNo5+PZk5CZnEMm4Q== X-Received: by 2002:ac8:470d:: with SMTP id f13mr40793356qtp.325.1641230879337; Mon, 03 Jan 2022 09:27:59 -0800 (PST) Received: from ?IPv6:2804:7f0:4841:563b:5da1:e213:4480:4ee4? ([2804:7f0:4841:563b:5da1:e213:4480:4ee4]) by smtp.gmail.com with ESMTPSA id h1sm28043956qta.54.2022.01.03.09.27.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jan 2022 09:27:58 -0800 (PST) Subject: Re: [PATCH 5/5] arm64: mte: Document the core dump file format To: Catalin Marinas , linux-arm-kernel@lists.infradead.org Cc: Will Deacon , John Baldwin , Arnd Bergmann , "Eric W. Biederman" , Kees Cook , Szabolcs Nagy , Andrew Morton References: <20211208121941.494956-1-catalin.marinas@arm.com> <20211208121941.494956-6-catalin.marinas@arm.com> From: Luis Machado Message-ID: <03135b87-31f2-510c-44ec-1fe3ad0ca4b1@linaro.org> Date: Mon, 3 Jan 2022 14:27:54 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211208121941.494956-6-catalin.marinas@arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220103_092801_092620_3C7F4BC5 X-CRM114-Status: GOOD ( 21.37 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/8/21 9:19 AM, Catalin Marinas wrote: > Add the program header definition and data layout for the > PT_ARM_MEMTAG_MTE segments. > > Signed-off-by: Catalin Marinas > --- > .../arm64/memory-tagging-extension.rst | 22 +++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/Documentation/arm64/memory-tagging-extension.rst b/Documentation/arm64/memory-tagging-extension.rst > index 7b99c8f428eb..34c7eb47f61e 100644 > --- a/Documentation/arm64/memory-tagging-extension.rst > +++ b/Documentation/arm64/memory-tagging-extension.rst > @@ -213,6 +213,28 @@ address ABI control and MTE configuration of a process as per the > Documentation/arm64/tagged-address-abi.rst and above. The corresponding > ``regset`` is 1 element of 8 bytes (``sizeof(long))``). > > +Core dump support > +----------------- > + > +The allocation tags for user memory mapped with ``PROT_MTE`` are dumped > +in the core file as additional ``PT_ARM_MEMTAG_MTE`` segments. The > +program header for such segment is defined as: > + > +:``p_type``: ``PT_ARM_MEMTAG_MTE`` > +:``p_flags``: 0 > +:``p_offset``: segment file offset > +:``p_vaddr``: segment virtual address, same as the corresponding > + ``PT_LOAD`` segment > +:``p_paddr``: 0 > +:``p_filesz``: segment size in file, calculated as ``p_mem_sz / 16 / 2`` For the sake of making things extra clear, I'd describe what the constants (16 and 2) mean. > +:``p_memsz``: segment size in memory, same as the corresponding > + ``PT_LOAD`` segment > +:``p_align``: 0 > + > +The tags are stored in the core file at ``p_offset`` as two 4-bit tags > +in a byte. With the tag granule of 16 bytes, a 4K page requires 128 > +bytes in the core file. > + > Example of correct usage > ======================== > > Otherwise looks good to me. Acked-by: Luis Machado _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel