Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4588729imm; Mon, 11 Jun 2018 15:16:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLCMDlzuf7XgyavA9OJAulPjw5bVwEqL9DskEUNI+sIi2jxVJfmxQ1/oLvQGymm3vcKHJEg X-Received: by 2002:a62:a8e:: with SMTP id 14-v6mr954429pfk.57.1528755375533; Mon, 11 Jun 2018 15:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528755375; cv=none; d=google.com; s=arc-20160816; b=hOssWeQfw3VZENNXTcSLns1/L3vbTTzpY/VCwAyBkyQpqFnc7xnAOdL0JVabA7FwWI Jem/RRJ888Dkuovy3spBeHMyUjQuGB9ke3zZXz/dcXeJOsMslM/JhBpmxx3Dc5N6Ku5R ny/iLac9/paZznkawvw9cHYtTuftKf95xGGi5Ik8PrYpSCuL39P6ty8QYHEcf5whnn4c CQOb0Ez/Oc3PIU0IH9tuzHoYGiIdlJVH9X33AawpN6l+6s6Jyu45WezKyCtSS+F1YVem BnAykrnJMmE3UP6xaS7oahgQdZhsYDZNt+pL3/kckKEQdPcjV6NS+bqxvQUi2hwtz/zT 2djw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=nbRfi1DqzuU2+C610KN0oKbD2xVholLrrhMtfij4Q64=; b=ubkvfBjuZUQe/+X7VfuGnKbsDNB5QtmobgOBFLol71zzJZ0iROJPdYHcYsMeu9NoNv OCbuYu6FVoZCwY3QTa4gnObPUmMYSgpkmAWxj+h3lHfMO/cOnTohXN3+YutM8B6dICPC IXNWS6CE/CHdegt3+BggsunPgtbmlbxKKwqN6+3RJ6noHu6XQRvTy6pnaEFGGS4g8qfe i9XbeGvl5WdO2domN3zocovkO272uHfHDO6veE+Nim7x5myWlMLrADCplkLYYVdEGz0X Saw1aUrPipbT09Qx9fHOWTGvmui1aICyR3KDmSMHtMWSkxxx82q3v0eDIu2EZhMyDlg2 hxzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=V0dLBdCr; 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 x3-v6si4102481pfi.230.2018.06.11.15.15.48; Mon, 11 Jun 2018 15:16:15 -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; dkim=pass header.i=@sifive.com header.s=google header.b=V0dLBdCr; 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 S934643AbeFKVv0 (ORCPT + 99 others); Mon, 11 Jun 2018 17:51:26 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:32807 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934508AbeFKVvY (ORCPT ); Mon, 11 Jun 2018 17:51:24 -0400 Received: by mail-pl0-f66.google.com with SMTP id n10-v6so13084704plp.0 for ; Mon, 11 Jun 2018 14:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id; bh=nbRfi1DqzuU2+C610KN0oKbD2xVholLrrhMtfij4Q64=; b=V0dLBdCriLigGV9ZC3WwUeaEQuZLN8Vm4PnnZrHb4B0sAIRFmgGUR/7MqpEWtI1rLw 5bKiFvJJaouxJRMOq0wUbPp4wcn++ETB62/bKPY4Dvj6zZXd9QwxIkWcI+O67BfYB7K5 D8VPXKms6YUX5+LtU3uOuzKBvFLfI5N5582HZKAQdV7OtbR5cmHqgGbH3khcCJJAMzbB R8fjKCcNolKuBtAChV1FSWctLzyHC+oRWGP38UiyRSDISfbtht/mYQbhberpMmRucZMH M58pkEw9m5W0Lb/XXFIGmRcu1dyMMMf9lzoJQM2L5NI22se6ZuOX5nlHJM0oYxSpsxVq aNqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nbRfi1DqzuU2+C610KN0oKbD2xVholLrrhMtfij4Q64=; b=Z7uTwzQ50U+qVRCfMEsTXQ8hLjY28dxJN7shAiT37Q377ZtL5J005nB7kMCmHBf1Vd sSczPgXRK3L62WD+b9M6T4ybmsGoBDXuoC4EjnNWvoAiz51g4T6fSb4Fo7CwOklcLydr LXfhrpS2xZbnFFnNtk7cIvCm2Rmd3t8V78anvrI1fl8brLskSiqHw4KDkM1yo0F8Ck/W zEq8prgUHiWb2X8lxHCGTVEV+KKZ+LUmb2RruI7/T5hKsIGMipKrG6nVjwBXvcOJgpyG OOHbFs14ZfeduyqrJoI1QUDrbCQzYdNUuGl3ETkGy2i8baE/65rCiXV8g+YlKChLYamk vhbg== X-Gm-Message-State: APt69E0LE6y5qlhqHrOLXkw1apjyLjDcHX91yjElu4L2TuqXXJm2qvqu ux6fq/IeSsoQe6hyZzsLWG4J5A== X-Received: by 2002:a17:902:530e:: with SMTP id b14-v6mr948989pli.316.1528753883858; Mon, 11 Jun 2018 14:51:23 -0700 (PDT) Received: from rohan.internal.sifive.com ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id d9-v6sm72740859pfg.183.2018.06.11.14.51.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 14:51:22 -0700 (PDT) From: Jim Wilson To: linux-riscv@lists.infradead.org Cc: jimw@sifive.com, Oleg Nesterov , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org Subject: [PATCH] RISC-V: Fix PTRACE_SETREGSET bug. Date: Mon, 11 Jun 2018 14:48:22 -0700 Message-Id: <20180611214822.8539-1-jimw@sifive.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In riscv_gpr_set, pass regs instead of ®s to user_regset_copyin to fix gdb segfault. Signed-off-by: Jim Wilson --- arch/riscv/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index ba3e80712797..9f82a7e34c64 100644 --- a/arch/riscv/kernel/ptrace.c +++ b/arch/riscv/kernel/ptrace.c @@ -50,7 +50,7 @@ static int riscv_gpr_set(struct task_struct *target, struct pt_regs *regs; regs = task_pt_regs(target); - ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®s, 0, -1); + ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1); return ret; } -- 2.17.1