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]
Date:   Tue, 22 Nov 2022 11:31:12 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc:     Yang Li <yang.lee@...ux.alibaba.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the mm tree

On 22.11.22 07:53, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the mm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
> 
> In file included from include/uapi/linux/posix_types.h:5,
>                   from include/uapi/linux/types.h:14,
>                   from include/linux/types.h:6,
>                   from include/linux/kasan-checks.h:5,
>                   from include/asm-generic/rwonce.h:26,
>                   from ./arch/powerpc/include/generated/asm/rwonce.h:1,
>                   from include/linux/compiler.h:247,
>                   from include/linux/build_bug.h:5,
>                   from include/linux/container_of.h:5,
>                   from include/linux/list.h:5,
>                   from mm/hugetlb.c:6:
> mm/hugetlb.c: In function 'add_hugetlb_page':
> include/linux/stddef.h:8:14: warning: passing argument 2 of 'set_page_private' makes integer from pointer without a cast [-Wint-conversion]
>      8 | #define NULL ((void *)0)
>        |              ^~~~~~~~~~~
>        |              |
>        |              void *
> mm/hugetlb.c:1533:32: note: in expansion of macro 'NULL'
>   1533 |         set_page_private(page, NULL);
>        |                                ^~~~
> In file included from include/linux/mmzone.h:21,
>                   from include/linux/gfp.h:7,
>                   from include/linux/mm.h:7,
>                   from mm/hugetlb.c:8:
> include/linux/mm_types.h:464:70: note: expected 'long unsigned int' but argument is of type 'void *'
>    464 | static inline void set_page_private(struct page *page, unsigned long private)
>        |                                                        ~~~~~~~~~~~~~~^~~~~~~
> 
> Caused by commit
> 
>    1f0d844bcc5b ("mm/hugetlb: stop using 0 as NULL pointer")
> 
> set_page_private() have taken an unsigned long as its second argument
> since (at least) v5.8-rc1.  The cited bugzilla refers to next-20221121,
> but even there:
> 
> $ git grep set_page_private next-20221121:include/linux/mm_types.h
> next-20221121:include/linux/mm_types.h:static inline void set_page_private(struct page *page, unsigned long private)
> 
> In fact the bugzilla refers to mm/hugetlb.c line 1531.  In next-20221121
> that is:
> 
>          folio_change_private(folio, 0);
> 
> I have reverted that commit for today.  Please take more care :-(
> 

Heh, that warning complains about the call to folio_change_private():

$ git show e4cd8d3ff7f9efeb97330e5e9b99eeb2a68f5cf9:mm/hugetlb.c | sed -n '1531p'
         folio_change_private(folio, 0);

And that one is indeed:

$ git grep folio_change_private e4cd8d3ff7f9efeb97330e5e9b99eeb2a68f5cf9:include/linux/pagemap.h
e4cd8d3ff7f9efeb97330e5e9b99eeb2a68f5cf9:include/linux/pagemap.h: * folio_change_private - Change private data on a folio.
e4cd8d3ff7f9efeb97330e5e9b99eeb2a68f5cf9:include/linux/pagemap.h:static inline void *folio_change_private(struct folio *folio, void *data)


I missed in my review that the patch changes set_page_private()
instead because it was applied to the wrong tree ...


The folio_change_private() change is/was from Sidhartha Kumar:


commit 032158fde0b2a59cda2c66a8773135af2a04535e
Author: Sidhartha Kumar <sidhartha.kumar@...cle.com>
Date:   Thu Nov 17 13:14:57 2022 -0800

     mm/hugetlb: convert add_hugetlb_page() to folios and add hugetlb_cma_folio()
     
     Convert add_hugetlb_page() to take in a folio, also convert
     hugetlb_cma_page() to take in a folio.
     
     Link: https://lkml.kernel.org/r/20221117211501.17150-7-sidhartha.kumar@oracle.com
     Signed-off-by: Sidhartha Kumar <sidhartha.kumar@...cle.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ