All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
@ 2021-12-21 19:13 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-12-21 19:13 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2817 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6e0567b7305209c2d689ce57180a63d8dc657ad8
commit: ee7c3ec3b4b1222b30272624897826bc40d79bc5 powerpc/ebpf32: Use standard function call for functions within 32M distance
date:   8 months ago
:::::: branch date: 18 hours ago
:::::: commit date: 8 months ago
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^
   arch/powerpc/net/bpf_jit_comp32.c:192:5: note: Assuming that condition 'if(image&&rel<33554432&&rel>=-33554432)' is not redundant
    if (image && rel < 0x2000000 && rel >= -0x2000000) {
       ^
   arch/powerpc/net/bpf_jit_comp32.c:190:36: note: Null pointer addition
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^

vim +190 arch/powerpc/net/bpf_jit_comp32.c

51c66ad849a703 Christophe Leroy 2021-03-22  187  
51c66ad849a703 Christophe Leroy 2021-03-22  188  void bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func)
51c66ad849a703 Christophe Leroy 2021-03-22  189  {
ee7c3ec3b4b122 Christophe Leroy 2021-04-12 @190  	s32 rel = (s32)func - (s32)(image + ctx->idx);
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  191  
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  192  	if (image && rel < 0x2000000 && rel >= -0x2000000) {
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  193  		PPC_BL_ABS(func);
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  194  	} else {
51c66ad849a703 Christophe Leroy 2021-03-22  195  		/* Load function address into r0 */
51c66ad849a703 Christophe Leroy 2021-03-22  196  		EMIT(PPC_RAW_LIS(__REG_R0, IMM_H(func)));
51c66ad849a703 Christophe Leroy 2021-03-22  197  		EMIT(PPC_RAW_ORI(__REG_R0, __REG_R0, IMM_L(func)));
51c66ad849a703 Christophe Leroy 2021-03-22  198  		EMIT(PPC_RAW_MTLR(__REG_R0));
51c66ad849a703 Christophe Leroy 2021-03-22  199  		EMIT(PPC_RAW_BLRL());
51c66ad849a703 Christophe Leroy 2021-03-22  200  	}
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  201  }
51c66ad849a703 Christophe Leroy 2021-03-22  202  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
@ 2022-02-11  6:02 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-02-11  6:02 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2835 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e3c85076d7a6f986445b9008be7e7f83d1b0780a
commit: ee7c3ec3b4b1222b30272624897826bc40d79bc5 powerpc/ebpf32: Use standard function call for functions within 32M distance
date:   10 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 10 months ago
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^
   arch/powerpc/net/bpf_jit_comp32.c:192:5: note: Assuming that condition 'if(image&&rel<33554432&&rel>=-33554432)' is not redundant
    if (image && rel < 0x2000000 && rel >= -0x2000000) {
       ^
   arch/powerpc/net/bpf_jit_comp32.c:190:36: note: Null pointer addition
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^

vim +190 arch/powerpc/net/bpf_jit_comp32.c

51c66ad849a703d Christophe Leroy 2021-03-22  187  
51c66ad849a703d Christophe Leroy 2021-03-22  188  void bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func)
51c66ad849a703d Christophe Leroy 2021-03-22  189  {
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12 @190  	s32 rel = (s32)func - (s32)(image + ctx->idx);
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  191  
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  192  	if (image && rel < 0x2000000 && rel >= -0x2000000) {
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  193  		PPC_BL_ABS(func);
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  194  	} else {
51c66ad849a703d Christophe Leroy 2021-03-22  195  		/* Load function address into r0 */
51c66ad849a703d Christophe Leroy 2021-03-22  196  		EMIT(PPC_RAW_LIS(__REG_R0, IMM_H(func)));
51c66ad849a703d Christophe Leroy 2021-03-22  197  		EMIT(PPC_RAW_ORI(__REG_R0, __REG_R0, IMM_L(func)));
51c66ad849a703d Christophe Leroy 2021-03-22  198  		EMIT(PPC_RAW_MTLR(__REG_R0));
51c66ad849a703d Christophe Leroy 2021-03-22  199  		EMIT(PPC_RAW_BLRL());
51c66ad849a703d Christophe Leroy 2021-03-22  200  	}
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  201  }
51c66ad849a703d Christophe Leroy 2021-03-22  202  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
@ 2022-03-09  1:12 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-03-09  1:12 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2856 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   92f90cc9fe0e7a984ea3d4bf3d120e30ba8a2118
commit: ee7c3ec3b4b1222b30272624897826bc40d79bc5 powerpc/ebpf32: Use standard function call for functions within 32M distance
date:   11 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 11 months ago
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^
   arch/powerpc/net/bpf_jit_comp32.c:192:5: note: Assuming that condition 'if(image&&rel<33554432&&rel>=-33554432)' is not redundant
    if (image && rel < 0x2000000 && rel >= -0x2000000) {
       ^
   arch/powerpc/net/bpf_jit_comp32.c:190:36: note: Null pointer addition
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^

vim +190 arch/powerpc/net/bpf_jit_comp32.c

51c66ad849a703d Christophe Leroy 2021-03-22  187  
51c66ad849a703d Christophe Leroy 2021-03-22  188  void bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func)
51c66ad849a703d Christophe Leroy 2021-03-22  189  {
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12 @190  	s32 rel = (s32)func - (s32)(image + ctx->idx);
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  191  
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  192  	if (image && rel < 0x2000000 && rel >= -0x2000000) {
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  193  		PPC_BL_ABS(func);
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  194  	} else {
51c66ad849a703d Christophe Leroy 2021-03-22  195  		/* Load function address into r0 */
51c66ad849a703d Christophe Leroy 2021-03-22  196  		EMIT(PPC_RAW_LIS(__REG_R0, IMM_H(func)));
51c66ad849a703d Christophe Leroy 2021-03-22  197  		EMIT(PPC_RAW_ORI(__REG_R0, __REG_R0, IMM_L(func)));
51c66ad849a703d Christophe Leroy 2021-03-22  198  		EMIT(PPC_RAW_MTLR(__REG_R0));
51c66ad849a703d Christophe Leroy 2021-03-22  199  		EMIT(PPC_RAW_BLRL());
51c66ad849a703d Christophe Leroy 2021-03-22  200  	}
ee7c3ec3b4b1222 Christophe Leroy 2021-04-12  201  }
51c66ad849a703d Christophe Leroy 2021-03-22  202  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
@ 2022-03-12 13:17 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-03-12 13:17 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2822 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   68453767131a5deec1e8f9ac92a9042f929e585d
commit: ee7c3ec3b4b1222b30272624897826bc40d79bc5 powerpc/ebpf32: Use standard function call for functions within 32M distance
date:   11 months ago
:::::: branch date: 16 hours ago
:::::: commit date: 11 months ago
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^
   arch/powerpc/net/bpf_jit_comp32.c:192:5: note: Assuming that condition 'if(image&&rel<33554432&&rel>=-33554432)' is not redundant
    if (image && rel < 0x2000000 && rel >= -0x2000000) {
       ^
   arch/powerpc/net/bpf_jit_comp32.c:190:36: note: Null pointer addition
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^

vim +190 arch/powerpc/net/bpf_jit_comp32.c

51c66ad849a703 Christophe Leroy 2021-03-22  187  
51c66ad849a703 Christophe Leroy 2021-03-22  188  void bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func)
51c66ad849a703 Christophe Leroy 2021-03-22  189  {
ee7c3ec3b4b122 Christophe Leroy 2021-04-12 @190  	s32 rel = (s32)func - (s32)(image + ctx->idx);
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  191  
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  192  	if (image && rel < 0x2000000 && rel >= -0x2000000) {
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  193  		PPC_BL_ABS(func);
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  194  	} else {
51c66ad849a703 Christophe Leroy 2021-03-22  195  		/* Load function address into r0 */
51c66ad849a703 Christophe Leroy 2021-03-22  196  		EMIT(PPC_RAW_LIS(__REG_R0, IMM_H(func)));
51c66ad849a703 Christophe Leroy 2021-03-22  197  		EMIT(PPC_RAW_ORI(__REG_R0, __REG_R0, IMM_L(func)));
51c66ad849a703 Christophe Leroy 2021-03-22  198  		EMIT(PPC_RAW_MTLR(__REG_R0));
51c66ad849a703 Christophe Leroy 2021-03-22  199  		EMIT(PPC_RAW_BLRL());
51c66ad849a703 Christophe Leroy 2021-03-22  200  	}
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  201  }
51c66ad849a703 Christophe Leroy 2021-03-22  202  

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
@ 2022-03-19 13:38 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-03-19 13:38 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2778 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Christophe Leroy <christophe.leroy@csgroup.eu>
CC: Michael Ellerman <mpe@ellerman.id.au>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   34e047aa16c0123bbae8e2f6df33e5ecc1f56601
commit: ee7c3ec3b4b1222b30272624897826bc40d79bc5 powerpc/ebpf32: Use standard function call for functions within 32M distance
date:   11 months ago
:::::: branch date: 18 hours ago
:::::: commit date: 11 months ago
compiler: powerpc-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^
   arch/powerpc/net/bpf_jit_comp32.c:192:5: note: Assuming that condition 'if(image&&rel<33554432&&rel>=-33554432)' is not redundant
    if (image && rel < 0x2000000 && rel >= -0x2000000) {
       ^
   arch/powerpc/net/bpf_jit_comp32.c:190:36: note: Null pointer addition
    s32 rel = (s32)func - (s32)(image + ctx->idx);
                                      ^

vim +190 arch/powerpc/net/bpf_jit_comp32.c

51c66ad849a703 Christophe Leroy 2021-03-22  187  
51c66ad849a703 Christophe Leroy 2021-03-22  188  void bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func)
51c66ad849a703 Christophe Leroy 2021-03-22  189  {
ee7c3ec3b4b122 Christophe Leroy 2021-04-12 @190  	s32 rel = (s32)func - (s32)(image + ctx->idx);
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  191  
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  192  	if (image && rel < 0x2000000 && rel >= -0x2000000) {
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  193  		PPC_BL_ABS(func);
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  194  	} else {
51c66ad849a703 Christophe Leroy 2021-03-22  195  		/* Load function address into r0 */
51c66ad849a703 Christophe Leroy 2021-03-22  196  		EMIT(PPC_RAW_LIS(__REG_R0, IMM_H(func)));
51c66ad849a703 Christophe Leroy 2021-03-22  197  		EMIT(PPC_RAW_ORI(__REG_R0, __REG_R0, IMM_L(func)));
51c66ad849a703 Christophe Leroy 2021-03-22  198  		EMIT(PPC_RAW_MTLR(__REG_R0));
51c66ad849a703 Christophe Leroy 2021-03-22  199  		EMIT(PPC_RAW_BLRL());
51c66ad849a703 Christophe Leroy 2021-03-22  200  	}
ee7c3ec3b4b122 Christophe Leroy 2021-04-12  201  }
51c66ad849a703 Christophe Leroy 2021-03-22  202  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-19 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-19 13:38 arch/powerpc/net/bpf_jit_comp32.c:190:36: warning: Either the condition 'if(image&&rel<33554432&&rel>=-33554432)' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck] kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-03-12 13:17 kernel test robot
2022-03-09  1:12 kernel test robot
2022-02-11  6:02 kernel test robot
2021-12-21 19:13 kernel test robot

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.