Comment 3 for bug 1499544

Revision history for this message
John Johansen (jjohansen) wrote :

So one limitation on the name length now, that didn't use to exist it the profile dir name in sysfs. This is going to clamp the name limit down to 255 - the length of the suffix eg.
  name.1

will reduce the name to a max of 253 while,
  name.1024

will reduce it to a max of 250.

The change_profile, change_hat apis have a limit of PAGE_SIZE - HEADER info. Which is is 15 for change_profile and 28 characters for change_hat. The limit for the name in the profile is 65k characters, and the dfa has no hard limit beyond what is allowed by the maximum number of states, which is currently 65k under dfa16, with the dfa32 extension we can support 2^24 states (note the number of characters that can be matched can be more than the maximum number of states due to pattern matching).

Unless we move away from using the profile name as a base for the directory entry in apparmorfs the limit will have to be around 250 characters. This should NOT be a problem as the profile name can be specified separately from the attachment so if an attachment of more than 245 characters is needed then a shorter name could be used and alongside the attachment.

The limit for the attachment is PATH_MAX.