Re: [net-next PATCH v4 0/3] net: reserve ports for applications using fixed port

From: Eric W. Biederman
Date: Tue Feb 16 2010 - 12:25:21 EST


Octavian Purdila <opurdila@xxxxxxxxxxx> writes:

> This iteration makes the bitmap dynamically allocated since it is
> quite big (8192 bytes) and adding that much in BSS may still,
> apparently, cause problems on some architectures.
>
>
> Octavian Purdila (3):
> sysctl: refactor integer handling proc code
> sysctl: add proc_dobitmap
> net: reserve ports for applications using fixed port numbers
>

I don't like the /proc interface for this. That is certainly not the
format I would choose for a bitmap. The way you have described this
it looks like you are a set of different individual values instead of
one large value. History says one value per file is the ideal in a
user space facing interface. Intuitively I would not know how to
change your new proc interface after catting the file. The classic
read the file tweak the value and write the new value back will not
work.


Also we already have a common function for dealing with bitmaps
in /proc. bitmap_parse_user. Used in /proc/irq/NNN/smp_affinity
among other places.

So can you please use bitmap_parse_user, or break this up into
64k individual files that we can set individually?

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/