Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1719559ybh; Thu, 23 Jul 2020 16:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0kIQXY0urn8/XQDPqOsaQWFx2IoVXCbLaSpca9bV510sGKtpgw2+XZ6YbpLIwtUjHoatx X-Received: by 2002:a17:906:1e85:: with SMTP id e5mr6707601ejj.76.1595546612577; Thu, 23 Jul 2020 16:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595546612; cv=none; d=google.com; s=arc-20160816; b=h7g2V0ia27/otWJJ+7811SftUXcvsG6ec9mdLWfdO8+K1Qok0bYl6ZohOY2Qd3X8qH O4ltZ+uN1QFc23sUTOKny7i9+zecMFs+6kAwg5M9mk8RuOKRgamPbwOJFx96MHw7EMqu nvIzXZ+Pg+3+hJAXHUON4ZL6ycSoPWygHur2UzIrB9VNZ8yMdLzHTsST0xUwGy2yyxmi oDVNe3PtlTED+ppwhqO3OGCGpVXqSWVI39BUjDeBT3gUaZ355mPUuvi+SHaiUkexIrn+ IKrVRZZPT2AcH7AGGg3zAZ8Fw79addbciErCMP8i2PaDYxkX70/GcZWX4Isyk09+Efb8 FK/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date:wdcironportexception:ironport-sdr :ironport-sdr:ironport-sdr:dkim-signature; bh=k2y7nN0wLCcazdhmY/cXdwawcCJscKcagwHYUbk6SwY=; b=idEqET6GZ77nQM6iGtgdwhbJF7+XdA1Ds0ILDecRnBVjwnHjaMBFNmpSw6oZ6trjfL 2Y9X5g+Bl70jso9GGEUkEypVWeb8LPaddrYfoGbFdc5vCP8gSH/xynUQqdfSUKEXx1gM WkpKlcW6jmn+NK5GqI1tZUUWVRxRFRx/LU8ikJXR7sb0L9GKoA909O8EdNAQuFZGsvD6 fv25ijc6jNPDK1alA19q/67Prdmu2Q3pO8JVc6GsEk39lvseU62UgU/AVgZk4arOzby5 HP9SniOvUiwB70xeLGhi7Xu9zlMAapNYCbn1/2Wx0lFxaK/87MYSCc5GWWTpyeq367nZ Xz/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=bjIYzggr; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si2891074ejx.552.2020.07.23.16.23.10; Thu, 23 Jul 2020 16:23:32 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=bjIYzggr; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728206AbgGWXWD (ORCPT + 99 others); Thu, 23 Jul 2020 19:22:03 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:5387 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbgGWXWC (ORCPT ); Thu, 23 Jul 2020 19:22:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1595546524; x=1627082524; h=date:from:to:cc:subject:message-id:mime-version; bh=QgeslEf13WULvCxIOUP4MQ+OmCsX7gpbdkOpEsc+l7k=; b=bjIYzggr13ZfjjpRhtCJoLeoueWrEZYUbyxbkP01YRIUnj5MS0tzbyK+ JzogF3oV517kKLTYE36hs/HM6cKL1D+i6s/TOKYuRDm3ByLEwj6PlavWN 0jQHW2ONrkNoGmN2o+gMMDDwr/cRvl58h43DRNOT9vShvqIHICjaWfxI9 ai/QHz9V2r9ywHNRVJr5E24i8/m1nNHEg4iUSNVzSa3p5Mvesr2BDs0b1 gF1eXFeKifkvYIEYBbidn1gPpveXBB9wLqfDX4S0Qq9pM3VgqqM2TtajP qxiugpMf1MrAJBfxSk4rY0+mh4gsP5ovVRG8g9oDZXflW48TYxSMW3LuM Q==; IronPort-SDR: cAQl5o5vxYIbbHmq0jCHSomOpbLo7MT+cfuc89UXcL/neg0X/nvAnexHLpYYCfx5vcLsCcxDIF Pe3bbOh8kpMbkmULar13NWADXSPNKmmzFpUNXQvZDrTSRrh7pCsbcL5l1klOyCkPs1JcgpRHlF mazRQXUxnAkRK2NznO9EWfh1nvdaVCNrrhQq7XCrjPdnK+3JjNMx+//7S1K0U9UhJdakO9I60j hooouX+Htp05eRscN9Icwwvg7erMXWPmFpxTaJL0rkFHES4FvkV8eUCRKK9mQsdDmjUI2S/Nnq jx4= X-IronPort-AV: E=Sophos;i="5.75,388,1589212800"; d="scan'208";a="246304471" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 24 Jul 2020 07:22:04 +0800 IronPort-SDR: A685du3fDRLzqCOVDoE/3cKvvNi/bs23ylvn9j/socAgIab+OXhm7n8QA0YtSpv7zv4MEyGsCr 1WGBf6a970zH1hbDoW/s2C4Puepu7Z3no= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 16:09:41 -0700 IronPort-SDR: ZPvGnB3aMrvnPWiKC7eRCLgc2ktzcPW7hTaG4A1gddAOuTb3tpozRaADX96nfFxia79ARXWeH9 j6d7hGRNqG/w== WDCIronportException: Internal Received: from unknown (HELO redsun52) ([10.149.66.28]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2020 16:22:01 -0700 Date: Fri, 24 Jul 2020 00:21:57 +0100 (BST) From: "Maciej W. Rozycki" To: linux-riscv@lists.infradead.org cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org Subject: [PATCH 0/2] riscv: ptrace: NT_PRFPREG regset access fixes Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, In the course of adding RISC-V/Linux support to `gdbserver' I examined our Linux regset code to make sure I get the userland side right and discovered a discrepancy between how our internal `user_regset_copyout' and `user_regset_copyout' API has been defined and how we call it in the RISC-V backend in the handling of the NT_PRFPREG regset. Additionally I found that code violating our coding style. To address these issues I made this small patch set, addressing each of them separately. See individual change descriptions for details. These changes are hopefully obviously correct, however to make sure I have verified them manually with a HiFive Unleashed board running `gdbserver' controlled remotely by GDB and also by running the full GDB testsuite in the same environment using the lp64d ABI, without and with the changes applied. Please apply. Maciej