RFC: system-wide default tunables

Siddhesh Poyarekar siddhesh@gotplt.org
Wed Oct 18 14:20:29 GMT 2023


On 2023-10-17 13:14, DJ Delorie wrote:
> Siddhesh Poyarekar <siddhesh@gotplt.org> writes:
>> Actually I wasn't thinking of any conf file related constraint markup, I
>> was thinking of TUNABLE_CALLBACKs encoding constraints in whichever way
>> they deem fit.  e.g. for ibt it could be:
>>
>> void
>> TUNABLE_CALLBACK (set_x86_ibt) (tunable_val_t *valp)
>> {
>>     if (!strcmp (valp->system_default, "always_on"))
>>       return;
>>
>>     /* Otherwise read the value.  */
>> }
> 
> So the tunable definition *itself* decides whether the sysadmin wants to
> override a user?

Sort of; the tunable definition decides how much control a systemwide 
tunable (consequently the sysadmin) has, on the capability of a user to 
override it.

So for security tunables it could be a latch value (like above) that a 
user may not be able to override.  For numeric value tunables it could 
be a range that a user is not allowed to surpass.  For string tunables, 
it could be a list of values the user is allowed to set; the first valid 
value in the list could be the default.

Thanks,
Sid


More information about the Libc-alpha mailing list