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]
Date:   Tue, 10 Dec 2019 07:12:34 +0530
From:   Sourabh Jain <sourabhjain@...ux.ibm.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     corbet@....net, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
        mahesh@...ux.vnet.ibm.com, hbathini@...ux.ibm.com
Subject: Re: [PATCH v5 3/6] powerpc/fadump: reorganize /sys/kernel/fadump_*
 sysfs files



On 12/9/19 1:40 PM, Greg KH wrote:
> On Mon, Dec 09, 2019 at 10:28:23AM +0530, Sourabh Jain wrote:
>> +#define CREATE_SYMLINK(target, symlink_name) do {\
>> +	rc = compat_only_sysfs_link_entry_to_kobj(kernel_kobj, fadump_kobj, \
>> +						  target, symlink_name); \
>> +	if (rc) \
>> +		pr_err("unable to create %s symlink (%d)", symlink_name, rc); \
>> +} while (0)
> 
> 
> No need for a macro, just spell it all out.  And properly clean up if an
> error happens, you are just printing it out and moving on, which is
> probably NOT what you want to do, right?

Yeah actually there is no point in keeping the fadump_enabled symlink if fadump_registered
symlink creation fails.

And it is even better to unregister the FADump if fadump_group creation fails.

> 
>> +static struct attribute_group fadump_group = {
>> +	.attrs = fadump_attrs,
>> +};
> 
> ATTRIBUTE_GROUPS()?

Thanks, I will use this macro.

-Sourabh Jain



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ