Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SE Linux binary policy formats #678

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

angea
Copy link

@angea angea commented Jul 12, 2023

Modules, Kernel and package, all versions.

Modules, Kernel and package, all versions.
Copy link
Member

@generalmimon generalmimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angea Thanks for the submission! The first batch of comments is below (it's not everything I wanted to point out, but at least something to start with):

security/selinuxpp.ksy Outdated Show resolved Hide resolved
security/selinux.ksy Outdated Show resolved Hide resolved
security/selinux.ksy Outdated Show resolved Hide resolved
security/selinux.ksy Outdated Show resolved Hide resolved
security/selinux.ksy Outdated Show resolved Hide resolved
security/selinuxpp.ksy Outdated Show resolved Hide resolved
security/selinuxpp.ksy Outdated Show resolved Hide resolved
security/selinux.ksy Outdated Show resolved Hide resolved
security/selinux.ksy Outdated Show resolved Hide resolved
security/selinux.ksy Outdated Show resolved Hide resolved
@angea
Copy link
Author

angea commented Jul 13, 2023

Updated - PTAL.

@angea angea requested a review from generalmimon July 14, 2023 09:32
@angea
Copy link
Author

angea commented Jul 14, 2023

Updated. PTAL.

security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
security/selinux_policy_binary.ksy Outdated Show resolved Hide resolved
Copy link
Member

@generalmimon generalmimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here comes some very general feedback, so I won't even directly highlight any specific occurrences - please check out https://doc.kaitai.io/ksy_style_guide.html#attr-id and try to conform to the naming conventions throughout both .ksy specs wherever possible. For example:

  • most of the arrays I've seen don't have plural names as they should,
  • fields denoting byte size of another field (most often a string) aren't called len_ + subject as they're supposed to, but they sometimes use _length suffix, sometimes _len suffix, other times it's just length without specifying the subject field...
  • fields that designate the number / count of items are not called num_ + subject as expected, but instead, it's sometimes "something + _count" (I call it something, not "subject", because "subject" is meant to exactly match the name of the array field, which should be a plural word, e.g. num_nodes specifies the number of elements of a nodes list), sometimes just count, other times length (which even clashes with the "convention" for byte size) etc.

@angea
Copy link
Author

angea commented Jul 24, 2023

I handled all your previous comments and applied the style guide.

@angea angea requested a review from corkamig July 25, 2023 18:03
Copy link
Author

@angea angea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated w/ all requested changes.

@angea angea requested a review from generalmimon July 26, 2023 07:49
Copy link
Author

@angea angea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

@angea
Copy link
Author

angea commented Nov 2, 2023

Could you have another look?
As this grammar is reliably working and helpful, I'd like to get it accepted.
Is anything still wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants