All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Yoo <harry.yoo@oracle.com>
To: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, patches@lists.linux.dev,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, linux@roeck-us.net, shuah@kernel.org,
	patches@kernelci.org, lkft-triage@lists.linaro.org,
	pavel@denx.de, jonathanh@nvidia.com, f.fainelli@gmail.com,
	sudipm.mukherjee@gmail.com, rwarsow@gmx.de, conor@kernel.org,
	hargar@microsoft.com, broonie@kernel.org, achill@achill.org,
	sr@sladewatkins.com, Ben Copeland <benjamin.copeland@linaro.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Anders Roxell <anders.roxell@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>, Hugh Dickins <hughd@google.com>,
	Sasha Levin <sashal@kernel.org>, Peter Xu <peterx@redhat.com>
Subject: Re: [PATCH 5.4 000/184] 5.4.302-rc2 review
Date: Tue, 2 Dec 2025 22:10:21 +0900	[thread overview]
Message-ID: <aS7lPZPYuChOTdXU@hyeyoo> (raw)
In-Reply-To: <CA+G9fYvF3cGqi_McG1AtfkMgd5EB_=nmcwiJAGFjZReP8dGKxg@mail.gmail.com>

On Tue, Dec 02, 2025 at 06:02:33PM +0530, Naresh Kamboju wrote:
> On Tue, 2 Dec 2025 at 15:41, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > This is the start of the stable review cycle for the 5.4.302 release.
> > There are 184 patches in this series, all will be posted as a response
> > to this one.  If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Thu, 04 Dec 2025 09:54:14 +0000.
> > Anything received after that time might be too late.
> >
> > The whole patch series can be found in one patch at:
> >         https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.302-rc2.gz
> > or in the git tree and branch at:
> >         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> 
> The powerpc builds failed on the stable-rc 5.4.302-rc1 and 5.4.302-rc2.
> 
> * powerpc, build
>   - clang-21-cell_defconfig
>   - clang-nightly-cell_defconfig
>   - gcc-12-cell_defconfig
>   - gcc-12-defconfig
>   - gcc-12-ppc64e_defconfig
>   - gcc-12-ppc6xx_defconfig
>   - gcc-8-cell_defconfig
>   - gcc-8-defconfig
>   - gcc-8-ppc64e_defconfig
>   - gcc-8-ppc6xx_defconfig
> 
> Build regressions: powerpc: mm/mprotect.c:: pgtable.h:971:38: error:
> called object 'pmd_val' is not a function or function pointer
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> The bisection is in progress,
> meanwhile this patch looks to be causing the build failure,
> 
> mm/mprotect: delete pmd_none_or_clear_bad_unless_trans_huge()
> commit 670ddd8cdcbd1d07a4571266ae3517f821728c3a upstream.
> 
> The sequence patch.
> mm/mprotect: use long for page accountings and retval
> commit a79390f5d6a78647fd70856bd42b22d994de0ba2 upstream.
> 
> ### Build error
> In file included from include/linux/bug.h:5,
>                  from include/linux/mmdebug.h:5,
>                  from include/linux/mm.h:9,
>                  from include/linux/pagewalk.h:5,
>                  from mm/mprotect.c:12:
> mm/mprotect.c: In function 'change_pte_range':
> arch/powerpc/include/asm/book3s/64/pgtable.h:971:38: error: called
> object 'pmd_val' is not a function or function pointer
>   971 | #define pmd_page_vaddr(pmd)     __va(pmd_val(pmd) & ~PMD_MASKED_BITS)
>       |                                      ^~~~~~~
> arch/powerpc/include/asm/bug.h:91:32: note: in definition of macro 'WARN_ON'
>    91 |         int __ret_warn_on = !!(x);                              \
>       |                                ^
> arch/powerpc/include/asm/page.h:229:9: note: in expansion of macro
> 'VIRTUAL_WARN_ON'
>   229 |         VIRTUAL_WARN_ON((unsigned long)(x) >= PAGE_OFFSET);
>          \
>       |         ^~~~~~~~~~~~~~~
> arch/powerpc/include/asm/book3s/64/pgtable.h:971:33: note: in
> expansion of macro '__va'
>   971 | #define pmd_page_vaddr(pmd)     __va(pmd_val(pmd) & ~PMD_MASKED_BITS)
>       |                                 ^~~~
> arch/powerpc/include/asm/book3s/64/pgtable.h:1007:21: note: in
> expansion of macro 'pmd_page_vaddr'
>  1007 |         (((pte_t *) pmd_page_vaddr(*(dir))) + pte_index(addr))
>       |                     ^~~~~~~~~~~~~~
> arch/powerpc/include/asm/book3s/64/pgtable.h:1009:41: note: in
> expansion of macro 'pte_offset_kernel'
>  1009 | #define pte_offset_map(dir,addr)        pte_offset_kernel((dir), (addr))
>       |                                         ^~~~~~~~~~~~~~~~~
> include/linux/mm.h:2010:24: note: in expansion of macro 'pte_offset_map'
>  2010 |         pte_t *__pte = pte_offset_map(pmd, address);    \
>       |                        ^~~~~~~~~~~~~~
> mm/mprotect.c:48:15: note: in expansion of macro 'pte_offset_map_lock'
>    48 |         pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
>       |               ^~~~~~~~~~~~~~~~~~~
> mm/mprotect.c:43:15: note: declared here
>    43 |         pmd_t pmd_val;
>       |               ^~~~~~~
> In file included from arch/powerpc/include/asm/mmu.h:132,
>                  from arch/powerpc/include/asm/lppaca.h:47,
>                  from arch/powerpc/include/asm/paca.h:17,
>                  from arch/powerpc/include/asm/current.h:13,
>                  from include/linux/thread_info.h:22,
>                  from include/asm-generic/preempt.h:5,
>                  from ./arch/powerpc/include/generated/asm/preempt.h:1,
>                  from include/linux/preempt.h:78,
>                  from include/linux/spinlock.h:51,
>                  from include/linux/mmzone.h:8,
>                  from include/linux/gfp.h:6,
>                  from include/linux/mm.h:10:
> arch/powerpc/include/asm/book3s/64/pgtable.h:971:38: error: called
> object 'pmd_val' is not a function or function pointer
>   971 | #define pmd_page_vaddr(pmd)     __va(pmd_val(pmd) & ~PMD_MASKED_BITS)
>       |                                      ^~~~~~~
> arch/powerpc/include/asm/page.h:230:47: note: in definition of macro '__va'
>   230 |         (void *)(unsigned long)((phys_addr_t)(x) |
> PAGE_OFFSET);        \
>       |                                               ^
> arch/powerpc/include/asm/book3s/64/pgtable.h:1007:21: note: in
> expansion of macro 'pmd_page_vaddr'
>  1007 |         (((pte_t *) pmd_page_vaddr(*(dir))) + pte_index(addr))
>       |                     ^~~~~~~~~~~~~~
> arch/powerpc/include/asm/book3s/64/pgtable.h:1009:41: note: in
> expansion of macro 'pte_offset_kernel'
>  1009 | #define pte_offset_map(dir,addr)        pte_offset_kernel((dir), (addr))
>       |                                         ^~~~~~~~~~~~~~~~~
> include/linux/mm.h:2010:24: note: in expansion of macro 'pte_offset_map'
>  2010 |         pte_t *__pte = pte_offset_map(pmd, address);    \
>       |                        ^~~~~~~~~~~~~~
> mm/mprotect.c:48:15: note: in expansion of macro 'pte_offset_map_lock'
>    48 |         pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
>       |               ^~~~~~~~~~~~~~~~~~~
> mm/mprotect.c:43:15: note: declared here
>    43 |         pmd_t pmd_val;
>       |               ^~~~~~~

Hi Naresh, thanks for reporting!

Whoa, I really didn't expect this.

I named the variable pmd_val, and during the expansion of
pte_offset_map_lock(), we call pmd_val(), and the compiler is confused
because it's calling a variable rather than a function or macro.

And it didn't show up on my testing environment because on x86_64
implementation of pte_offset_map_lock() implementation we don't call
pmd_val(). The fix would be simply renaming the variable.

To Greg and Sasha; I guess these patches will be dropped for this cycle
and I'm supposed to send V2, right? These two patches are queued for
6.1, 5.15, 5.10 as well.

I tried my best to make sure these backports are properly tested, and
apologies for the inconvenience that I caused.

-- 
Cheers,
Harry / Hyeonggon

> make[2]: *** [scripts/Makefile.build:262: mm/mprotect.o] Error 1
> make[2]: Target '__build' not remade because of errors.
> make[1]: *** [Makefile:1769: mm] Error 2
> kernel/profile.c: In function 'profile_dead_cpu':
> kernel/profile.c:347:27: warning: the comparison will always evaluate
> as 'true' for the address of 'prof_cpu_mask' will never be NULL
> [-Waddress]
>   347 |         if (prof_cpu_mask != NULL)
>       |                           ^~
> kernel/profile.c:50:22: note: 'prof_cpu_mask' declared here
>    50 | static cpumask_var_t prof_cpu_mask;
>       |                      ^~~~~~~~~~~~~
> kernel/profile.c: In function 'profile_online_cpu':
> kernel/profile.c:384:27: warning: the comparison will always evaluate
> as 'true' for the address of 'prof_cpu_mask' will never be NULL
> [-Waddress]
>   384 |         if (prof_cpu_mask != NULL)
>       |                           ^~
> kernel/profile.c:50:22: note: 'prof_cpu_mask' declared here
>    50 | static cpumask_var_t prof_cpu_mask;
>       |                      ^~~~~~~~~~~~~
> kernel/profile.c: In function 'profile_tick':
> kernel/profile.c:414:47: warning: the comparison will always evaluate
> as 'true' for the address of 'prof_cpu_mask' will never be NULL
> [-Waddress]
>   414 |         if (!user_mode(regs) && prof_cpu_mask != NULL &&
>       |                                               ^~
> kernel/profile.c:50:22: note: 'prof_cpu_mask' declared here
>    50 | static cpumask_var_t prof_cpu_mask;
>       |                      ^~~~~~~~~~~~~
> In file included from include/linux/list.h:9,
>                  from include/net/tcp.h:19,
>                  from net/ipv4/tcp_output.c:40:
> net/ipv4/tcp_output.c: In function 'tcp_tso_should_defer':
> include/linux/kernel.h:843:43: warning: comparison of distinct pointer
> types lacks a cast
>   843 |                 (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
>       |                                           ^~
> include/linux/kernel.h:857:18: note: in expansion of macro '__typecheck'
>   857 |                 (__typecheck(x, y) && __no_side_effects(x, y))
>       |                  ^~~~~~~~~~~
> include/linux/kernel.h:867:31: note: in expansion of macro '__safe_cmp'
>   867 |         __builtin_choose_expr(__safe_cmp(x, y), \
>       |                               ^~~~~~~~~~
> include/linux/kernel.h:876:25: note: in expansion of macro '__careful_cmp'
>   876 | #define min(x, y)       __careful_cmp(x, y, <)
>       |                         ^~~~~~~~~~~~~
> net/ipv4/tcp_output.c:2028:21: note: in expansion of macro 'min'
>  2028 |         threshold = min(srtt_in_ns >> 1, NSEC_PER_MSEC);
>       |                     ^~~
> fs/xfs/libxfs/xfs_inode_fork.c: In function 'xfs_ifork_verify_attr':
> fs/xfs/libxfs/xfs_inode_fork.c:735:13: warning: the comparison will
> always evaluate as 'true' for the address of 'i_df' will never be NULL
> [-Waddress]
>   735 |         if (!XFS_IFORK_PTR(ip, XFS_ATTR_FORK))
>       |             ^
> In file included from fs/xfs/libxfs/xfs_inode_fork.c:14:
> fs/xfs/xfs_inode.h:38:33: note: 'i_df' declared here
>    38 |         struct xfs_ifork        i_df;           /* data fork */
>       |                                 ^~~~
> make[1]: Target '_all' not remade because of errors.
> make: *** [Makefile:186: sub-make] Error 2
> make: Target '_all' not remade because of errors.
> 
> ### Build logs
> Build details: https://regressions.linaro.org/lkft/linux-stable-rc-linux-5.4.y/v5.4.301-185-ga03757dc1d0b/build/gcc-12-defconfig/
> Build log: https://storage.tuxsuite.com/public/linaro/lkft/builds/36Hn1iZBZCBAXg2OuUdfdNEUFxK/
> Build config: https://storage.tuxsuite.com/public/linaro/lkft/builds/36Hn1iZBZCBAXg2OuUdfdNEUFxK/config
> 
> ### Steps to reproduce
>  - tuxmake --runtime podman --target-arch powerpc --toolchain gcc-12
> --kconfig defconfig
> 
> --
> Linaro LKFT
> https://lkft.linaro.org

  reply	other threads:[~2025-12-02 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02 10:11 [PATCH 5.4 000/184] 5.4.302-rc2 review Greg Kroah-Hartman
2025-12-02 10:55 ` Brett A C Sheffield
2025-12-02 12:32 ` Naresh Kamboju
2025-12-02 13:10   ` Harry Yoo [this message]
2025-12-02 15:24     ` Greg Kroah-Hartman
2025-12-02 14:02 ` Jon Hunter
2025-12-03  7:51 ` ALOK TIWARI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aS7lPZPYuChOTdXU@hyeyoo \
    --to=harry.yoo@oracle.com \
    --cc=achill@achill.org \
    --cc=akpm@linux-foundation.org \
    --cc=anders.roxell@linaro.org \
    --cc=arnd@arndb.de \
    --cc=benjamin.copeland@linaro.org \
    --cc=broonie@kernel.org \
    --cc=conor@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hargar@microsoft.com \
    --cc=hughd@google.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft-triage@lists.linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=patches@kernelci.org \
    --cc=patches@lists.linux.dev \
    --cc=pavel@denx.de \
    --cc=peterx@redhat.com \
    --cc=rwarsow@gmx.de \
    --cc=sashal@kernel.org \
    --cc=shuah@kernel.org \
    --cc=sr@sladewatkins.com \
    --cc=stable@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.