Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull hardening fixes from Kees Cook:

- Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST

- Reorganize gcc-plugin includes for GCC 13

- Silence bcache memcpy run-time false positive warnings

* tag 'hardening-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
bcache: Silence memcpy() run-time false positive warnings
gcc-plugins: Reorganize gimple includes for GCC 13
kunit: memcpy: Split slow memcpy tests into MEMCPY_SLOW_KUNIT_TEST

+17 -4
+2 -1
drivers/md/bcache/bcache_ondisk.h
··· 106 106 return bkey_u64s(k) * sizeof(__u64); 107 107 } 108 108 109 - #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) 109 + #define bkey_copy(_dest, _src) unsafe_memcpy(_dest, _src, bkey_bytes(_src), \ 110 + /* bkey is always padded */) 110 111 111 112 static inline void bkey_copy_key(struct bkey *dest, const struct bkey *src) 112 113 {
+2 -1
drivers/md/bcache/journal.c
··· 149 149 bytes, GFP_KERNEL); 150 150 if (!i) 151 151 return -ENOMEM; 152 - memcpy(&i->j, j, bytes); 152 + unsafe_memcpy(&i->j, j, bytes, 153 + /* "bytes" was calculated by set_bytes() above */); 153 154 /* Add to the location after 'where' points to */ 154 155 list_add(&i->list, where); 155 156 ret = 1;
+9
lib/Kconfig.debug
··· 2566 2566 2567 2567 If unsure, say N. 2568 2568 2569 + config MEMCPY_SLOW_KUNIT_TEST 2570 + bool "Include exhaustive memcpy tests" 2571 + depends on MEMCPY_KUNIT_TEST 2572 + default y 2573 + help 2574 + Some memcpy tests are quite exhaustive in checking for overlaps 2575 + and bit ranges. These can be very slow, so they are split out 2576 + as a separate config, in case they need to be disabled. 2577 + 2569 2578 config IS_SIGNED_TYPE_KUNIT_TEST 2570 2579 tristate "Test is_signed_type() macro" if !KUNIT_ALL_TESTS 2571 2580 depends on KUNIT
+2
lib/memcpy_kunit.c
··· 309 309 310 310 static void init_large(struct kunit *test) 311 311 { 312 + if (!IS_ENABLED(CONFIG_MEMCPY_SLOW_KUNIT_TEST)) 313 + kunit_skip(test, "Slow test skipped. Enable with CONFIG_MEMCPY_SLOW_KUNIT_TEST=y"); 312 314 313 315 /* Get many bit patterns. */ 314 316 get_random_bytes(large_src, ARRAY_SIZE(large_src));
+2 -2
scripts/gcc-plugins/gcc-common.h
··· 71 71 #include "varasm.h" 72 72 #include "stor-layout.h" 73 73 #include "internal-fn.h" 74 + #include "gimple.h" 74 75 #include "gimple-expr.h" 76 + #include "gimple-iterator.h" 75 77 #include "gimple-fold.h" 76 78 #include "context.h" 77 79 #include "tree-ssa-alias.h" ··· 87 85 #include "tree-eh.h" 88 86 #include "stmt.h" 89 87 #include "gimplify.h" 90 - #include "gimple.h" 91 88 #include "tree-phinodes.h" 92 89 #include "tree-cfg.h" 93 - #include "gimple-iterator.h" 94 90 #include "gimple-ssa.h" 95 91 #include "ssa-iterators.h" 96 92