linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge@hallyn.com>
To: Casey Schaufler <casey@schaufler-ca.com>
Cc: Paul Moore <paul@paul-moore.com>,
	linux-security-module@vger.kernel.org, serge@hallyn.com
Subject: Re: [RFC PATCH] capabilities: remove cap_mmap_file()
Date: Thu, 26 Sep 2024 08:11:57 -0500	[thread overview]
Message-ID: <20240926131157.GA683524@mail.hallyn.com> (raw)
In-Reply-To: <dd386a1f-9245-45ae-b0fe-d07d1dec5100@schaufler-ca.com>

On Wed, Sep 25, 2024 at 12:45:20PM -0700, Casey Schaufler wrote:
> On 9/25/2024 12:20 PM, Paul Moore wrote:
> > The cap_mmap_file() LSM callback returns the default value for the
> > security_mmap_file() LSM hook and can be safely removed.
> >
> > Signed-off-by: Paul Moore <paul@paul-moore.com>
> 
> Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>

Reviewed-by: Serge Hallyn <serge@hallyn.com>

> 
> > ---
> >  security/commoncap.c | 7 -------
> >  1 file changed, 7 deletions(-)
> >
> > diff --git a/security/commoncap.c b/security/commoncap.c
> > index cefad323a0b1..3d103069903b 100644
> > --- a/security/commoncap.c
> > +++ b/security/commoncap.c
> > @@ -1428,12 +1428,6 @@ int cap_mmap_addr(unsigned long addr)
> >  	return ret;
> >  }
> >  
> > -int cap_mmap_file(struct file *file, unsigned long reqprot,
> > -		  unsigned long prot, unsigned long flags)
> > -{
> > -	return 0;
> > -}
> > -
> >  #ifdef CONFIG_SECURITY
> >  
> >  static const struct lsm_id capability_lsmid = {
> > @@ -1453,7 +1447,6 @@ static struct security_hook_list capability_hooks[] __ro_after_init = {
> >  	LSM_HOOK_INIT(inode_killpriv, cap_inode_killpriv),
> >  	LSM_HOOK_INIT(inode_getsecurity, cap_inode_getsecurity),
> >  	LSM_HOOK_INIT(mmap_addr, cap_mmap_addr),
> > -	LSM_HOOK_INIT(mmap_file, cap_mmap_file),
> >  	LSM_HOOK_INIT(task_fix_setuid, cap_task_fix_setuid),
> >  	LSM_HOOK_INIT(task_prctl, cap_task_prctl),
> >  	LSM_HOOK_INIT(task_setscheduler, cap_task_setscheduler),

  reply	other threads:[~2024-09-26 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 19:20 [RFC PATCH] capabilities: remove cap_mmap_file() Paul Moore
2024-09-25 19:45 ` Casey Schaufler
2024-09-26 13:11   ` Serge E. Hallyn [this message]
2024-09-26 13:16     ` Paul Moore
2024-09-26 13:22       ` Serge E. Hallyn
2024-09-26 13:24         ` Paul Moore
2024-09-30 21:08           ` Serge E. Hallyn
2024-10-01 14:08             ` Paul Moore
2024-10-01 21:20               ` Serge E. Hallyn
2024-10-02 15:36                 ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240926131157.GA683524@mail.hallyn.com \
    --to=serge@hallyn.com \
    --cc=casey@schaufler-ca.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).