Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4068942pxk; Tue, 22 Sep 2020 09:30:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpW4YEDADSrbdR9lKl5ep8ZgaZ5RjpWK5+Mr5Gq97rII8oObCo5hyJkqqGzN3iKdK3Gj3n X-Received: by 2002:a17:906:9389:: with SMTP id l9mr5936684ejx.537.1600792246054; Tue, 22 Sep 2020 09:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600792246; cv=none; d=google.com; s=arc-20160816; b=Oi+it3o0k7K+Uh1mx2/JYltLpTG+DBWGyqCKEswBn+QS4eqzyReBhmne39feGCXrCV LU18q8YwqQx19yXCMtYkrGL3FRIDFTYvheS1sestCQROAspOiAl6Uu8gL+mHEztDWb0n bXpNxnL/R4rgSLAaJydk6/VLvOrnUZ50JuCfF8R+xanHvH4WGJL/b0OMoncAS7A1DVcD sY+Xn9XJgIBNEjOtMiavVkuKOH1iXXRD9D830c4VKipq9JPmpcBfCKRxL15XpLWjiiSs kDDn4L+cHhbelI6YzIHufaqOJOzE77OPt3BDeJpYP17uelNSy1W2ERF+BYD27FpeEqdV V1kw== 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=FSMWJAHs5+Yw4nVHfi6LgDHJtf0DxZhJKQYIgy1F6kY=; b=N8XR6rGFoUSPLkFEGbZQu8kHY5HPJ9CvKXhquyZLfBCtYByBn2PfFFe2/KioS/Z1tc YdjtKYq0ON7raSiH8pjwmZzpyn0l4RINAIpFaHgLF9PHsjSsl3WkhhqcIkAja2ZLQRtS 9BOwlxvqHH61lNXX5Qyk1pNs2uxc5sxYfIrhJ1+rNCAChWcvpaQz5x7qrTQfdm7dTvXU 8LGcEOaPdJ/mb4xXRol/loafUxFF9e1dfDEAKJ+C2vnNvn/aICZWVkBPoEKjqUzstHBl FNR5/QdVm3UlYgsNwc3jxMgZDp9VDJxO6ZRwxYXiK1KnwVk/BFxmYbcD83BTMS91zmuh 5FfA== ARC-Authentication-Results: i=1; mx.google.com; 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 d19si10777222edp.595.2020.09.22.09.30.21; Tue, 22 Sep 2020 09:30:46 -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; 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 S1726651AbgIVQ3G (ORCPT + 99 others); Tue, 22 Sep 2020 12:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbgIVQ3G (ORCPT ); Tue, 22 Sep 2020 12:29:06 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8CC6C061755; Tue, 22 Sep 2020 09:29:05 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKlA5-003sl7-Vo; Tue, 22 Sep 2020 16:29:02 +0000 Date: Tue, 22 Sep 2020 17:29:01 +0100 From: Al Viro To: Zhenzhong Duan Cc: linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, oleg@redhat.com, guoren@kernel.org Subject: Re: [PATCH] csky: Fix a size determination in gpr_get() Message-ID: <20200922162901.GA3421308@ZenIV.linux.org.uk> References: <20200922091505.471-1-zhenzhong.duan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200922091505.471-1-zhenzhong.duan@gmail.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 22, 2020 at 05:15:05PM +0800, Zhenzhong Duan wrote: > "*" is missed in size determination as we are passing register set > rather than a pointer. Ack. I can push it to Linus today, unless you want it to go through csky tree. Preferences? > Fixes: dcad7854fcce ("sky: switch to ->regset_get()") > Signed-off-by: Zhenzhong Duan > --- > arch/csky/kernel/ptrace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/csky/kernel/ptrace.c b/arch/csky/kernel/ptrace.c > index d822144906ac..a4cf2e2ac15a 100644 > --- a/arch/csky/kernel/ptrace.c > +++ b/arch/csky/kernel/ptrace.c > @@ -83,7 +83,7 @@ static int gpr_get(struct task_struct *target, > /* Abiv1 regs->tls is fake and we need sync here. */ > regs->tls = task_thread_info(target)->tp_value; > > - return membuf_write(&to, regs, sizeof(regs)); > + return membuf_write(&to, regs, sizeof(*regs)); > } > > static int gpr_set(struct task_struct *target, > -- > 2.25.1 >