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: <51DE1F23.2090303@asianux.com>
Date:	Thu, 11 Jul 2013 10:57:39 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Chen Gang F T <chen.gang.flying.transformer@...il.com>,
	khali@...ux-fr.org, David.Woodhouse@...el.com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel/params.c: print failure information instead of
 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

On 07/11/2013 09:53 AM, Rusty Russell wrote:
> Chen Gang F T <chen.gang.flying.transformer@...il.com> writes:
>> > On 07/09/2013 04:07 PM, Rusty Russell wrote:
>>> >> Chen Gang <gang.chen@...anux.com> writes:
>>>> >>> When sysfs_create_file() fails, recommend to print the related failure
>>>> >>> information. And it is useless to still 'KOBJ_ADD' to user space.
>>>> >>>
>>>> >>> Signed-off-by: Chen Gang <gang.chen@...anux.com>
>>> >> 
>>> >> sysfs_create_file() should not fail during boot, should it?
>>> >> 
>> >
>> > Hmm..., please reference locate_module_kobject() in "kernel/params.c",
>> > which is an '__init' function, and also call sysfs_create_file(), it
>> > processes the related error.
>> >
>> > So I recommend to get the check too in version_sysfs_builtin().
> It still can't fail.  sysfs_create_file() can fail due to OOM (not at
> boot) or name duplication (not here).
> 
> You can BUG_ON() if you want.
> 

OK, thanks, I will send patch v2 for it.


> And feel free to fix locate_module_kobject() in a separate patch.

OK, thanks, I will send related patch for it.

:-)


Thanks.
-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ