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: <cbae3475-0c4c-4a71-af8d-67cc8bb7de21@amd.com>
Date: Wed, 25 Jun 2025 14:26:39 +0200
From: "Gupta, Pankaj" <pankaj.gupta@....com>
To: Shivank Garg <shivankg@....com>, pbonzini@...hat.com,
 kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: bharata@....com, tabba@...gle.com, ackerleytng@...gle.com
Subject: Re: [PATCH] KVM: guest_memfd: Remove redundant kvm_gmem_getattr
 implementation

On 6/2/2025 7:23 PM, Shivank Garg wrote:
> Remove the redundant kvm_gmem_getattr() implementation that simply calls
> generic_fillattr() without any special handling. The VFS layer
> (vfs_getattr_nosec()) will call generic_fillattr() by default when no
> custom getattr operation is provided in the inode_operations structure.
> 
> This is a cleanup with no functional change.
> 
> Signed-off-by: Shivank Garg <shivankg@....com>

Reviewed-by: Pankaj Gupta <pankaj.gupta@....com>

> ---
>   virt/kvm/guest_memfd.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c
> index b2aa6bf24d3a..7d85cc33c0bb 100644
> --- a/virt/kvm/guest_memfd.c
> +++ b/virt/kvm/guest_memfd.c
> @@ -382,23 +382,12 @@ static const struct address_space_operations kvm_gmem_aops = {
>   #endif
>   };
>   
> -static int kvm_gmem_getattr(struct mnt_idmap *idmap, const struct path *path,
> -			    struct kstat *stat, u32 request_mask,
> -			    unsigned int query_flags)
> -{
> -	struct inode *inode = path->dentry->d_inode;
> -
> -	generic_fillattr(idmap, request_mask, inode, stat);
> -	return 0;
> -}
> -
>   static int kvm_gmem_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
>   			    struct iattr *attr)
>   {
>   	return -EINVAL;
>   }
>   static const struct inode_operations kvm_gmem_iops = {
> -	.getattr	= kvm_gmem_getattr,
>   	.setattr	= kvm_gmem_setattr,
>   };
>   


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ