Re: [PATCH v1 2/4] x86/process: Add a debug interface to change LAM tag width
From: Maciej Wieczor-Retman
Date: Fri Feb 20 2026 - 11:57:32 EST
I'll correct these in the next version.
On 2026-02-21 at 00:41:41 +0800, kernel test robot wrote:
>Hi Maciej,
>
>kernel test robot noticed the following build warnings:
>
>[auto build test WARNING on tip/x86/core]
>[also build test WARNING on peterz-queue/sched/core akpm-mm/mm-everything linus/master v6.19 next-20260220]
>[If your patch is applied to the wrong git tree, kindly drop us a note.
>And when submitting patch, we suggest to use '--base' as documented in
>https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
>url: https://github.com/intel-lab-lkp/linux/commits/Maciej-Wieczor-Retman/x86-process-Shorten-the-default-LAM-tag-width/20260220-205155
>base: tip/x86/core
>patch link: https://lore.kernel.org/r/5ed38af72848015f3417c462e624e52891dc14ed.1771589807.git.m.wieczorretman%40pm.me
>patch subject: [PATCH v1 2/4] x86/process: Add a debug interface to change LAM tag width
>config: x86_64-buildonly-randconfig-001-20260220 (https://download.01.org/0day-ci/archive/20260221/202602210040.C4PVoS0u-lkp@xxxxxxxxx/config)
>compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
>rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
>reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260221/202602210040.C4PVoS0u-lkp@xxxxxxxxx/reproduce)
>
>If you fix the issue in a separate patch/commit (i.e. not just a new version of
>the same patch/commit), kindly add following tags
>| Reported-by: kernel test robot <lkp@xxxxxxxxx>
>| Closes: https://lore.kernel.org/oe-kbuild-all/202602210040.C4PVoS0u-lkp@xxxxxxxxx/
>
>All warnings (new ones prefixed by >>):
>
> arch/x86/kernel/process_64.c:812:8: warning: 'sprintf' will always overflow; destination buffer has size 2, but format string expands to at least 3 [-Wformat-overflow]
> 812 | len = sprintf(buf, "%ld\n", lam_available_bits);
> | ^
>>> arch/x86/kernel/process_64.c:827:6: warning: unused variable 'ceiling' [-Wunused-variable]
> 827 | int ceiling;
> | ^~~~~~~
> 2 warnings generated.
>
>
>vim +/ceiling +827 arch/x86/kernel/process_64.c
>
> 815
> 816 /*
> 817 * Writing a number to this file changes the used lam tag width. Valid values
> 818 * are 4 bit tag width and 6 bit tag width - the second, non-default one is
> 819 * meant mostly for debug and shall be deprecated in the future.
> 820 */
> 821 static ssize_t lam_bits_write_file(struct file *file,
> 822 const char __user *user_buf, size_t count,
> 823 loff_t *ppos)
> 824 {
> 825 char buf[32];
> 826 ssize_t len;
> > 827 int ceiling;
> 828 u8 bits;
> 829
> 830 len = min(count, sizeof(buf) - 1);
> 831 if (copy_from_user(buf, user_buf, len))
> 832 return -EFAULT;
> 833
> 834 buf[len] = '\0';
> 835 if (kstrtou8(buf, 0, &bits))
> 836 return -EINVAL;
> 837
> 838 switch (bits) {
> 839 case LAM_DEFAULT_BITS:
> 840 case LAM_MAX_BITS:
> 841 lam_available_bits = bits;
> 842 return count;
> 843 default:
> 844 return -EINVAL;
> 845 }
> 846 }
> 847
>
>--
>0-DAY CI Kernel Test Service
>https://github.com/intel/lkp-tests/wiki
--
Kind regards
Maciej Wieczór-Retman