lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Sep 2020 08:03:20 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Zhenzhong Duan <zhenzhong.duan@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-csky@...r.kernel.org, Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH] csky: Fix a size determination in gpr_get()

Thx Duan,

Acked-by: Guo Ren <guoren@...nel.org>

Hi AI,

I found the broken commit still has a question:

> commit dcad7854fcce6a2d49b6a3ead5bbefeff047e559
> Author: Al Viro <viro@...iv.linux.org.uk>
> Date:   Tue Jun 16 15:28:29 2020 -0400

>    csky: switch to ->regset_get()

>    NB: WTF "- what the fuck :(" is fpregs_get() playing at???
The fpregs_get() is for REGSET_FPR regset used by ptrace (gdb) and all
fp regs are stored in threads' context.
So, WTF question for?

Best Regards
 Guo Ren

On Wed, Sep 23, 2020 at 12:29 AM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> 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 <zhenzhong.duan@...il.com>
> > ---
> >  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
> >



-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ