linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] LSM: Remove obsoleted comments for security hooks
@ 2022-10-25 12:57 Gaosheng Cui
  2022-10-25 14:22 ` Casey Schaufler
  2022-10-26  0:01 ` Paul Moore
  0 siblings, 2 replies; 3+ messages in thread
From: Gaosheng Cui @ 2022-10-25 12:57 UTC (permalink / raw)
  To: paul, casey, davem, lucien.xin, omosnace, gnoack3000,
	cuigaosheng1, mortonm, fred, cgzones, viro
  Cc: linux-kernel

Remove the following obsoleted comments for security hooks:

1. sb_copy_data, the hook function has been removed since
commit 5b4002391153 ("LSM: turn sb_eat_lsm_opts() into a method").

2. sb_parse_opts_str, the hook function has been removed since
commit 757cbe597fe8 ("LSM: new method: ->sb_add_mnt_opt()").

They are obsoleted comments, so remove them.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 include/linux/lsm_hooks.h | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
index fad93a6d5293..ef2e8a484798 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
@@ -136,15 +136,6 @@
  *	@flags contains the mount flags.
  *	@data contains the filesystem-specific data.
  *	Return 0 if permission is granted.
- * @sb_copy_data:
- *	Allow mount option data to be copied prior to parsing by the filesystem,
- *	so that the security module can extract security-specific mount
- *	options cleanly (a filesystem may modify the data e.g. with strsep()).
- *	This also allows the original mount data to be stripped of security-
- *	specific options to avoid having to make filesystems aware of them.
- *	@orig the original mount data copied from userspace.
- *	@copy copied data which will be passed to the security module.
- *	Returns 0 if the copy was successful.
  * @sb_mnt_opts_compat:
  *	Determine if the new mount options in @mnt_opts are allowed given
  *	the existing mounted filesystem at @sb.
@@ -180,10 +171,6 @@
  *	Copy all security options from a given superblock to another
  *	@oldsb old superblock which contain information to clone
  *	@newsb new superblock which needs filled in
- * @sb_parse_opts_str:
- *	Parse a string of security data filling in the opts structure
- *	@options string containing all mount options known by the LSM
- *	@opts binary data structure usable by the LSM
  * @move_mount:
  *	Check permission before a mount is moved.
  *	@from_path indicates the mount that is going to be moved.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] LSM: Remove obsoleted comments for security hooks
  2022-10-25 12:57 [PATCH] LSM: Remove obsoleted comments for security hooks Gaosheng Cui
@ 2022-10-25 14:22 ` Casey Schaufler
  2022-10-26  0:01 ` Paul Moore
  1 sibling, 0 replies; 3+ messages in thread
From: Casey Schaufler @ 2022-10-25 14:22 UTC (permalink / raw)
  To: Gaosheng Cui, paul, davem, lucien.xin, omosnace, gnoack3000,
	mortonm, fred, cgzones, viro
  Cc: linux-kernel, casey

On 10/25/2022 5:57 AM, Gaosheng Cui wrote:
> Remove the following obsoleted comments for security hooks:
>
> 1. sb_copy_data, the hook function has been removed since
> commit 5b4002391153 ("LSM: turn sb_eat_lsm_opts() into a method").
>
> 2. sb_parse_opts_str, the hook function has been removed since
> commit 757cbe597fe8 ("LSM: new method: ->sb_add_mnt_opt()").
>
> They are obsoleted comments, so remove them.
>
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>

Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>

> ---
>  include/linux/lsm_hooks.h | 13 -------------
>  1 file changed, 13 deletions(-)
>
> diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
> index fad93a6d5293..ef2e8a484798 100644
> --- a/include/linux/lsm_hooks.h
> +++ b/include/linux/lsm_hooks.h
> @@ -136,15 +136,6 @@
>   *	@flags contains the mount flags.
>   *	@data contains the filesystem-specific data.
>   *	Return 0 if permission is granted.
> - * @sb_copy_data:
> - *	Allow mount option data to be copied prior to parsing by the filesystem,
> - *	so that the security module can extract security-specific mount
> - *	options cleanly (a filesystem may modify the data e.g. with strsep()).
> - *	This also allows the original mount data to be stripped of security-
> - *	specific options to avoid having to make filesystems aware of them.
> - *	@orig the original mount data copied from userspace.
> - *	@copy copied data which will be passed to the security module.
> - *	Returns 0 if the copy was successful.
>   * @sb_mnt_opts_compat:
>   *	Determine if the new mount options in @mnt_opts are allowed given
>   *	the existing mounted filesystem at @sb.
> @@ -180,10 +171,6 @@
>   *	Copy all security options from a given superblock to another
>   *	@oldsb old superblock which contain information to clone
>   *	@newsb new superblock which needs filled in
> - * @sb_parse_opts_str:
> - *	Parse a string of security data filling in the opts structure
> - *	@options string containing all mount options known by the LSM
> - *	@opts binary data structure usable by the LSM
>   * @move_mount:
>   *	Check permission before a mount is moved.
>   *	@from_path indicates the mount that is going to be moved.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] LSM: Remove obsoleted comments for security hooks
  2022-10-25 12:57 [PATCH] LSM: Remove obsoleted comments for security hooks Gaosheng Cui
  2022-10-25 14:22 ` Casey Schaufler
@ 2022-10-26  0:01 ` Paul Moore
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2022-10-26  0:01 UTC (permalink / raw)
  To: Gaosheng Cui
  Cc: casey, davem, lucien.xin, omosnace, gnoack3000, mortonm, fred,
	cgzones, viro, linux-kernel

On Tue, Oct 25, 2022 at 8:58 AM Gaosheng Cui <cuigaosheng1@huawei.com> wrote:
>
> Remove the following obsoleted comments for security hooks:
>
> 1. sb_copy_data, the hook function has been removed since
> commit 5b4002391153 ("LSM: turn sb_eat_lsm_opts() into a method").
>
> 2. sb_parse_opts_str, the hook function has been removed since
> commit 757cbe597fe8 ("LSM: new method: ->sb_add_mnt_opt()").
>
> They are obsoleted comments, so remove them.
>
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
>  include/linux/lsm_hooks.h | 13 -------------
>  1 file changed, 13 deletions(-)

Merged into lsm/next, thanks.

-- 
paul-moore.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-26  0:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 12:57 [PATCH] LSM: Remove obsoleted comments for security hooks Gaosheng Cui
2022-10-25 14:22 ` Casey Schaufler
2022-10-26  0:01 ` Paul Moore

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).