Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp790722pxa; Wed, 5 Aug 2020 12:51:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytnhSJvrkKgMCROhne5kMJhcE2+tBtl73h5Kx87uuuw1/iM6exkszAwqG1e9TgKOBB9022 X-Received: by 2002:a17:906:1105:: with SMTP id h5mr884940eja.307.1596657089872; Wed, 05 Aug 2020 12:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596657089; cv=none; d=google.com; s=arc-20160816; b=Wirx0x26w+KIBxYOXCNQzUXF7Ax00XflfYlB96caFz38Ohl/cE+3gWlVR6vG01Cv8K mdNX1IR6suOfAHpCsRnrWb5zVVBMuAql1JDFUUbBuFPwXBU/r39riTITUnQPmxa75C3x p+hQOJTMV/wfK87YUH5FP44fstmG89/oCsuwbnYWvyi9mpwlHnoLPiKHqBcYAYCZj+f2 D17o/rcC6PZpP8sj1JKuMwVEsRRvqcKhVw+2EamHpMMworZZlzPuyMeEa6tWt4WQ2H0+ k9Lj44nbVC6UlKZgvsqtmj6EiXrsmYfQjkViVDlh4P7l84amIsQ8Y0ShVM8oFSgPYDRK /L3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=L17CWK1m3SliQ1EsOYU/bGzhjK9+vwZDDuk1FmFiO2U=; b=PaMF7pSjLqCavoS9AthYpz+ENb2B0rR0NI/Gn5jD1pAF1LkrmRsbyeKMM83gE8u8oN TVK2cyw5/POauH3Kzbqm1l9ZF92416jN3ncaiQSsqubBG1XAYthMJkuHGDoCebsYHdKr XabQy6PkrQ4DaFqQH6uu/oFrvUWQb/H61T+O+nnXpa/+/VCW6+qBk5Oc3BHYL7QTlxog Xj0VAABUEG76C2keBV3PokQlX80SRXQN6aHlKArX8lKLmZ2zRsjIBWwUChGjDVAKfy2B gvGV/VCxmcOH1rSZvv6T2sMbQ/MaVf/8gZ6K598eoXDRDolGvLYfTTsIf2hySmM6fL8y 2+Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=1pykeJF3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si2010395ejr.184.2020.08.05.12.51.06; Wed, 05 Aug 2020 12:51:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dabbelt-com.20150623.gappssmtp.com header.s=20150623 header.b=1pykeJF3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728326AbgHETtH (ORCPT + 99 others); Wed, 5 Aug 2020 15:49:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728339AbgHETsw (ORCPT ); Wed, 5 Aug 2020 15:48:52 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94A9BC061575 for ; Wed, 5 Aug 2020 12:48:52 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id k18so16212602pfp.7 for ; Wed, 05 Aug 2020 12:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=L17CWK1m3SliQ1EsOYU/bGzhjK9+vwZDDuk1FmFiO2U=; b=1pykeJF3J6nCADZe+oNtNIXQbcs+6ezxghmqOsh5fLU98/DwcNnv6LNoX+V1+UugAi jbyJ8S2TBOozl6G1DzMZCxynY3o6i+DGfRl/10ug/Rn+wOeWxyon8mc4qCiNfAcSOlaX Q1HDUu/1/pzCfyrajnzKkwAgyJeEag+JYZyhXLp5kmPoCJVhcp06Lw+lUiLi3NvQWbh4 DG7P2QZ5iwlFIXFcJf3lYuWJzqqkVt3SAFOCFWWRU+dvO/DS/jWqvpCT48AGYfs2XRGS II4pH/3/UBYQglTe1cGiwkxrDjQCtBpGnFjwHqTV0iO7m94pOe11X7M/NWYeGUYJjqyr FznA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=L17CWK1m3SliQ1EsOYU/bGzhjK9+vwZDDuk1FmFiO2U=; b=qr0DoveL+Tbda+DC0szfFdE4nRn0COXr9j6IM89q08rcntY2rh5tQd3OAeFd8rNji2 EJGJNfB0Y1isBnMvPoqPwOswBtL05A0qSBweTR2a7yXCxs4H0mjQ1hdLwtvvtqXnCIMZ tf8p7wZYH+E62RC3xN+fszYaEyesL+9z84nMTQW6GiwD4/K9D073+4yCspcLQHPCqiZf Jf2zY9eLnRceGYZ6/+59M5l6dkifPltUUTSbIG8UUZRL5nOvza/XCgDrjOP2ZKVDhHn0 Jaa+cPh4VZcM++wtHhWFSmK9pjnCBFntDTFUTJj7C8pGYitTT+dEpM+5kKSglPZlRMcE k5dQ== X-Gm-Message-State: AOAM530KgfuXB2NRahdctQA67C0yYYuvMyJZ9Bl/TuluhKdSqIKUyJ5n WaDegeYK7yF7/NP7AUo+J4t5/w== X-Received: by 2002:a63:e00c:: with SMTP id e12mr4364217pgh.413.1596656931925; Wed, 05 Aug 2020 12:48:51 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id z189sm4627140pfb.178.2020.08.05.12.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 12:48:51 -0700 (PDT) Date: Wed, 05 Aug 2020 12:48:51 -0700 (PDT) X-Google-Original-Date: Wed, 05 Aug 2020 12:48:49 PDT (-0700) Subject: Re: [PATCH 1/2] riscv: ptrace: Use the correct API for `fcsr' access In-Reply-To: CC: viro@zeniv.linux.org.uk, linux-riscv@lists.infradead.org, Paul Walmsley , aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org, stable@vger.kernel.org From: Palmer Dabbelt To: macro@wdc.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 05 Aug 2020 03:25:11 PDT (-0700), macro@wdc.com wrote: > On Wed, 5 Aug 2020, Al Viro wrote: > >> > I'm not sure I understand what you're saying, but given that branch replaces >> > all of this I guess it's best to just do nothing on our end here? >> >> It doesn't replace ->put() (for now); it _does_ replace ->get() and AFAICS the >> replacement is much saner: >> >> static int riscv_fpr_get(struct task_struct *target, >> const struct user_regset *regset, >> struct membuf to) >> { >> struct __riscv_d_ext_state *fstate = &target->thread.fstate; >> >> membuf_write(&to, fstate, offsetof(struct __riscv_d_ext_state, fcsr)); >> membuf_store(&to, fstate->fcsr); >> return membuf_zero(&to, 4); // explicitly pad >> } > > I'm glad to see the old interface go, it was cumbersome. > >> user_regset_copyout() calling conventions are atrocious and so are those of >> regset ->get(). The best thing to do with both is to take them out of their >> misery and be done with that. Do you see any problems with riscv gdbserver >> on current linux-next? If not, I'd rather see that "API" simply go away... >> If there are problems, I would very much prefer fixes on top of what's done >> in that branch. > > I can push linux-next through regression-testing with RISC-V gdbserver > and/or native GDB if that would help. This is also used with core dumps, > but honestly I don't know what state RISC-V support is in in the BFD/GDB's > core dump interpreter, as people tend to forget about the core dump > feature nowadays. IIRC Andrew does GDB test suite runs sometimes natively on Linux as part of general GDB maintiance and we don't see major issues, but I'm pretty checked out of GDB development these days so he would know better than I do. It's always great to have someone test stuff, though -- and I doubt he's testing linux-next. It's been on my TODO list for a long time now to put together tip-of-tree testing for the various projects but I've never gotten around to doing it. Oddly enough, despite not really using GDB I have used it for core dumps -- I was writing a tool to convert commit logs to coredumps with the GDB reverse debugging annotations, but I never got around to finishing it.