Skip to contentSkip to conversation

constify tables in kernel/sysctl_check.c

PATCH Eric W. Biederman 2 participants 3 messages Dec 20, 2007 – Dec 21, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines · Jan Beulich

Remains the question whether it is intended that many, perhaps even large, tables are compiled in without ever having a chance to get used, i.e. whether there shouldn't #ifdef CONFIG_xxx get added.

The constification looks good. The file should be compiled only when we have sysctl support. We use those tables when we call register_sysctl_table. Which we do a lot.

Eric

#2 lore raw
Quoted 11 lines
Quoted 1 line
Quoted 1 line

Eric W. Biederman <[email protected]> 21.12.07 00:05 >>>

Quoted 3 lines · Jan Beulich

Remains the question whether it is intended that many, perhaps even large, tables are compiled in without ever having a chance to get used, i.e. whether there shouldn't #ifdef CONFIG_xxx get added.

The constification looks good. The file should be compiled only when we have sysctl support. We use those tables when we call register_sysctl_table. Which we do a lot.

I understand this. Nevertheless, the tables take 23k on 64-bits, and many of them are unused when certain subsystems aren't being built (and some are even architecture specific). The arlan tables are a particularly good example, but the netfilter ones are pretty big and probably not always used, too.

Jan

#3 lore raw
Quoted 12 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line

Eric W. Biederman <[email protected]> 21.12.07 00:05 >>>

Quoted 3 lines · Jan Beulich

Remains the question whether it is intended that many, perhaps even large, tables are compiled in without ever having a chance to get used, i.e. whether there shouldn't #ifdef CONFIG_xxx get added.

The constification looks good. The file should be compiled only when we have sysctl support. We use those tables when we call register_sysctl_table. Which we do a lot.

Quoted 5 lines

I understand this. Nevertheless, the tables take 23k on 64-bits, and many of them are unused when certain subsystems aren't being built (and some are even architecture specific). The arlan tables are a particularly good example, but the netfilter ones are pretty big and probably not always used, too.

The size isn't my favorite thing. But given how much of a mess sysctl_check.c has allowed me to clean up and get a handle on I'm not inclined to do anything that would compromise the checking.

Probably the sanest way to remove table entries is to individually remove and deprecate parts of the binary sys_sysctl interface so that we don't need the table entries.

Maybe we could through in a few #ifdefs and #defines so we can reduce the set of allowed sysctl entries even more base on config options.

I'm not volunteering to do more then is absolutely necessary to keep sys_sysctl working and correct until we reach a point where everyone can agree that users of the interface truly have had fair warning and then I intend to delete all of the code that deals with the binary sysctl interface.

Eric