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]
Message-ID: <20260114192826.GFaWfuWi6Zs1L2bhYg@fat_crate.local>
Date: Wed, 14 Jan 2026 20:28:26 +0100
From: Borislav Petkov <bp@...en8.de>
To: Hou Wenlong <houwenlong.hwl@...group.com>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...nel.org>,
	Ingo Molnar <mingo@...hat.com>,
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
	"H. Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Rik van Riel <riel@...riel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Will Deacon <will@...nel.org>, Ryan Roberts <ryan.roberts@....com>,
	Jann Horn <jannh@...gle.com>, Barry Song <baohua@...nel.org>
Subject: Re: [PATCH] x86/mm: Hide mm_free_global_asid() definition under
 'CONFIG_BROADCAST_TLB_FLUSH'

On Wed, Jan 14, 2026 at 09:21:54PM +0800, Hou Wenlong wrote:
> When 'CONFIG_BROADCAST_TLB_FLUSH' is not enabled, mm_free_global_asid()
> remains a globally visible symbol and generates a useless function call
> to it in destroy_context(). Therefore, hide the mm_free_global_asid()
> definition under 'CONFIG_BROADCAST_TLB_FLUSH' and provide a static
> inline empty version when it is not enabled to remove the function call.
> 
> Signed-off-by: Hou Wenlong <houwenlong.hwl@...group.com>
> ---
>  arch/x86/include/asm/mmu_context.h | 5 -----
>  arch/x86/include/asm/tlbflush.h    | 3 +++
>  arch/x86/mm/tlb.c                  | 4 ++--
>  3 files changed, 5 insertions(+), 7 deletions(-)

Config attached.

Before you send your next version, make sure you build:

"allnoconfig" "defconfig" "allmodconfig" "allyesconfig"

for both:

'x86_64' 'i386'

and, say, 100 randconfigs to make sure it actually builds fine.

Thx.

In file included from ./include/linux/mmu_context.h:5,
                 from arch/x86/kvm/../../../virt/kvm/async_pf.c:14:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’ [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’ [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
In file included from ./include/linux/mmu_context.h:5,
                 from ./include/linux/cpuset.h:18,
                 from ./include/linux/sched/isolation.h:5,
                 from ./include/net/ip_vs.h:32,
                 from net/netfilter/ipvs/ip_vs_conn.c:36:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’ [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’ [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:287: arch/x86/kvm/../../../virt/kvm/async_pf.o] Error 1
make[4]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
In file included from ./include/linux/mmu_context.h:5,
                 from ./include/linux/cpuset.h:18,
                 from ./include/linux/sched/isolation.h:5,
                 from arch/x86/kvm/x86.c:60:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’; did you mean ‘iommu_free_global_pasid’? [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
      |         iommu_free_global_pasid
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’; did you mean ‘iommu_free_global_pasid’? [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
      |         iommu_free_global_pasid
make[5]: *** [scripts/Makefile.build:287: net/netfilter/ipvs/ip_vs_conn.o] Error 1
make[4]: *** [scripts/Makefile.build:556: net/netfilter/ipvs] Error 2
make[4]: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:287: arch/x86/kvm/x86.o] Error 1
make[3]: *** [scripts/Makefile.build:556: arch/x86/kvm] Error 2
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:556: net/netfilter] Error 2
make[3]: *** Waiting for unfinished jobs....
lib/maple_tree.c: In function ‘mas_wr_bnode’:
lib/maple_tree.c:3740:1: warning: the frame size of 1136 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 3740 | }
      | ^
lib/maple_tree.c: In function ‘mas_wr_spanning_store’:
lib/maple_tree.c:3480:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 3480 | }
      | ^
make[2]: *** [scripts/Makefile.build:556: arch/x86] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:556: net] Error 2
In file included from ./include/linux/mmu_context.h:5,
                 from ./include/linux/cpuset.h:18,
                 from ./include/linux/sched/isolation.h:5,
                 from drivers/hwmon/coretemp.c:30:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’ [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’ [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:287: drivers/hwmon/coretemp.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:556: drivers/hwmon] Error 2
make[3]: *** Waiting for unfinished jobs....
In file included from ./include/linux/mmu_context.h:5,
                 from drivers/gpu/drm/i915/gem/i915_gem_userptr.c:36:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’ [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’ [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[6]: *** [scripts/Makefile.build:287: drivers/gpu/drm/i915/gem/i915_gem_userptr.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [scripts/Makefile.build:556: drivers/gpu/drm/i915] Error 2
make[5]: *** Waiting for unfinished jobs....
In file included from ./include/linux/mmu_context.h:5,
                 from drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:29:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’ [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’ [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
In file included from ./include/linux/mmu_context.h:5,
                 from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c:22:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’ [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’ [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/mmu_context.h:5,
                 from drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c:22:
./arch/x86/include/asm/mmu_context.h: In function ‘init_new_context’:
./arch/x86/include/asm/mmu_context.h:165:9: error: implicit declaration of function ‘mm_init_global_asid’ [-Werror=implicit-function-declaration]
  165 |         mm_init_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
./arch/x86/include/asm/mmu_context.h: In function ‘destroy_context’:
./arch/x86/include/asm/mmu_context.h:175:9: error: implicit declaration of function ‘mm_free_global_asid’ [-Werror=implicit-function-declaration]
  175 |         mm_free_global_asid(mm);
      |         ^~~~~~~~~~~~~~~~~~~
make[6]: *** [scripts/Makefile.build:287: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.o] Error 1
make[6]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
cc1: some warnings being treated as errors
make[6]: *** [scripts/Makefile.build:287: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.o] Error 1
make[6]: *** [scripts/Makefile.build:287: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.o] Error 1
make[5]: *** [scripts/Makefile.build:556: drivers/gpu/drm/amd/amdgpu] Error 2
make[4]: *** [scripts/Makefile.build:556: drivers/gpu/drm] Error 2
make[3]: *** [scripts/Makefile.build:556: drivers/gpu] Error 2
make[2]: *** [scripts/Makefile.build:556: drivers] Error 2
make[1]: *** [/home/amd/kernel/linux/Makefile:2054: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Building using config allmodconfig


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

View attachment "config" of type "text/plain" (171926 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ