* Owner match misnaming
@ 2005-07-11 12:04 Jan Engelhardt
2005-07-11 12:12 ` Amin Azez
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2005-07-11 12:04 UTC (permalink / raw)
To: Netfilter Developer Mailing List
Hi,
|OWNER match v1.3.1 options:
|[!] --uid-owner userid Match local uid
|[!] --gid-owner groupid Match local gid
After analyzing the kernel part because some packets obviously did not match
my rules, I notice that these are in reality the socket owner's uid, and not
the process's uid.
I already started a patch to add process [ug]{,e,s,fs}id to the owner
kernel and user modules, but according to the comments in the kernel code,
they would just be as SMP-unsafe as the pid/sid/comm code.
Ideas? Why, after all, is this the case?
BTW,
/* files->file_lock can not be used in a BH */
a BH is a buffer head, at least in the linux kernel...
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Owner match misnaming
2005-07-11 12:04 Owner match misnaming Jan Engelhardt
@ 2005-07-11 12:12 ` Amin Azez
2005-07-11 18:44 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Amin Azez @ 2005-07-11 12:12 UTC (permalink / raw)
To: netfilter-devel
Jan Engelhardt wrote:
> Hi,
>
>
> |OWNER match v1.3.1 options:
> |[!] --uid-owner userid Match local uid
> |[!] --gid-owner groupid Match local gid
>
> After analyzing the kernel part because some packets obviously did not match
> my rules, I notice that these are in reality the socket owner's uid, and not
> the process's uid.
>
> I already started a patch to add process [ug]{,e,s,fs}id to the owner
> kernel and user modules, but according to the comments in the kernel code,
> they would just be as SMP-unsafe as the pid/sid/comm code.
>
> Ideas? Why, after all, is this the case?
> BTW,
> /* files->file_lock can not be used in a BH */
> a BH is a buffer head, at least in the linux kernel...
I think BH means bottom-half, referring to the work-side of an
interrupt. I read
http://library.n0i.net/linux-unix/administration/unreliable-guides/kernel-locking/lklockingguide.html
or http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/
They talk about the differnt contraints and BH
Azez
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Owner match misnaming
2005-07-11 12:12 ` Amin Azez
@ 2005-07-11 18:44 ` Jan Engelhardt
2005-07-12 9:17 ` Harald Welte
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2005-07-11 18:44 UTC (permalink / raw)
To: Amin Azez; +Cc: Netfilter Developer Mailing List
>> BTW,
>> /* files->file_lock can not be used in a BH */
>> a BH is a buffer head, at least in the linux kernel...
>
>I think BH means bottom-half, referring to the work-side of an
>interrupt. I read
>http://library.n0i.net/linux-unix/administration/unreliable-guides/kernel-locking/lklockingguide.html
>or http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/
Any way to fix it?
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Owner match misnaming
2005-07-11 18:44 ` Jan Engelhardt
@ 2005-07-12 9:17 ` Harald Welte
2005-07-16 16:29 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: Harald Welte @ 2005-07-12 9:17 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List, Amin Azez
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
On Mon, Jul 11, 2005 at 08:44:32PM +0200, Jan Engelhardt wrote:
> Any way to fix it?
no. The filesystem data structures are just not supposed to be called
from any in_interrupt() context. We should make this an FAQ entry.
--
- Harald Welte <laforge@netfilter.org> http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Owner match misnaming
2005-07-12 9:17 ` Harald Welte
@ 2005-07-16 16:29 ` Patrick McHardy
2005-07-16 16:45 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Patrick McHardy @ 2005-07-16 16:29 UTC (permalink / raw)
To: Harald Welte; +Cc: Netfilter Developer Mailing List, Amin Azez
Harald Welte schrieb:
> On Mon, Jul 11, 2005 at 08:44:32PM +0200, Jan Engelhardt wrote:
>
>>Any way to fix it?
>
> no. The filesystem data structures are just not supposed to be called
> from any in_interrupt() context. We should make this an FAQ entry.
Actually there are a couple of patches in -mm for lockless fd lookup.
Probably still doesn't work from softirq context, but I'm haveing a
look now.
Regards
Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Owner match misnaming
2005-07-16 16:29 ` Patrick McHardy
@ 2005-07-16 16:45 ` Jan Engelhardt
0 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2005-07-16 16:45 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Harald Welte, Netfilter Developer Mailing List, Amin Azez
>> > Any way to fix it?
>>
>> no. The filesystem data structures are just not supposed to be called
>> from any in_interrupt() context. We should make this an FAQ entry.
>
> Actually there are a couple of patches in -mm for lockless fd lookup.
> Probably still doesn't work from softirq context, but I'm haveing a
> look now.
What exactly needs to be locked? Right now, I only see the tasklist lock and
the file list lock being taken, but no lock on individual fds.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-07-16 16:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 12:04 Owner match misnaming Jan Engelhardt
2005-07-11 12:12 ` Amin Azez
2005-07-11 18:44 ` Jan Engelhardt
2005-07-12 9:17 ` Harald Welte
2005-07-16 16:29 ` Patrick McHardy
2005-07-16 16:45 ` Jan Engelhardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.