From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 1D6F63858D1E for ; Sat, 12 Aug 2023 00:50:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D6F63858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dabbelt.com Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3a412653352so2119146b6e.0 for ; Fri, 11 Aug 2023 17:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20221208.gappssmtp.com; s=20221208; t=1691801458; x=1692406258; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=PVMpPG727leOutEruuizpXlkz0gJulFsWaaJtNF+jQg=; b=ol1VZCleQv7WzP8wemgT7KubmW1uldnHCPFENYl3dpPnAnbI14nWZwH162KZPms6b2 q2R6lLBU6isqWLd2lsA0Chw6fq6wIpk+9b0LMaY7iMdHWUeU0I4DWiqp0rxJ0+CILcmD t0dS9CR9KzYfO4JeFxmc03ceXH/UMym8WNR6cgev8HjH/fNmDCc3yrYQXyBTnVKI74VT fZeiL02NlNLES2vbiUdRuGyWjKej+2WdX+26W53cj8HAwYCCatBQZifSTDo6Cl5ZKsaz y23hCTGR2LV2Smg2Ft4qsKBPvUI6LCw7hUPamaeRGFlXS9SFWhGSc6NowAl5jOV0s7N9 zuLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691801458; x=1692406258; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PVMpPG727leOutEruuizpXlkz0gJulFsWaaJtNF+jQg=; b=N34zsQVuII4VSGluQQcipNww+Alt0AdDz2UqOz3BLKA6N9fT4sIqJuKNdpOH3Uwg16 fjExZMi0S4X0l/zkxurR78s5CXkek83fjLh30XZNeVDIDSXtW7aTBJR2MHhPSDrDUfmo JOXJshFEDeO7JDp4cfC9uLvIKoZ+6wpn6J8JEGzzA1K7MwvUbaBSNKtco1R9rkDrwk+Y oUsXOUUJMy/B4sel7fkG1SoN1GyWH3TJvaPnpxQ9fWYztEGNvKRrSAsesghQUlJ1gbwp BwcHLjrh9uP/Sne9Zlw9IoLcPhZszJvjqXaY5k/z4lcLKMqEEa4EBVOKbcpohT9mvnUn t+ww== X-Gm-Message-State: AOJu0YxysEY7lgdhe431D0Xy6kUXYBAm7ZYIpR+8DHkwbHxN+0/7fyi7 FSNFm+/6uNjNBRRphHFoWbX+zQ== X-Google-Smtp-Source: AGHT+IFz1CcWn0Wz1UrwRb3ll5AUjSx2BBxm/oQP2oob1Bo9dn4/qeJmQM2x3LKwMYCx6ziWJ+Gl7g== X-Received: by 2002:a05:6358:52cd:b0:133:7f9:303f with SMTP id z13-20020a05635852cd00b0013307f9303fmr3595721rwz.23.1691801457826; Fri, 11 Aug 2023 17:50:57 -0700 (PDT) Received: from localhost ([135.180.227.0]) by smtp.gmail.com with ESMTPSA id l5-20020a170903120500b001bc9bfaba3esm4543029plh.126.2023.08.11.17.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 17:50:57 -0700 (PDT) Date: Fri, 11 Aug 2023 17:50:57 -0700 (PDT) X-Google-Original-Date: Fri, 11 Aug 2023 17:50:46 PDT (-0700) Subject: Re: [PATCH v2 2/2] Propagate NT_RISCV_VECTOR from Linux kernel headers to binutils. The value is identical to pre-existing NT_RISCV_CSR but the note names different (NT_RISCV_CSR is "GDB" and NT_RISCV_VECTOR is "CORE") In-Reply-To: <3c7ed690-2ab5-a71f-6302-8ba94ba39525@FreeBSD.org> CC: Andrew Burgess , gdb-patches@sourceware.org, binutils@sourceware.org, greentime.hu@sifive.com, greg.savin@sifive.com From: Palmer Dabbelt To: jhb@FreeBSD.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 11 Aug 2023 17:47:29 PDT (-0700), jhb@FreeBSD.org wrote: > On 8/11/23 9:43 AM, Palmer Dabbelt wrote: >> On Fri, 11 Aug 2023 05:51:45 PDT (-0700), Andrew Burgess wrote: >>> Greg Savin via Gdb-patches writes: >>> >>>> --- >>>> include/elf/common.h | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/include/elf/common.h b/include/elf/common.h >>>> index e7eede23a07..d28f5c6ccf5 100644 >>>> --- a/include/elf/common.h >>>> +++ b/include/elf/common.h >>>> @@ -715,6 +715,8 @@ >>>> /* note name must be "CORE". */ >>>> #define NT_RISCV_CSR 0x900 /* RISC-V Control and Status Registers */ >>>> /* note name must be "GDB". */ >>>> +#define NT_RISCV_VECTOR 0x900 /* RISC-V Vector Registers */ >>>> + /* note name must be "CORE". */ >>> >>> I'm not a binutils maintainer, but do have an interest from the >>> RISC-V/GDB side. >>> >>> Given the comments you made in an earlier mail, I guess we're going to >>> have to restructure some of the core file support in order to handle >>> NT_RISCV_CSR and NT_RISCV_VECTOR having the same values. But that >>> should be doable. >>> >>> No objections to this patch from me. >> >> NT_RISCV_VECTOR isn't in a releasted kernel, so it's not a stable uABI >> yet. So there's still time to change it. 0I've got a revert on the >> kernel lists, it'd mean we miss 6.5 but we'd just end up in 6.6 which >> isn't so bad. > > While it is possible to handle colliding NT_RISCV_* values, it will probably > be simpler all-around if you are able to make NT_RISCV_VECTOR be 0x901 since > you are going to revert and redo. Ya, that'd be part of the reason to backport it, there's also one or two other bugs we found so it's probably just a good sign this wasn't adequately reviewed. Here's the Linux patch