Re: sockfs - a filesystem for reserved port permissions

Malcolm Beattie (mbeattie@sable.ox.ac.uk)
Thu, 18 Sep 1997 15:41:10 +0100 (BST)


Pavel Machek writes:
> > Since the whole thing is only 8K when the .tar.gz is uuencoded,
> > I thought I might as well include it here. Full instructions are
> > in the included README. The patch and filesystem were written for
> > a 2.0.29 kernel but I'd be very surprised if it didn't work OK for
> > pretty much any 2.0.x. There's nothing fancy about it.
> > Please let me know what you think.
>
> Hmm. And how much memory does it take on runtime?

It allocates 6K for holding the owner/group/permissions information
(1024 * (uid_t + gid_t + mode_t). The default is to allocate it at
mount time but you can say "insmod sockfs alloc_now=1" to allocate
it at module load time if you're worried about fragmentation. It's
all described in the included README. Apart from that 6K data, it's
just a tad over 5K of code:

[~]plutonium# objdump --headers /lib/modules/2.0.29/net/sockfs.o

/lib/modules/2.0.29/net/sockfs.o: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000698 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .rodata 000000dc 00000000 00000000 000006cc 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 00000140 00000000 00000000 000007a8 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
3 .bss 00000000 00000000 00000000 000008e8 2**2
ALLOC
4 .comment 00000028 00000000 00000000 000008e8 2**0
CONTENTS, READONLY
5 .note 00000028 00000028 00000028 00000910 2**0
CONTENTS, READONLY

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services