Date: Fri, 22 Nov 2002 13:13:30 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: Robert Watson <rwatson@freebsd.org> Cc: current@freebsd.org, Luigi Rizzo <rizzo@icir.org> Subject: Re: mbuf header bloat ? Message-ID: <XFMail.20021122131330.jhb@FreeBSD.org> In-Reply-To: <Pine.NEB.3.96L.1021122093018.57728C-100000@fledge.watson.org>
index | next in thread | previous in thread | raw e-mail
On 22-Nov-2002 Robert Watson wrote:
>
> On Thu, 21 Nov 2002, Luigi Rizzo wrote:
>
>> [Bcc to -net because it is relevant there. This email has been triggered
>> by a private discussion i was having with other committers (who will
>> easily recognise themselves :) which suggested the possibility of adding
>> more fields to mbuf headers]
>>
>> Just recently came up to my attention that we have the following code in
>> <sys/_label.h>
>>
>> #define MAC_MAX_POLICIES 4
>> struct label {
>> int l_flags;
>> union {
>> void *l_ptr;
>> long l_long;
>> } l_perpolicy[MAC_MAX_POLICIES];
>> };
>>
>> (what are l_perpolicy[], ints ? Could this be written a bit better ?)
>> and then in <sys/mbuf.h>
>
> MAC labels provide general purpose security label storage across a variety
> of kernel objects. Each MAC label is made up of a number of "slots" which
> are allocated to statically linked or dynamically loaded policies. The
> union is used to allow policies to use their slot for either the purposes
> of an integer store, or as a pointer with the semantics they define. Some
> policies simply use the long to represent their policy information,
> perhaps by itself (a partition number), or to key into an existing array.
> Other policies use the pointer to point to shared reference-counted,
> static, or per-label data. Probably the "long" should be changed to some
> other integer type that better matches the notion of pointer length.
intptr_t.
--
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021122131330.jhb>
