From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Cc: Chris Wright <chrisw@osdl.org>,
Ross Kendall Axe <ross.axe@blueyonder.co.uk>,
James Morris <jmorris@redhat.com>,
netdev@oss.sgi.com, Stephen Smalley <sds@epoch.ncsc.mil>,
lkml <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] linux 2.9.10-rc1: Fix oops in unix_dgram_sendmsg when using SELinux and SOCK_SEQPACKET
Date: Fri, 19 Nov 2004 11:16:30 -0200 [thread overview]
Message-ID: <419DF22E.5080102@conectiva.com.br> (raw)
In-Reply-To: <419DEF98.9040303@conectiva.com.br>
Arnaldo Carvalho de Melo wrote:
>
>
> Chris Wright wrote:
>
>> * Ross Kendall Axe (ross.axe@blueyonder.co.uk) wrote:
>>
>>> Taking this idea further, couldn't we split unix_dgram_sendmsg into 2
>>> functions, do_unix_dgram_sendmsg and do_unix_connectionless_sendmsg
>>> (and similarly for unix_stream_sendmsg), then all we'd need is:
>>>
>>> <pseudocode>
>>> static int do_unix_dgram_sendmsg(...);
>>> static int do_unix_stream_sendmsg(...);
>>> static int do_unix_connectionless_sendmsg(...);
>>> static int do_unix_connectional_sendmsg(...);
>>
>>
>>
>> We could probably break it down to better functions and helpers, but I'm
>> not sure that's quite the breakdown. That looks to me like an indirect
>> way to pass a flag which is already encoded in the ops and sk_type.
>> At anyrate, for 2.6.10 the changes should be small and obvious.
>> Better refactoring should be left for 2.6.11.
>
>
> Hey, go ahead, do the split and please, please use sk->sk_prot, that is
> the way to do the proper split and will allow us to nuke several
> pointers in struct sock (sk_slab, sk_owner for now) :-)
>
> I have a friend doing this for X.25, will submit his patches as soon
> as we do some more testing and 2.6.10 is out.
Ah, this is the way the inet transport protos have been working for
years, and I've been factoring out the struct proto_ops methods from
TCP into the networking core, look at net/core/stream.c and the
sock_common_ prefixed functions in net/core/sock.c.
- Arnaldo
next prev parent reply other threads:[~2004-11-19 13:16 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-14 18:13 [PATCH] linux 2.9.10-rc1: Fix oops in unix_dgram_sendmsg when using SELinux and SOCK_SEQPACKET Ross Kendall Axe
2004-11-15 13:31 ` Stephen Smalley
2004-11-16 8:41 ` Chris Wright
2004-11-17 21:29 ` Ross Kendall Axe
2004-11-18 0:09 ` Ross Kendall Axe
2004-11-18 3:42 ` James Morris
2004-11-18 4:25 ` James Morris
2004-11-18 6:07 ` Chris Wright
2004-11-18 7:25 ` Ross Kendall Axe
2004-11-18 7:59 ` James Morris
2004-11-18 8:27 ` James Morris
2004-11-18 16:44 ` Chris Wright
2004-11-18 17:01 ` James Morris
2004-11-18 17:07 ` Chris Wright
2004-11-18 17:11 ` James Morris
2004-11-18 17:25 ` James Morris
2004-11-18 16:58 ` Alan Cox
2004-11-18 22:34 ` David S. Miller
2004-11-19 3:23 ` Ross Kendall Axe
2004-11-19 7:19 ` Chris Wright
2004-11-19 9:40 ` Ross Kendall Axe
2004-11-19 13:05 ` Arnaldo Carvalho de Melo
2004-11-19 13:16 ` Arnaldo Carvalho de Melo [this message]
2004-11-18 16:49 ` Alan Cox
2004-11-18 18:40 ` James Morris
2004-11-18 23:39 ` Alan Cox
2004-11-19 3:12 ` James Morris
2004-11-19 7:01 ` Chris Wright
2004-11-19 7:12 ` James Morris
2004-11-19 7:28 ` Chris Wright
2004-11-19 11:39 ` Alan Cox
2004-11-19 16:24 ` James Morris
2004-11-20 7:11 ` David S. Miller
2004-11-18 16:45 ` Alan Cox
2004-11-18 18:28 ` James Morris
2004-11-18 18:34 ` Chris Wright
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=419DF22E.5080102@conectiva.com.br \
--to=acme@conectiva.com.br \
--cc=chrisw@osdl.org \
--cc=davem@davemloft.net \
--cc=jmorris@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=ross.axe@blueyonder.co.uk \
--cc=sds@epoch.ncsc.mil \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).