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: <546A47C6.4030309@colorfullife.com>
Date:	Mon, 17 Nov 2014 20:08:54 +0100
From:	Manfred Spraul <manfred@...orfullife.com>
To:	Steven Stewart-Gallus <sstewartgallus00@...angara.bc.ca>,
	Davidlohr Bueso <dave@...olabs.net>
CC:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	"J. Bruce Fields" <bfields@...hat.com>,
	Doug Ledford <dledford@...hat.com>,
	linux-newbie@...r.kernel.org
Subject: Re: [PATCH 1/1] ipc/mqueue.c: Drag unneeded code out of locks

Hi Steven,

On 11/16/2014 08:40 PM, Steven Stewart-Gallus wrote:
> Finally, please don't ignore the rest of my message. Even if my patch
> isn't that good there are lots of ways to compromise and improve it
> such as adding tests, annotations and making it clearer.

I think you were already given ideas how to improve the patch:

a) split the patch.

b) create test cases so that you are able to check that the code still 
behaves as it did before
Did you test the change to mqueue_create()?

c) Give each a good summary of what you want to achieve:
- readability
- coding style
- performance
- avoid a lock entirely, switch to RCU instead of spin_lock(), ...
- reduce the time a lock is held (usually only useful if the reduction 
is significant - both relative and absolute).
- ...

Writing that down also helps you:
There were multiple patches that I've dropped myself - simply because I 
have noticed that the patch doesn't achieve anything useful.

 From your changes: The one to mqueue_read_file might make sense, it 
avoids to hold the spinlock over the snprintf.
For the other changes, I don't see that they improve something, but 
perhaps I have overlooked something.

Best regards,
     Manfred


--
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