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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6200bc6e-6903-4a01-a3d9-74f90c6de2b7@canonical.com>
Date: Fri, 10 May 2024 08:46:25 -0700
From: John Johansen <john.johansen@...onical.com>
To: Colin Ian King <colin.i.king@...il.com>, Paul Moore
 <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
 "Serge E . Hallyn" <serge@...lyn.com>, apparmor@...ts.ubuntu.com,
 linux-security-module@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] apparmor: remove useless static inline function
 is_deleted

On 3/4/24 08:36, Colin Ian King wrote:
> The inlined function is_deleted is redundant, it is not called at all
> from any function in security/apparmor/file.c and so it can be removed.
> 
> Cleans up clang scan build warning:
> security/apparmor/file.c:153:20: warning: unused function
> 'is_deleted' [-Wunused-function]
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>

Acked-by: John Johansen <john.johanse@...onical.com>

I have pulled this into my tree

> ---
>   security/apparmor/file.c | 13 -------------
>   1 file changed, 13 deletions(-)
> 
> diff --git a/security/apparmor/file.c b/security/apparmor/file.c
> index c03eb7c19f16..d52a5b14dad4 100644
> --- a/security/apparmor/file.c
> +++ b/security/apparmor/file.c
> @@ -144,19 +144,6 @@ int aa_audit_file(const struct cred *subj_cred,
>   	return aa_audit(type, profile, &ad, file_audit_cb);
>   }
>   
> -/**
> - * is_deleted - test if a file has been completely unlinked
> - * @dentry: dentry of file to test for deletion  (NOT NULL)
> - *
> - * Returns: true if deleted else false
> - */
> -static inline bool is_deleted(struct dentry *dentry)
> -{
> -	if (d_unlinked(dentry) && d_backing_inode(dentry)->i_nlink == 0)
> -		return true;
> -	return false;
> -}
> -
>   static int path_name(const char *op, const struct cred *subj_cred,
>   		     struct aa_label *label,
>   		     const struct path *path, int flags, char *buffer,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ