Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1242113yba; Thu, 4 Apr 2019 07:03:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwUleH46JkjafQg8NOBhk3iW6LypQ/5S/M8bynINs+zViI5VrKNWWkL6s+IzryEa2VQAB3 X-Received: by 2002:a17:902:2de4:: with SMTP id p91mr6446961plb.191.1554386634271; Thu, 04 Apr 2019 07:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554386634; cv=none; d=google.com; s=arc-20160816; b=J9ar+LIoJ4d6hNMD3MWvozv17ROIdrQjwBJQxn64oJLuTgH63GrMOu9cDfbmjYGx1S n3mEMwgTE0d3ItAJ03B0u0wttGwSyCTU2LN91TsxK0soYrR7fcKVhBsf0BQKT9RFFyxL Gc8TAcGVnmq71ubkyXuxIPSm4ZCjjd2kFnYc8NdPHc7hkLowQun7XMmPCXcJlHrHnT2u WnIpFKAgjMYimAg0fj2yNHcdJo54/+5PdtmJp3PwX7+yGv2FGnxc1UHlrHRw6fR4C9bC HdUJ1zvWJQSVp+AWmpJaRIOKrw5xKdD3KGIzl7SuMl0uftUvXxrg7FoQasl+rANbpKGP j2Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zb6Zc38+T8moYHfPGeyN6ohNBSyfvNZMSgwLmiPCjlM=; b=UqyxB2lgw5bSu0pOJNxlNMMtGMgKgSO6j0fXuElrS+5UoIkUCyd59KB3FUN8apqEyG gc5RIU9R6kXcLD8YIpv01RivnQ17FhsuAjCI/gHgq/3BXLJ4c4fJ5t7OrBhPxnu1Y4Br bWZ+L7/0SoK9N1DhzGBT8PedEEi21S4cgehZii1yhK9UX82UgT00to7B4Xn/xxBWHisp Kv/3jDPYrdurdTYAlVH59FI5zCE9t16Z3QTSScuwN1GCBb/ozrI8xtocPiQ5PfolRodm 1uqMJq3UO2+i47P13mvDOxG9d965gX+SyjqbicVfCRHfD1XvZqR4f8fcZUkGY8qVhequ 0IcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si16055523pgp.391.2019.04.04.07.03.38; Thu, 04 Apr 2019 07:03:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728862AbfDDOCO (ORCPT + 99 others); Thu, 4 Apr 2019 10:02:14 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:42156 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727039AbfDDOCN (ORCPT ); Thu, 4 Apr 2019 10:02:13 -0400 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 940DB72CCF7; Thu, 4 Apr 2019 17:02:10 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 8B1F07CCE4F; Thu, 4 Apr 2019 17:02:10 +0300 (MSK) Date: Thu, 4 Apr 2019 17:02:10 +0300 From: "Dmitry V. Levin" To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Andrew Morton , Andy Lutomirski , Roland McGrath , Oleg Nesterov , linux-arch@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , "Gustavo A. R. Silva" , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Dominik Brodowski , Andy Lutomirski , Kees Cook , "Eric W. Biederman" , Palmer Dabbelt , Will Drewry , Albert Ou , linux-riscv@lists.infradead.org Subject: Re: [PATCH 3/6 v3] riscv: Fix syscall_get_arguments() and syscall_set_arguments() Message-ID: <20190404140210.GC4962@altlinux.org> References: <20190401134104.676620247@goodmis.org> <20190401134420.958530155@goodmis.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VywGB/WGlW4DM4P8" Content-Disposition: inline In-Reply-To: <20190401134420.958530155@goodmis.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --VywGB/WGlW4DM4P8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 01, 2019 at 09:41:07AM -0400, Steven Rostedt wrote: > From: "Dmitry V. Levin" >=20 > RISC-V syscall arguments are located in orig_a0,a1..a5 fields > of struct pt_regs. >=20 > Due to an off-by-one bug and a bug in pointer arithmetic > syscall_get_arguments() was reading s3..s7 fields instead of a1..a5. > Likewise, syscall_set_arguments() was writing s3..s7 fields > instead of a1..a5. >=20 > Link: http://lkml.kernel.org/r/20190329171221.GA32456@altlinux.org >=20 > Fixes: e2c0cdfba7f69 ("RISC-V: User-facing API") > Cc: Ingo Molnar > Cc: Kees Cook > Cc: Andy Lutomirski > Cc: Will Drewry > Cc: Palmer Dabbelt > Cc: Albert Ou > Cc: linux-riscv@lists.infradead.org > Cc: stable@vger.kernel.org # v4.15+ > Signed-off-by: Dmitry V. Levin > Signed-off-by: Steven Rostedt (VMware) According to https://lore.kernel.org/lkml/mhng-8e9b547b-7fe3-43d2-9dea-b217de923605@palm= er-si-x1c4/ the following tag could be added to this patch: =20 Acked-by: Palmer Dabbelt --=20 ldv --VywGB/WGlW4DM4P8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJcpg5iAAoJEAVFT+BVnCUIDIAP/3GSr42HPH1rGGfez7Mp3k1o M+8EC8bLlrRNLd2j5aoPWq+nkh+cWTnfv0b8ti6L7mvbQn5234wD/bDsE7Gu0XXA msxnRFf810p+74KGQRkPVsBzchSE6lP3y3uvKTsB80UGMPI+B7T17PMxCbFjpFPT a5wX7cJ2aAimU3h36wwKA5x65oJk18cI4/+hu4bXKRiUkYNMtbHKS+oqAGgDNuax awzYF8Ii6Kd7PP+dIIf/Uc00FKdv8wLIgOcAXrM65QyrpyQDwfmdvH9r4mf2P/IK D0FsyQt45fBMwSocQltMJUqB264I7BWT6JnqftwsEZlmREHG0zg8egOb7BvMJJXZ ijSzX1SXiiv58EKUDqchjA/8T7mgPr0VybnWDPXN/RAbCyIFxtd8jQ6hpB8IoTri oRazU1t9KuJ+m5TTEixoNmu64NsRL0eyqgAsIeLP4qSHDKGAYBM2ZR/eqTFGtvgK Dk6XbKWaVkQRPFp9EDO/1W/cSo2XJiKV+viSl3DrbxdfCXpZ5PGz+vU+ICRvm/eF Hnw2Qe0ZPAQtmjzDD83fRLYiImN6UuULnXzFM5STsQIFwRscGDGVI39F+0tESXI9 1+4lzzn0lZL1t9pMIdHAu+o/eyqu2O5pD3rQVBweGT+3LQ9dhoTTl14U6XSjUHOl 0DoNd/EsPdwSIOTAT/QG =0m93 -----END PGP SIGNATURE----- --VywGB/WGlW4DM4P8--