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: <221ba279-e48b-4002-9530-c6186e3e8042@linux.ibm.com>
Date: Tue, 13 Aug 2024 15:35:48 +0200
From: Alexandra Winter <wintera@...ux.ibm.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Vasily Gorbik <gor@...ux.ibm.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
        linux-s390@...r.kernel.org
Subject: Re: [PATCH 2/2] s390/iucv: Fix vargs handling in iucv_alloc_device()



On 13.08.24 14:43, Greg Kroah-Hartman wrote:
>>> I don't understand, why can't dev_set_name() be called here?
>>>
[...]
> 
> But step back, why is this needed at all anyway?  No other subsystem or
> driver needs/wants this, what makes this api so special?  Why not figure
> out your name beforehand?
> 
> thanks,


Vasily, the following update to Heiko's patch does not touch lib/kobject.c
According to a quick test it still solves the original issue and does compile
with W=1 and iucv as a module.

diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index 64102a31b569..6a819ba4ccab 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -86,13 +86,17 @@ struct device *iucv_alloc_device(const struct attribute_group **attrs,
 {
        struct device *dev;
        va_list vargs;
+       char buf[20];
        int rc;

        dev = kzalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev)
                goto out_error;
        va_start(vargs, fmt);
-       rc = kobject_set_name_vargs(&dev->kobj, fmt, vargs);
+       rc = vsnprintf(buf, 20, fmt, vargs);
+       if (!rc)
+               rc = dev_set_name(dev, buf);
        va_end(vargs);
        if (rc)
                goto out_error;



Maybe Greg has somethign like this in mind?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ