[arm:ktext-current 1/19] arch/arm64/kernel/kaslr.c:32:6: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *'))

kernel test robot lkp at intel.com
Fri Jul 14 04:41:30 PDT 2023


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git ktext-current
head:   49e3458967802a6981190b5a1fa9fd66dbf58f8c
commit: 631e7c45f5d4cf043cd236a921c341e3dd9f1909 [1/19] arm64: place kernel in its own L0 page table entry
config: arm64-randconfig-r025-20230714 (https://download.01.org/0day-ci/archive/20230714/202307141950.7xmwTuH7-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230714/202307141950.7xmwTuH7-lkp@intel.com/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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307141950.7xmwTuH7-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> lib/test_debug_virtual.c:27:15: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
      27 |         va = (void *)VMALLOC_START;
         |                      ^~~~~~~~~~~~~
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^~~~~~~~~~~
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.
--
>> kernel/kcov.c:190:8: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
     190 |         ip -= kaslr_offset();
         |               ^~~~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:203:56: note: expanded from macro 'kaslr_offset'
     203 | #define kaslr_offset()  ((unsigned long)(kimage_vaddr - KIMAGE_VADDR))
         |                                                         ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:74:19: note: expanded from macro 'max'
      74 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   kernel/kcov.c:630:29: warning: result of comparison of constant 1152921504606846975 with expression of type '__u32' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
     630 |                 if (remote_arg->area_size > LONG_MAX / sizeof(unsigned long))
         |                     ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 warnings generated.
--
>> kernel/fork.c:310:10: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
     310 |                                      VMALLOC_START, VMALLOC_END,
         |                                      ^~~~~~~~~~~~~
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^~~~~~~~~~~
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.
--
>> arch/arm64/mm/ptdump.c:44:4: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
      44 |         { MODULES_VADDR,                "Modules start" },
         |           ^~~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:49:25: note: expanded from macro 'MODULES_VADDR'
      49 | #define MODULES_VADDR           (MODULES_END - MODULES_VSIZE)
         |                                  ^~~~~~~~~~~
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
>> arch/arm64/mm/ptdump.c:44:4: error: statement expression not allowed at file scope
   arch/arm64/include/asm/memory.h:49:25: note: expanded from macro 'MODULES_VADDR'
      49 | #define MODULES_VADDR           (MODULES_END - MODULES_VSIZE)
         |                                  ^
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^
   include/linux/minmax.h:74:19: note: expanded from macro 'max'
      74 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^
   include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
      38 |                 __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
         |                 ^
   include/linux/minmax.h:30:50: note: expanded from macro '__cmp_once'
      30 | #define __cmp_once(x, y, unique_x, unique_y, op) ({     \
         |                                                  ^
   arch/arm64/mm/ptdump.c:45:4: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
      45 |         { MODULES_END,                  "Modules end" },
         |           ^~~~~~~~~~~
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:74:19: note: expanded from macro 'max'
      74 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   arch/arm64/mm/ptdump.c:45:4: error: statement expression not allowed at file scope
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^
   include/linux/minmax.h:74:19: note: expanded from macro 'max'
      74 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^
   include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
      38 |                 __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
         |                 ^
   include/linux/minmax.h:30:50: note: expanded from macro '__cmp_once'
      30 | #define __cmp_once(x, y, unique_x, unique_y, op) ({     \
         |                                                  ^
   arch/arm64/mm/ptdump.c:46:4: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
      46 |         { VMALLOC_START,                "vmalloc() area" },
         |           ^~~~~~~~~~~~~
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^~~~~~~~~~~
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   arch/arm64/mm/ptdump.c:46:4: error: statement expression not allowed at file scope
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^
   include/linux/minmax.h:74:19: note: expanded from macro 'max'
      74 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^
   include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp'
      38 |                 __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
         |                 ^
   include/linux/minmax.h:30:50: note: expanded from macro '__cmp_once'
      30 | #define __cmp_once(x, y, unique_x, unique_y, op) ({     \
         |                                                  ^
   3 warnings and 3 errors generated.
--
>> arch/arm64/kernel/kaslr.c:32:6: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
      32 |         if (kaslr_offset() < MIN_KIMG_ALIGN) {
         |             ^~~~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:203:56: note: expanded from macro 'kaslr_offset'
     203 | #define kaslr_offset()  ((unsigned long)(kimage_vaddr - KIMAGE_VADDR))
         |                                                         ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:74:19: note: expanded from macro 'max'
      74 | #define max(x, y)       __careful_cmp(x, y, >)
         |                         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.
--
>> drivers/md/dm-stats.c:91:25: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
      91 |         if (a > (VMALLOC_END - VMALLOC_START) / DM_STATS_VMALLOC_FACTOR)
         |                                ^~~~~~~~~~~~~
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^~~~~~~~~~~
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^~~~~~~~~~~~
   arch/arm64/include/asm/memory.h:47:6: note: expanded from macro 'KIMAGE_VADDR'
      47 |                                  max(MODULES_VSIZE, PGDIR_SIZE))
         |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~~~~~~~
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                    ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~
   1 warning generated.
--
>> drivers/md/dm-bufio.c:2842:22: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
    2842 |         if (mem > mult_frac(VMALLOC_TOTAL, DM_BUFIO_VMALLOC_PERCENT, 100))
         |                   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmalloc.h:284:38: note: expanded from macro 'VMALLOC_TOTAL'
     284 | #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
         |                                      ^
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^
   include/linux/math.h:124:9: note: expanded from macro 'mult_frac'
     124 |         typeof(x) x_ = (x);     \
         |                ^
>> drivers/md/dm-bufio.c:2842:22: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
    2842 |         if (mem > mult_frac(VMALLOC_TOTAL, DM_BUFIO_VMALLOC_PERCENT, 100))
         |                   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmalloc.h:284:38: note: expanded from macro 'VMALLOC_TOTAL'
     284 | #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
         |                                      ^
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^
   include/linux/math.h:124:18: note: expanded from macro 'mult_frac'
     124 |         typeof(x) x_ = (x);     \
         |                         ^
   drivers/md/dm-bufio.c:2843:19: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
    2843 |                 mem = mult_frac(VMALLOC_TOTAL, DM_BUFIO_VMALLOC_PERCENT, 100);
         |                       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmalloc.h:284:38: note: expanded from macro 'VMALLOC_TOTAL'
     284 | #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
         |                                      ^
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^
   include/linux/math.h:124:9: note: expanded from macro 'mult_frac'
     124 |         typeof(x) x_ = (x);     \
         |                ^
   drivers/md/dm-bufio.c:2843:19: warning: comparison of distinct pointer types ('typeof ((2147483648U)) *' (aka 'unsigned int *') and 'typeof (((1UL) << ((14 - 3) * (4 - (4 - 3)) + 3))) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
    2843 |                 mem = mult_frac(VMALLOC_TOTAL, DM_BUFIO_VMALLOC_PERCENT, 100);
         |                       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmalloc.h:284:38: note: expanded from macro 'VMALLOC_TOTAL'
     284 | #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
         |                                      ^
   arch/arm64/include/asm/pgtable.h:24:25: note: expanded from macro 'VMALLOC_START'
      24 | #define VMALLOC_START           (MODULES_END + PGDIR_SIZE)
         |                                  ^
   arch/arm64/include/asm/memory.h:48:23: note: expanded from macro 'MODULES_END'
      48 | #define MODULES_END             (KIMAGE_VADDR)
         |                                  ^
   note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
      26 |                 (__typecheck(x, y) && __no_side_effects(x, y))
         |                  ^
   include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                   ^
   include/linux/math.h:124:18: note: expanded from macro 'mult_frac'
     124 |         typeof(x) x_ = (x);     \
         |                         ^
   4 warnings generated.
..


vim +32 arch/arm64/kernel/kaslr.c

fc5a89f75d2aad Ard Biesheuvel 2022-06-24  17  
6e13b6b923b35a Mark Rutland   2023-05-30  18  void __init kaslr_init(void)
6e13b6b923b35a Mark Rutland   2023-05-30  19  {
0ddc312b7c7304 Marc Zyngier   2023-06-09  20  	if (cpuid_feature_extract_unsigned_field(arm64_sw_feature_override.val &
0ddc312b7c7304 Marc Zyngier   2023-06-09  21  						 arm64_sw_feature_override.mask,
0ddc312b7c7304 Marc Zyngier   2023-06-09  22  						 ARM64_SW_FEATURE_OVERRIDE_NOKASLR)) {
fc5a89f75d2aad Ard Biesheuvel 2022-06-24  23  		pr_info("KASLR disabled on command line\n");
6e13b6b923b35a Mark Rutland   2023-05-30  24  		return;
fc5a89f75d2aad Ard Biesheuvel 2022-06-24  25  	}
fc5a89f75d2aad Ard Biesheuvel 2022-06-24  26  
f80fb3a3d50843 Ard Biesheuvel 2016-01-26  27  	/*
6e13b6b923b35a Mark Rutland   2023-05-30  28  	 * The KASLR offset modulo MIN_KIMG_ALIGN is taken from the physical
6e13b6b923b35a Mark Rutland   2023-05-30  29  	 * placement of the image rather than from the seed, so a displacement
6e13b6b923b35a Mark Rutland   2023-05-30  30  	 * of less than MIN_KIMG_ALIGN means that no seed was provided.
f80fb3a3d50843 Ard Biesheuvel 2016-01-26  31  	 */
6e13b6b923b35a Mark Rutland   2023-05-30 @32  	if (kaslr_offset() < MIN_KIMG_ALIGN) {

:::::: The code at line 32 was first introduced by commit
:::::: 6e13b6b923b35a965d128a40ef0c5d9dd101e603 arm64: kaslr: split kaslr/module initialization

:::::: TO: Mark Rutland <mark.rutland at arm.com>
:::::: CC: Catalin Marinas <catalin.marinas at arm.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



More information about the linux-arm-kernel mailing list