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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7f854130-e92f-488f-9c56-a65f86b95567@app.fastmail.com>
Date: Fri, 22 Mar 2024 21:24:13 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Geoff Levand" <geoff@...radead.org>,
 "Geert Uytterhoeven" <geert@...ux-m68k.org>,
 "Arnd Bergmann" <arnd@...nel.org>
Cc: llvm@...ts.linux.dev, "Kevin Hao" <haokexin@...il.com>,
 "Aneesh Kumar K.V" <aneesh.kumar@...nel.org>,
 "Nick Desaulniers" <ndesaulniers@...gle.com>, linux-kernel@...r.kernel.org,
 "Nathan Chancellor" <nathan@...nel.org>,
 "Nicholas Piggin" <npiggin@...il.com>,
 "Justin Stitt" <justinstitt@...gle.com>,
 "Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>, linuxppc-dev@...ts.ozlabs.org,
 "Bill Wendling" <morbo@...gle.com>
Subject: Re: [PATCH] powerpc: ps3: mark ps3_notification_device static for stack usage

On Fri, Mar 22, 2024, at 09:34, Geoff Levand wrote:
> On 3/21/24 17:32, Geert Uytterhoeven wrote:
>> --- a/arch/powerpc/platforms/ps3/device-init.c
>>> +++ b/arch/powerpc/platforms/ps3/device-init.c
>>> @@ -770,7 +770,7 @@ static struct task_struct *probe_task;
>>>
>>>  static int ps3_probe_thread(void *data)
>>>  {
>>> -       struct ps3_notification_device dev;
>>> +       static struct ps3_notification_device dev;
>>>         int res;
>>>         unsigned int irq;
>>>         u64 lpar;
>> 
>> Making it static increases kernel size for everyone.  So I'd rather
>> allocate it dynamically. The thread already allocates a buffer, which
>> can be replaced at no cost by allocating a structure containing both
>> the ps3_notification_device and the buffer.

I didn't think it mattered much, given that you would rarely
have a kernel with PS3 support along with other platforms.

I suppose it does increase the size for a PS3-only kernel
as well, while your version makes it smaller.

> Here's what I came up with.  It builds for me without warnings.
> I haven't tested it yet.  A review would be appreciated.

It seems a little complicated but looks all correct to
me and reduces both stack and .data size, so

Acked-by: Arnd Bergmann <arnd@...db.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ