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: <20180907014757.GB8288@guoren-Inspiron-7460>
Date:   Fri, 7 Sep 2018 09:47:57 +0800
From:   Guo Ren <ren_guo@...ky.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     linux-arch <linux-arch@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Jason Cooper <jason@...edaemon.net>,
        c-sky_gcc_upstream@...ky.com, gnu-csky@...tor.com,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        wbx@...ibc-ng.org, Greentime Hu <green.hu@...il.com>
Subject: Re: [PATCH V3 05/26] csky: System Call

On Thu, Sep 06, 2018 at 04:10:49PM +0200, Arnd Bergmann wrote:
> On Wed, Sep 5, 2018 at 2:08 PM Guo Ren <ren_guo@...ky.com> wrote:
> 
> > +SYSCALL_DEFINE6(mmap2,
> > +       unsigned long, addr,
> > +       unsigned long, len,
> > +       unsigned long, prot,
> > +       unsigned long, flags,
> > +       unsigned long, fd,
> > +       off_t, offset)
> > +{
> > +       if (unlikely(offset & (~PAGE_MASK >> 12)))
> > +               return -EINVAL;
> > +       return sys_mmap_pgoff(addr, len, prot, flags, fd,
> > +               offset >> (PAGE_SHIFT - 12));
> > +}
> 
> Please call ksys_mmap_pgoff() instead of sys_mmap_pgoff() here.
Ok.

> The prototype in include/asm-generic/syscalls.h uses 'unsigned long'
> for the last argument as well, not off_t.
Ok, unsigned long for last argument.
 
> > +struct mmap_arg_struct {
> > +       unsigned long addr;
> > +       unsigned long len;
> > +       unsigned long prot;
> > +       unsigned long flags;
> > +       unsigned long fd;
> > +       unsigned long offset;
> > +};
> > +
> > +SYSCALL_DEFINE1(mmap,
> > +       struct mmap_arg_struct *, arg)
> 
> Something is still wrong here, there should be no way to
> call sys_mmap(), since it's not in the syscall table.
You are right, remove it.

> > +       return sys_fadvise64_64(fd, offset, len, advice);
> > +}
> 
> And call ksys_fadvise64_64() here.
Ok.

 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ