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]
Message-ID: <CAAhV-H5dAubLUrcfr2nQi3kjAcDJfQ+st_TGAac1mQ-suKuUHQ@mail.gmail.com>
Date:   Sat, 18 Sep 2021 15:16:35 +0800
From:   Huacai Chen <chenhuacai@...il.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Huacai Chen <chenhuacai@...ngson.cn>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Airlie <airlied@...ux.ie>,
        Jonathan Corbet <corbet@....net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        "open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>,
        Yanteng Si <siyanteng@...ngson.cn>,
        Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: Re: [PATCH V3 17/22] LoongArch: Add some library functions

Hi, Arnd,

On Fri, Sep 17, 2021 at 4:33 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Fri, Sep 17, 2021 at 5:57 AM Huacai Chen <chenhuacai@...ngson.cn> wrote:
> >
> > diff --git a/arch/loongarch/lib/strncpy_user.S b/arch/loongarch/lib/strncpy_user.S
> > new file mode 100644
> > index 000000000000..b42d81045929
> > --- /dev/null
> > +++ b/arch/loongarch/lib/strncpy_user.S
> > @@ -0,0 +1,51 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (C) 2020-2021 Loongson Technology Corporation Limited
> > + */
> > +#include <linux/errno.h>
> > +#include <asm/asm.h>
> > +#include <asm/asmmacro.h>
> > +#include <asm/export.h>
> > +#include <asm/regdef.h>
> > +
> > +#define _ASM_EXTABLE(from, to)                 \
> > +       .section __ex_table, "a";               \
> > +       PTR     from, to;                       \
> > +       .previous
> > +
> > +/*
> > + * long __strncpy_from_user(char *to, const char *from, long len)
> > + *
> > + * a0: to
> > + * a1: from
> > + * a2: len
> > + */
> > +SYM_FUNC_START(__strncpy_from_user)
> > +       move    a3, zero
> > +
>
> I just removed most custom __strncpy_from_user/__strnlen_user
> implementations from architectures, and I think you should remove
> these as well. Your current version probably does not work any more
> with v5.15-rc1, and it is neither efficient nor robust.
I'm very sorry for this. You have talked about these functions in V1,
and I do removed them in the Makefile, but kept the source files...

Huacai
>
>         Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ