lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 10 Jan 2020 16:46:34 +0000
From:   Huaisheng HS1 Ye <yehs1@...ovo.com>
To:     Stephen Smalley <sds@...ho.nsa.gov>,
        "paul@...l-moore.com" <paul@...l-moore.com>,
        "eparis@...isplace.org" <eparis@...isplace.org>,
        "jmorris@...ei.org" <jmorris@...ei.org>,
        "serge@...lyn.com" <serge@...lyn.com>
CC:     Tzu ting Yu1 <tyu1@...ovo.com>,
        "linux-security-module@...r.kernel.org" 
        <linux-security-module@...r.kernel.org>,
        "selinux@...r.kernel.org" <selinux@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Huaisheng Ye <yehs2007@...o.com>
Subject: Re: [PATCH] selinux: remove redundant msg_msg_alloc_security


> -----Original Message-----
> From: Stephen Smalley <sds@...ho.nsa.gov>
> Sent: Friday, January 10, 2020 11:14 PM
> 
> On 1/10/20 4:58 AM, Huaisheng Ye wrote:
> > From: Huaisheng Ye <yehs1@...ovo.com>
> >
> > selinux_msg_msg_alloc_security only calls msg_msg_alloc_security but
> > do nothing else. And also msg_msg_alloc_security is just used by the
> > former.
> >
> > Remove the redundant function to simplify the code.
> 
> This seems to also be true of other _alloc_security functions, probably due to
> historical reasons.  Further, at least some of these functions no longer perform
> any allocation; they are just initialization functions now that allocation has
> been taken to the LSM framework, so possibly could be renamed and made to return
> void at some point.
> 
> >
> > Signed-off-by: Huaisheng Ye <yehs1@...ovo.com>
> 
> Acked-by: Stephen Smalley <sds@...ho.nsa.gov>

Many thanks for the Acked-by.

Yes, you are right, selinux_msg_msg_alloc_security only can return 0 in any case.
I think that should be modified to void instead of int.

And also, the fact is no module needs to implement msg_msg_free_security, because
LSM would take the responsibility for freeing msg->security.
I think we could delete the hook call of msg_msg_free_security, but I am cautious
to modify the existing interfaces, that just worry to break traditional rules.

Cheers,
Huaisheng Ye
Lenovo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ