Re: [PATCH v4 8/20] lsm: Refactor return value of LSM hook getprocattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/19/2024 10:08 AM, Paul Moore wrote:
On Jul 11, 2024 Xu Kuohai <xukuohai@xxxxxxxxxxxxxxx> wrote:

To be consistent with most LSM hooks, convert the return value of
hook getprocattr to 0 or a negative error code.

Before:
- Hook getprocattr returns length of value on success or a negative
   error code on failure.

After:
- Hook getprocattr returns 0 on success or a negative error code on
   failure. An output parameter @len is introduced to hold the
   length of value on success.

Signed-off-by: Xu Kuohai <xukuohai@xxxxxxxxxx>
---
  fs/proc/base.c                |  5 ++++-
  include/linux/lsm_hook_defs.h |  2 +-
  include/linux/security.h      |  5 +++--
  security/apparmor/lsm.c       |  7 +++++--
  security/security.c           |  8 +++++---
  security/selinux/hooks.c      | 16 +++++++++-------
  security/smack/smack_lsm.c    | 11 ++++++-----
  7 files changed, 33 insertions(+), 21 deletions(-)

The patch 07/20 comments also apply here.


OK, will drop this patch.

--
paul-moore.com







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux