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-next>] [day] [month] [year] [list]
Message-ID: <20070701122622.GC3400@zakalwe.fi>
Date:	Sun, 1 Jul 2007 15:26:22 +0300
From:	Heikki Orsila <shdl@...alwe.fi>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc:	corbet@....net, rdunlap@...otime.net
Subject: [PATCH] Documentation: improvement to volatile considered harmful (resubmit)

I'm resubmitting this as I didn't get any replies, this time CCeing 
proper people, sorry..

Kernel locking/synchronization primitives are better than volatile types 
from code readability point of view also.

This patch is against 2.6.22-rc6.

Signed-off-by: Heikki Orsila <heikki.orsila@....fi>

diff --git a/Documentation/volatile-considered-harmful.txt b/Documentation/volatile-considered-harmful.txt
index 10c2e41..ab9e62e 100644
--- a/Documentation/volatile-considered-harmful.txt
+++ b/Documentation/volatile-considered-harmful.txt
@@ -17,8 +17,9 @@ all optimization-related problems in a more efficient way.
 
 Like volatile, the kernel primitives which make concurrent access to data
 safe (spinlocks, mutexes, memory barriers, etc.) are designed to prevent
-unwanted optimization.  If they are being used properly, there will be no
-need to use volatile as well.  If volatile is still necessary, there is
+unwanted optimization. If they are being used properly, there will be no
+need to use volatile as well. Also, they make code more readable as they
+represent their intent explicitly. If volatile is still necessary, there is
 almost certainly a bug in the code somewhere.  In properly-written kernel
 code, volatile can only serve to slow things down.
 

-- 
Heikki Orsila			Barbie's law:
heikki.orsila@....fi		"Math is hard, let's go shopping!"
http://www.iki.fi/shd
-
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