All of lore.kernel.org
 help / color / mirror / Atom feed
* mm/kfence/kfence_test.c:397 test_use_after_free_read_nofault() warn: passing freed memory 'addr' (line 395)
@ 2024-12-12 14:17 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2024-12-12 14:17 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Nirjhar Roy <nirjhar@linux.ibm.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
CC: Marco Elver <elver@google.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   231825b2e1ff6ba799c5eaf396d3ab2354e37c6b
commit: 811808d365398680b628d2b88aafeba77c88691a mm/kfence: add a new kunit test test_use_after_free_read_nofault()
date:   4 weeks ago
:::::: branch date: 16 hours ago
:::::: commit date: 4 weeks ago
config: arm64-randconfig-r072-20241210 (https://download.01.org/0day-ci/archive/20241212/202412122208.LmoUHCba-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202412122208.LmoUHCba-lkp@intel.com/

smatch warnings:
mm/kfence/kfence_test.c:397 test_use_after_free_read_nofault() warn: passing freed memory 'addr' (line 395)

vim +/addr +397 mm/kfence/kfence_test.c

bc8fbc5f305aecf Marco Elver 2021-02-25  385  
811808d36539868 Nirjhar Roy 2024-10-18  386  static void test_use_after_free_read_nofault(struct kunit *test)
811808d36539868 Nirjhar Roy 2024-10-18  387  {
811808d36539868 Nirjhar Roy 2024-10-18  388  	const size_t size = 32;
811808d36539868 Nirjhar Roy 2024-10-18  389  	char *addr;
811808d36539868 Nirjhar Roy 2024-10-18  390  	char dst;
811808d36539868 Nirjhar Roy 2024-10-18  391  	int ret;
811808d36539868 Nirjhar Roy 2024-10-18  392  
811808d36539868 Nirjhar Roy 2024-10-18  393  	setup_test_cache(test, size, 0, NULL);
811808d36539868 Nirjhar Roy 2024-10-18  394  	addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY);
811808d36539868 Nirjhar Roy 2024-10-18 @395  	test_free(addr);
811808d36539868 Nirjhar Roy 2024-10-18  396  	/* Use after free with *_nofault() */
811808d36539868 Nirjhar Roy 2024-10-18 @397  	ret = copy_from_kernel_nofault(&dst, addr, 1);
811808d36539868 Nirjhar Roy 2024-10-18  398  	KUNIT_EXPECT_EQ(test, ret, -EFAULT);
811808d36539868 Nirjhar Roy 2024-10-18  399  	KUNIT_EXPECT_FALSE(test, report_available());
811808d36539868 Nirjhar Roy 2024-10-18  400  }
811808d36539868 Nirjhar Roy 2024-10-18  401  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* mm/kfence/kfence_test.c:397 test_use_after_free_read_nofault() warn: passing freed memory 'addr' (line 395)
@ 2025-05-30 10:13 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-05-30 10:13 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Nirjhar Roy <nirjhar@linux.ibm.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
CC: Marco Elver <elver@google.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f66bc387efbee59978e076ce9bf123ac353b389c
commit: 811808d365398680b628d2b88aafeba77c88691a mm/kfence: add a new kunit test test_use_after_free_read_nofault()
date:   7 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 7 months ago
config: parisc-randconfig-r071-20250530 (https://download.01.org/0day-ci/archive/20250530/202505301817.Lr7TLcj4-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505301817.Lr7TLcj4-lkp@intel.com/

smatch warnings:
mm/kfence/kfence_test.c:397 test_use_after_free_read_nofault() warn: passing freed memory 'addr' (line 395)

vim +/addr +397 mm/kfence/kfence_test.c

bc8fbc5f305aecf Marco Elver 2021-02-25  385  
811808d36539868 Nirjhar Roy 2024-10-18  386  static void test_use_after_free_read_nofault(struct kunit *test)
811808d36539868 Nirjhar Roy 2024-10-18  387  {
811808d36539868 Nirjhar Roy 2024-10-18  388  	const size_t size = 32;
811808d36539868 Nirjhar Roy 2024-10-18  389  	char *addr;
811808d36539868 Nirjhar Roy 2024-10-18  390  	char dst;
811808d36539868 Nirjhar Roy 2024-10-18  391  	int ret;
811808d36539868 Nirjhar Roy 2024-10-18  392  
811808d36539868 Nirjhar Roy 2024-10-18  393  	setup_test_cache(test, size, 0, NULL);
811808d36539868 Nirjhar Roy 2024-10-18  394  	addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY);
811808d36539868 Nirjhar Roy 2024-10-18 @395  	test_free(addr);
811808d36539868 Nirjhar Roy 2024-10-18  396  	/* Use after free with *_nofault() */
811808d36539868 Nirjhar Roy 2024-10-18 @397  	ret = copy_from_kernel_nofault(&dst, addr, 1);
811808d36539868 Nirjhar Roy 2024-10-18  398  	KUNIT_EXPECT_EQ(test, ret, -EFAULT);
811808d36539868 Nirjhar Roy 2024-10-18  399  	KUNIT_EXPECT_FALSE(test, report_available());
811808d36539868 Nirjhar Roy 2024-10-18  400  }
811808d36539868 Nirjhar Roy 2024-10-18  401  

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

^ permalink raw reply	[flat|nested] 3+ messages in thread
* mm/kfence/kfence_test.c:397 test_use_after_free_read_nofault() warn: passing freed memory 'addr' (line 395)
@ 2025-09-13  9:06 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-09-13  9:06 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Nirjhar Roy <nirjhar@linux.ibm.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
CC: Marco Elver <elver@google.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   22f20375f5b71f30c0d6896583b93b6e4bba7279
commit: 811808d365398680b628d2b88aafeba77c88691a mm/kfence: add a new kunit test test_use_after_free_read_nofault()
date:   10 months ago
:::::: branch date: 15 hours ago
:::::: commit date: 10 months ago
config: arm64-randconfig-r071-20250913 (https://download.01.org/0day-ci/archive/20250913/202509131634.QXd7BtIK-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 21857ae337e0892a5522b6e7337899caa61de2a6)

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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202509131634.QXd7BtIK-lkp@intel.com/

smatch warnings:
mm/kfence/kfence_test.c:397 test_use_after_free_read_nofault() warn: passing freed memory 'addr' (line 395)

vim +/addr +397 mm/kfence/kfence_test.c

bc8fbc5f305aec Marco Elver 2021-02-25  385  
811808d3653986 Nirjhar Roy 2024-10-18  386  static void test_use_after_free_read_nofault(struct kunit *test)
811808d3653986 Nirjhar Roy 2024-10-18  387  {
811808d3653986 Nirjhar Roy 2024-10-18  388  	const size_t size = 32;
811808d3653986 Nirjhar Roy 2024-10-18  389  	char *addr;
811808d3653986 Nirjhar Roy 2024-10-18  390  	char dst;
811808d3653986 Nirjhar Roy 2024-10-18  391  	int ret;
811808d3653986 Nirjhar Roy 2024-10-18  392  
811808d3653986 Nirjhar Roy 2024-10-18  393  	setup_test_cache(test, size, 0, NULL);
811808d3653986 Nirjhar Roy 2024-10-18  394  	addr = test_alloc(test, size, GFP_KERNEL, ALLOCATE_ANY);
811808d3653986 Nirjhar Roy 2024-10-18 @395  	test_free(addr);
811808d3653986 Nirjhar Roy 2024-10-18  396  	/* Use after free with *_nofault() */
811808d3653986 Nirjhar Roy 2024-10-18 @397  	ret = copy_from_kernel_nofault(&dst, addr, 1);
811808d3653986 Nirjhar Roy 2024-10-18  398  	KUNIT_EXPECT_EQ(test, ret, -EFAULT);
811808d3653986 Nirjhar Roy 2024-10-18  399  	KUNIT_EXPECT_FALSE(test, report_available());
811808d3653986 Nirjhar Roy 2024-10-18  400  }
811808d3653986 Nirjhar Roy 2024-10-18  401  

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

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

end of thread, other threads:[~2025-09-13  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 14:17 mm/kfence/kfence_test.c:397 test_use_after_free_read_nofault() warn: passing freed memory 'addr' (line 395) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-05-30 10:13 kernel test robot
2025-09-13  9:06 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.