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: <m2aaulqpq1.fsf@ssh.synack.fr>
Date:	Sat, 06 Mar 2010 19:17:42 +0100
From:	Samir Bellabes <sam@...ack.fr>
To:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc:	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	netfilter-devel@...r.kernel.org, hadi@...erus.ca, kaber@...sh.net,
	zbr@...emap.net, nhorman@...driver.com, root@...aldomain.pl,
	linux-security-module@...r.kernel.org
Subject: Re: [RFC v2 00/10] snet: Security for NETwork syscalls

Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp> writes:

> Regarding [RFC v2 05/10] snet: introduce snet_event
> +static rwlock_t snet_evh_lock = __RW_LOCK_UNLOCKED();
>
> You can use "static DEFINE_RWLOCK(snet_evh_lock);".
>
> +int snet_event_is_registered(const enum snet_syscall syscall, const u8 protocol)
>
> Maybe rcu_read_lock() is better than rw spinlock because this function is
> frequently called.

here is the patch.
thank you Tetsuo

>From 34715d4d900aee2d3759e3008313b65dc2f130fd Mon Sep 17 00:00:00 2001
From: Samir Bellabes <sam@...ack.fr>
Date: Sat, 6 Mar 2010 15:44:42 +0100
Subject: [PATCH 1/3] snet: use proper rwlock_t declaration

Noticed by Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>

Signed-off-by: Samir Bellabes <sam@...ack.fr>
---
 security/snet/snet_event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/snet/snet_event.c b/security/snet/snet_event.c
index 9e3f7d2..5f708d0 100644
--- a/security/snet/snet_event.c
+++ b/security/snet/snet_event.c
@@ -9,7 +9,7 @@
 #include "snet_utils.h"
 
 static struct list_head *snet_evh;
-static rwlock_t snet_evh_lock = __RW_LOCK_UNLOCKED();
+static DEFINE_RWLOCK(snet_evh_lock);
 
 struct snet_event_entry {
 	struct list_head list;
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ