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:   Sun, 20 Mar 2022 22:09:00 +0700
From:   Ammar Faizi <ammarfaizi2@...weeb.org>
To:     Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>
Cc:     Willy Tarreau <w@....eu>, "Paul E. McKenney" <paulmck@...nel.org>,
        Nugraha <richiisei@...il.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        x86@...nel.org, llvm@...ts.linux.dev,
        David Laight <David.Laight@...LAB.COM>
Subject: Re: [RFC PATCH v1 3/6] tools/nolibc: i386: Implement syscall with 6
 arguments

On 3/20/22 5:42 PM, Alviro Iskandar Setiawan wrote:
> On Sun, Mar 20, 2022 at 5:33 PM Alviro Iskandar Setiawan wrote:
[...]
>> I don't think you can safely use redzone from inline Assembly. The
>> compiler may also use redzone for a leaf function. In case the syscall
>> is done at the same time, your %ebp saving will clobber the redzone
>> that the compiler uses.

It turned out we don't have a redzone for 32-bit.

>>
>> -4(%esp) may be used by the compiler on a leaf call, you can't clobber that.

Yeah, this is still wrong even with a redzone.

> Using xchgl to preserve %ebp in the same place where the arg6 is
> stored in memory is a better solution and doesn't clobber anything.
> 
>      xchgl %ebp, %[arg6]
>      int    $0x80
>      xchgl %ebp, %[arg6]

Addressed your review in my response to David.

Thanks!

-- 
Ammar Faizi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ