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: <20230703101350.493374-1-falcon@tinylab.org>
Date:   Mon,  3 Jul 2023 18:13:50 +0800
From:   Zhangjin Wu <falcon@...ylab.org>
To:     w@....eu
Cc:     arnd@...db.de, david.laight@...lab.com, falcon@...ylab.org,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-riscv@...ts.infradead.org, thomas@...ch.de
Subject: Re: [PATCH v5 09/14] tools/nolibc: add missing my_syscall6() for mips

Hi, Willy

> Hi Zhangjin,
> 
> On Wed, Jun 28, 2023 at 09:37:29PM +0800, Zhangjin Wu wrote:
> > It is able to pass the 6th argument like the 5th argument via the stack
> > for mips, let's add a new my_syscall6() now, see [1] for details:
> > 
> >   The mips/o32 system call convention passes arguments 5 through 8 on
> >   the user stack.
> > 
> > Both mmap() and pselect6() require my_syscall6().
> 
> Very interesting, I didn't manage to make it work previously. Did you
> test it to confirm that it works ? I guess so but since you didn't
> mention, I preferred to ask.
>

Yes, I'm curious too ;-) 

we did add the mmap test cases and run it for mips, as Thomas
suggested, we pass a none-zero pa_offset to mmap() to make sure the 6th
argument is used.

I just re-tested it for mips and printed something like this:

    44 mmap_bad = <0xffffffff> EINVAL                                [OK]
    45 munmap_bad = -1 EINVAL                                        [OK]
    46 mmap_munmap_good
    pa_offset: 8192
    length: 1
    file_size: 12287
     = 0                                          [OK]
    47 open_tty = 3                                                  [OK]
    48 open_blah = -1 ENOENT                                         [OK]

And I also checked the mips support of musl, it evan provide a
__syscall7, so, it should be ok ;-)

The only difference is, musl provide a different clobber list for
'__mips_isa_rev >= 6', I didn't look into the details yet:
https://elixir.bootlin.com/musl/latest/source/arch/mips/syscall_arch.h

Best regards,
Zhangjin

> Thanks!
> Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ