[RFC][PATCH] tunables: Add elision tunable

rcardoso rcardoso@linux.vnet.ibm.com
Thu Nov 16 12:56:00 GMT 2017


Hi Carlos, Siddhesh,

Sorry for my late reply on that patch. I've implemented all the 
suggestion you made on patch v4.

About your comments Siddhesh:


 >SXID_IGNORE means that you don't want setxid binaries to read it but >you
 >would like children of setxid binaries to read it.  Why is this use >case
 >necessary to be supported?  We don't want to do this unless there is a
 >specific reason to allow it.  That is, set to SXID_ERASE unless there >is
 >a very good reason to allow children of setxid process to read the
 >elision tunables.

I've implemented that before read the documentation (I guess the 
original Paul Murphy's patch was using that (not sure). Changed to 
SXID_ERASE.

 >Should this have a brief description of what elision is?  Maybe just a
 >single line to give context to what we're controlling.

Yes. Added a line (two) explaining that elision is.

 >If we set the tunable permissions correctly (i.e. the SXID_*) the
 >__libc_enable_secure check is unnecessary.  elision_enable will be set
 >according to the default, which is disabled.  You could replace the
 >check with a comment explaining why the check is unnecessary.

Yes. Removed (also solves a boolean coercion problem with this variable)

About your questions Carlos:

 >This is not ready. Since elision now depends on tunables, we should 
 >always
 >*compile* with elision enabled, and leave the code disabled, but 
 >available
 >for runtime selection. This gives us *much* better compile-time testing
 >of the existing code to avoid bit-rot.

 >OK with the following changes.

All you suggestions are implemented on patch v4. Thank you.

 >Awkward wording, suggest: (many of those)

Fixed. Using your suggestions.

 >No boolean coercion please.
 >
 >Either make elision_enable a bool, and call 
 >do_set_elision_enable(true/false).
 >
 >Or
 >
 >if (elision_enable == 1 && !__libc_enable_secure)
 >
 >Note: That we treat __libc_enable_secure *as-if* it were bool and we >need
 >      to fix that if you feel like sending another patch... that's a 
 >historical
 >      mistake.


Yes. I fixed all boolean coercion's on elision. Also I've removed 
__libc_enable_secure according o Siddhesh suggestion above: 
elision_enable will be set according to the default, which is disabled. 
So the check is unnecessary.

I'll check the use for this variable and fix it on glibc on another 
patch thanks by that suggestion.

Regards,

Rogerio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-elision-tunables.patch
Type: text/x-patch
Size: 28692 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20171116/c98139ee/attachment.bin>


More information about the Libc-alpha mailing list