[Toybox] Smack questions (was Re: vmstat bug + patch)

Rob Landley rob at landley.net
Mon Sep 7 14:43:34 PDT 2015


On 09/07/2015 02:48 PM, José Bollo wrote:
> Le Sat, 5 Sep 2015 04:17:54 -0500,
> Rob Landley <rob at landley.net> a écrit :
> 
> (snip)
> 
>> It happens. Xavier similarly got pulled off. Consistently staffing the
>> Smack stuff seems to be a bit of an issue.
> 
> Hi Rob,
> 
> the story isn't exactly the same. From your point of vue the effects
> are looking the same. But I'm more involved in Smack and I'm interested
> in staying involved particularly if smack would be used. That looks like
> a bet. In the embedded world Smack is merely better than selinux. But
> does it really care?

According to linuxluddites.com tizen is big in India, and that's a large
market worth significant effort to properly cater to.

So yes, I care. :)

>> Speaking of which, could somebody put the smack man pages online
>> somewhere? Googling is not finding them, the closest I'm getting is
>> stuff like:
>>
>> https://github.com/smack-team/smack/blob/master/debian/smack-utils.manpages
> 
> Yes this url https://github.com/smack-team/smack/tree/master/doc sounds
> much better.

I was trying to figure out the longest string lsm_get_context() could
return (to see if the >255 in ls -C padding could get hit) which meant I
needed a man page for smack_get_lsm_from_path() That URL is section 1
and 8 but no 3.

Also, if I click on one of those links I don't get an html version of a
man page, I get an html version of raw troff markup.

>> Which is not helpful. (I'm trying to look up the maximum allowable
>> size of a security label to see if the padding logic in ls -C will
>> produce really ugly output in pathological cases. It looks like the
>> answer is "yes", but since it involves your screen width being > 255
>> before you have to care, it's probably not a real problem. Even on
>> retina displays, that's probably beyond the point where you can find
>> the start of a the next line when reading.)
> 
> Currently the maximum length is 255 and I guess that this limit will
> not change. On Tizen, the wider smack labels were around 40
> characters IIRC. That is a lot when you have to display it (ls or ps).

Indeed. The ls logic just vaguely assumes that 255 is going to be larger
than screen width, and thus the column count is 1. (If you run it on a
larger display than that, it won't access out of allocated ranges but
there is at least one place it'll just not output any spaces between
items. I could fix that to cap spaces at 255 instead of "you failed the
sanity check, don't output anything", but I'll wait for somebody to
complain. :)

Rob

 1441662214.0


More information about the Toybox mailing list