Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-19 Thread Paul Moore
On Saturday 17 November 2007 11:00:20 pm Tetsuo Handa wrote: Hello. Hello. Paul Moore wrote: Okay, well if that is the case I think you are going to have another problem in that you could end up throwing away skbs that haven't been through your security_post_recv_datagram() hook because

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-19 Thread Tetsuo Handa
Hello. Paul Moore wrote: If that is the case then the second call to skb_peek() will return a different skb then the one you passed to security_post_recv_datagram(). Yes. The second call to skb_peek() might return a different skb than the one I passed to security_post_recv_datagram().

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-19 Thread Paul Moore
On Monday 19 November 2007 9:29:52 am Tetsuo Handa wrote: Paul Moore wrote: If that is the case then the second call to skb_peek() will return a different skb then the one you passed to security_post_recv_datagram(). Yes. The second call to skb_peek() might return a different skb than the

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-19 Thread James Morris
On Tue, 20 Nov 2007, Tetsuo Handa wrote: Hello. Paul Moore wrote: My apologies, I mistakenly read the following if statement in your patch: + if (skb == skb_peek(sk-sk_receive_queue)) { + __skb_unlink(skb, sk-sk_receive_queue); +

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-17 Thread Paul Moore
On Friday 16 November 2007 10:45:32 pm Tetsuo Handa wrote: Paul Moore wrote: I might be missing something here, but why do you need to do a skb_peek() again? You already have the skb and the sock, just do the unlink. The skb might be already dequeued by other thread while I slept inside

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-17 Thread Tetsuo Handa
Hello. Paul Moore wrote: Okay, well if that is the case I think you are going to have another problem in that you could end up throwing away skbs that haven't been through your security_post_recv_datagram() hook because you _always_ throw away the result of the second skb_peek(). Once

[TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-16 Thread penguin-kernel
LSM hooks for sending signal: * task_kill_unlocked is added in sys_kill * task_tkill_unlocked is added in sys_tkill * task_tgkill_unlocked is added in sys_tgkill LSM hooks for network accept and recv: * socket_post_accept is modified to return int. * post_recv_datagram is added in

Re: [TOMOYO #5 18/18] LSM expansion for TOMOYO Linux.

2007-11-16 Thread Tetsuo Handa
Hello. Thank you for your feedback. Paul Moore wrote: With this patch the 'cpu_flags' variable will be used in two different if-blocks in this function and declared locally within each block. Please move the 'cpu_flags' declaration to the top of the function so it only needs to be