Re: [RFC PATCH] fs/hugetlb: Fix UBSAN warning reported on hugetlb

2022-10-26 Thread Mike Kravetz
On 10/26/22 10:50, Aristeu Rozanski wrote: > On Thu, Sep 08, 2022 at 10:29:59PM +0530, Aneesh Kumar K V wrote: > > On 9/8/22 10:23 PM, Matthew Wilcox wrote: > > > On Thu, Sep 08, 2022 at 12:56:59PM +0530, Aneesh Kumar K.V wrote: > > >> +++ b/fs/dax.c > > >> @@ -1304,7 +1304,7 @@

Re: [RFC PATCH] fs/hugetlb: Fix UBSAN warning reported on hugetlb

2022-09-08 Thread Aneesh Kumar K V
On 9/8/22 10:23 PM, Matthew Wilcox wrote: > On Thu, Sep 08, 2022 at 12:56:59PM +0530, Aneesh Kumar K.V wrote: >> +++ b/fs/dax.c >> @@ -1304,7 +1304,7 @@ EXPORT_SYMBOL_GPL(dax_zero_range); >> int dax_truncate_page(struct inode *inode, loff_t pos, bool *did_zero, >> const struct

Re: [RFC PATCH] fs/hugetlb: Fix UBSAN warning reported on hugetlb

2022-09-08 Thread Matthew Wilcox
On Thu, Sep 08, 2022 at 12:56:59PM +0530, Aneesh Kumar K.V wrote: > +++ b/fs/dax.c > @@ -1304,7 +1304,7 @@ EXPORT_SYMBOL_GPL(dax_zero_range); > int dax_truncate_page(struct inode *inode, loff_t pos, bool *did_zero, > const struct iomap_ops *ops) > { > - unsigned int blocksize =

[RFC PATCH] fs/hugetlb: Fix UBSAN warning reported on hugetlb

2022-09-08 Thread Aneesh Kumar K.V
Powerpc architecture supports 16GB hugetlb pages with hash translation. For 4K page size, this is implemented as a hugepage directory entry at the PGD level and for 64K it is implemented as a huge page pte at the PUD level Hugetlbfs sets up file system blocksize same as page size and this patch