Description of problem: Fapolicyd needs to be able to send a reason code to the audit system when it denies access. This is to aid policy writers in understanding why something was denied. This will make it easier to refine policy so that it's working correctly. The tricky part is that the FANOTIFY API only has a single 32 bit integer to communicate through. The main idea would be to turn this from a 0 or 1 response into a bit mapped response where some bits are used for the yes/no answer and other bits are used to give context about the answer. In order to make this flexible so that other users of FANOTIFY can use it for their purposes, some bits should be assigned for context type and others for the reason. Fapolicyd will define the first one to mean rule number. When this was sent upstream the first time, they asked for the 32 bit response to be broken up into two 16 bit unsigned integers. Additional info: This needs coordination with the linux-audit community.
2020-09-30: v1 posted upstream: https://lore.kernel.org/r/2042449.irdbgypaU6@x2 2022-04-28: v2 posted upstream: https://lore.kernel.org/r/cover.1651174324.git.rgb@redhat.com 2022-05-16: v3 posted upstream: https://lore.kernel.org/r/cover.1652724390.git.rgb@redhat.com
post v4 upstream https://lore.kernel.org/r/cover.1659981772.git.rgb@redhat.com
2022-12-12 v5 Link: https://lore.kernel.org/all/cover.1670606054.git.rgb@redhat.com 2023-01-17 v6 Link: https://lore.kernel.org/all/cover.1673989212.git.rgb@redhat.com 2023-02-03 v7 Link: https://lore.kernel.org/all/cover.1675373475.git.rgb@redhat.com 2023-02-07 Going upstream via linux-fsdevel Jan Kara <jack>
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.
In process, issued draft MR 2138 for centos stream 9