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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 1 Nov 2017 16:20:06 -0700
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     Marc-André Lureau <marcandre.lureau@...hat.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     aarcange@...hat.com, hughd@...gle.com, nyc@...omorphy.com
Subject: Re: [PATCH 3/6] hugetlb: expose hugetlbfs_inode_info in header

On 10/31/2017 11:40 AM, Marc-André Lureau wrote:
> The following patch is going to access hugetlbfs_inode_info field from
> mm/shmem.c.

The code looks fine.  However, I would prefer something different for the
commit message.  Perhaps something like:

hugetlbfs inode information will need to be accessed by code in mm/shmem.c
for file sealing operations.  Move inode information definition from .c
file to header for needed access.

-- 
Mike Kravetz

> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@...hat.com>
> ---
>  fs/hugetlbfs/inode.c    | 10 ----------
>  include/linux/hugetlb.h | 10 ++++++++++
>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
> index 59073e9f01a4..ea7b10357ac4 100644
> --- a/fs/hugetlbfs/inode.c
> +++ b/fs/hugetlbfs/inode.c
> @@ -55,16 +55,6 @@ struct hugetlbfs_config {
>  	umode_t			mode;
>  };
>  
> -struct hugetlbfs_inode_info {
> -	struct shared_policy policy;
> -	struct inode vfs_inode;
> -};
> -
> -static inline struct hugetlbfs_inode_info *HUGETLBFS_I(struct inode *inode)
> -{
> -	return container_of(inode, struct hugetlbfs_inode_info, vfs_inode);
> -}
> -
>  int sysctl_hugetlb_shm_group;
>  
>  enum {
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 8bbbd37ab105..f78daf54897d 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -278,6 +278,16 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
>  	return sb->s_fs_info;
>  }
>  
> +struct hugetlbfs_inode_info {
> +	struct shared_policy policy;
> +	struct inode vfs_inode;
> +};
> +
> +static inline struct hugetlbfs_inode_info *HUGETLBFS_I(struct inode *inode)
> +{
> +	return container_of(inode, struct hugetlbfs_inode_info, vfs_inode);
> +}
> +
>  extern const struct file_operations hugetlbfs_file_operations;
>  extern const struct vm_operations_struct hugetlb_vm_ops;
>  struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct,
> 

Powered by blists - more mailing lists