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]
Date:	Tue, 10 Dec 2013 14:08:29 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Wu Fengguang <fengguang.wu@...el.com>
Cc:	Rob Landley <rob@...dley.net>, Al Viro <viro@...iv.linux.org.uk>,
	Kay Sievers <kay.sievers@...y.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] devtmpfs: Calling delete_path() only when necessary

2013/12/9 Axel Lin <axel.lin@...ics.com>:
> 2013/12/9 Greg Kroah-Hartman <gregkh@...uxfoundation.org>:
>> On Mon, Dec 09, 2013 at 04:54:29PM +0800, Axel Lin wrote:
>>> 2013/12/9 Greg Kroah-Hartman <gregkh@...uxfoundation.org>:
>>> > On Wed, Dec 04, 2013 at 02:44:14PM +0800, Axel Lin wrote:
>>> >> 2013/12/4 Rob Landley <rob@...dley.net>:
>>> >> > On 11/16/2013 02:15:23 AM, Axel Lin wrote:
>>> >> >>
>>> >> >> The deleted variable is always 1 in current code.
>>> >> >> Initialize deleted variable to be 0, so delete_path() will be called only
>>> >> >> when
>>> >> >> necessary.
>>> >> >>
>>> >> >> Signed-off-by: Axel Lin <axel.lin@...ics.com>
>>> >> >
>>> >> >
>>> >> > I'm not seeing this in linux-next, or a reply on the web archive. Assuming
>>> >> > nobody's objected to this, you might want to forward it to
>>> >> > trivial@...nel.org.
>>> >> >
>>> >> > That said, you could describe what it _does_ a little more?
>>> >>
>>> >> I was expecting Greg to pick up this patch.
>>> >>
>>> >> I thought the description is pretty clear.
>>> >> What the patch does is changing the init value of deleted variable to 0.
>>> >> The intention of this change is to avoid unnecessary delete_path() call.
>>> >
>>> > I agree the logic is a bit odd here, but are you seeing an "unnecessary"
>>> > delete_path() call happening?  The code has always been like this from
>>> > what I can tell...
>>>
>>> Honestly, I havn't see the "unnecessary" delete_path() call happening druing my
>>> test. I look at the code when I was debugging a hangup issue.
>>> (In the end, I think the issue is not related to the devtmpfs code.)
>>> But I found the logic for the deleted variable looks odd.
>>> There are below possible (unlikely) case:
>>> When strchr(nodename, '/') != 0 and
>>> 1. If dentry->d_inode is NULL
>>> 2. vfs_getattr returns error
>>> 3. vfs_unlink returns error except -ENOENT.
>>>
>>> In these cases, delete_path() will fail anyway.
>>>
>>> Although this is a unlikely case, and I know the code is there since initial
>>> commit. But I think it's still good to fix it.
>>
>> Have you tested your patch to verify nothing breaks?
> Yes. I have this patch in my local build image since the day I sent the patch.
Hi Greg,
If you want more testing for this patch to ensure nothing break,
I think maybe Fengguang can also help to test it.

Hi, Fengguang
Can you help to add this patch to your test systems?
It's a one-line change, you can find the patch at
https://patchwork.kernel.org/patch/3192361/

Regards,
Axel
--
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