[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZO3hxnKlWEbT/MPd@biznet-home.integral.gnuweeb.org>
Date: Tue, 29 Aug 2023 19:17:10 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Willy Tarreau <w@....eu>
Cc: Thomas Weißschuh <linux@...ssschuh.net>,
Zhangjin Wu <falcon@...ylab.org>,
Nicholas Rosenberg <inori@...x.org>,
Michael William Jonathan <moe@...weeb.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/1] tools/nolibc: i386: Fix a stack misalign bug on
_start
On Tue, Aug 29, 2023 at 08:21:47AM +0200, Willy Tarreau wrote:
> Indeed, good catch! However if we want to do it cleany (i.e not punch a
> 16 to 28 byes hole in the stack), we should do this instead:
>
> add $12, %esp /* the stack must be aligned to 16 ... */
> and $-16, %esp /* ... bytes after eax is pushed and ... */
> sub $12, %esp /* ... before the call. */
>
> This will only add 0 to 12 bytes depending on the existing alignment.
>
> What do you think ?
Good point. I'll send a v3 revision tomorrow.
I just saw that Linus has pulled the PR from Shuah that contains this
bug. IOW, I missed this fix for the 6.6 merge window. Let's see if it
can go to 6.6-rc2. Or maybe sooner than that.
--
Ammar Faizi
Powered by blists - more mailing lists