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] [day] [month] [year] [list]
Message-ID: <1b599122-5e23-b5a8-054d-80c2d939a710@suse.de>
Date:   Thu, 9 Mar 2023 13:15:49 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Timur Tabi <timur@...nel.org>
Cc:     deller@....de, paulus@...ba.org, benh@...nel.crashing.org,
        linux@...linux.org.uk, pjones@...hat.com, adaplas@...il.com,
        s.hauer@...gutronix.de, shawnguo@...nel.org, mbroemme@...mpq.org,
        thomas@...ischhofer.net, James.Bottomley@...senpartnership.com,
        spock@...too.org, sudipm.mukherjee@...il.com,
        teddy.wang@...iconmotion.com, geert+renesas@...der.be,
        corbet@....net, linux-fbdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 22/99] fbdev/fsl-diu-fb: Duplicate video-mode option
 string

Hi

Am 08.03.23 um 17:26 schrieb Timur Tabi:
> On Tue, Mar 7, 2023 at 2:28 AM Thomas Zimmermann <tzimmermann@...e.de> wrote:
>>> So after module_init is finished, mode_option_buf[] no longer exists?
>>
>> Does the __init attribute on a function affect the static variables in
>> that function?
> 
> That is an excellent question.
> 
> https://stackoverflow.com/questions/64558614/what-happens-to-local-static-identifiers-in-init-function
> 
> I don't think the compiler is naturally aware of whatever section a
> variable or function is placed in, so it can't really know that
> mode_option_buf[] is suppose to have a limited lifetime.
> 
> Either way, the code seems wrong.  If mode_option_buf[] is marked as
> __initdata, then it will disappear before the probe() function is
> called.
> 
> If mode_option_buf[] remains resident, then we are wasting 256 bytes.

I'm preparing an update to this series. The string will be allocated and 
freed with kstrdup() and kfree(). So these issues should be resolved then.

Best regards
Thomas


-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ