https://github.com/google/kmsan
- HEAD
- refs/heads/dependabot/pip/Documentation/sphinx/pip-0424063bf4
- refs/heads/initialize-all
- refs/heads/kmsan-4.11-rc5
- refs/heads/kmsan-4.12-new
- refs/heads/kmsan-4.19-rc3-last
- refs/heads/kmsan-4.19-rc4-last
- refs/heads/kmsan-4.19-rc8-last
- refs/heads/kmsan-4.19-squeezed
- refs/heads/kmsan-review-v5.13
- refs/heads/kmsan-review-v5.16-rc5
- refs/heads/kmsan-v4.12
- refs/heads/kmsan-v4.13
- refs/heads/kmsan-v4.13-rc7
- refs/heads/kmsan-v4.15
- refs/heads/kmsan-v4.16
- refs/heads/kmsan-v4.16-last
- refs/heads/kmsan-v4.16-rc4
- refs/heads/kmsan-v4.17
- refs/heads/kmsan-v4.17-last
- refs/heads/kmsan-v4.17-rc3
- refs/heads/kmsan-v4.17-rc3-last
- refs/heads/kmsan-v4.17-rc5
- refs/heads/kmsan-v4.17-rc5-last
- refs/heads/kmsan-v4.18-rc4-last
- refs/heads/kmsan-v4.18-rc5
- refs/heads/kmsan-v4.18-rc5-last
- refs/heads/kmsan-v4.18-rc8
- refs/heads/kmsan-v4.18-rc8-last
- refs/heads/kmsan-v4.19
- refs/heads/kmsan-v4.19-last
- refs/heads/kmsan-v4.19-rc1
- refs/heads/kmsan-v4.19-rc1-last
- refs/heads/kmsan-v4.19-rc3
- refs/heads/kmsan-v4.19-rc4
- refs/heads/kmsan-v4.19-rc7
- refs/heads/kmsan-v4.19-rc7-last
- refs/heads/kmsan-v4.19-rc8
- refs/heads/kmsan-v4.20-rc2
- refs/heads/kmsan-v4.20-rc2-last
- refs/heads/kmsan-v4.20-rc3
- refs/heads/kmsan-v4.20-rc3-last
- refs/heads/kmsan-v4.20-rc5
- refs/heads/kmsan-v4.20-rc5-last
- refs/heads/kmsan-v4.20-rc7
- refs/heads/kmsan-v4.20-rc7-last
- refs/heads/kmsan-v5.0
- refs/heads/kmsan-v5.0-last
- refs/heads/kmsan-v5.0-rc1
- refs/heads/kmsan-v5.0-rc1-last
- refs/heads/kmsan-v5.1
- refs/heads/kmsan-v5.1-last
- refs/heads/kmsan-v5.1-rc2
- refs/heads/kmsan-v5.1-rc2-last
- refs/heads/kmsan-v5.1-rc4
- refs/heads/kmsan-v5.1-rc4-last
- refs/heads/kmsan-v5.1-rc7
- refs/heads/kmsan-v5.1-rc7-last
- refs/heads/kmsan-v5.10-rc1
- refs/heads/kmsan-v5.10-rc1-last
- refs/heads/kmsan-v5.10-rc4
- refs/heads/kmsan-v5.10-rc4-last
- refs/heads/kmsan-v5.11-rc7
- refs/heads/kmsan-v5.11-rc7-last
- refs/heads/kmsan-v5.12-rc6
- refs/heads/kmsan-v5.12-rc6-last
- refs/heads/kmsan-v5.12-rc6-squashed
- refs/heads/kmsan-v5.13
- refs/heads/kmsan-v5.13-last
- refs/heads/kmsan-v5.15
- refs/heads/kmsan-v5.15-last
- refs/heads/kmsan-v5.15-rc2
- refs/heads/kmsan-v5.15-rc2-last
- refs/heads/kmsan-v5.15-rc6
- refs/heads/kmsan-v5.15-rc6-last
- refs/heads/kmsan-v5.15-rc7
- refs/heads/kmsan-v5.15-rc7-last
- refs/heads/kmsan-v5.16-rc2
- refs/heads/kmsan-v5.16-rc2-last
- refs/heads/kmsan-v5.16-rc3
- refs/heads/kmsan-v5.16-rc3-last
- refs/heads/kmsan-v5.16-rc4
- refs/heads/kmsan-v5.16-rc4-last
- refs/heads/kmsan-v5.16-rc5
- refs/heads/kmsan-v5.16-rc5-last
- refs/heads/kmsan-v5.17
- refs/heads/kmsan-v5.17-last
- refs/heads/kmsan-v5.17-rc4
- refs/heads/kmsan-v5.17-rc4-last
- refs/heads/kmsan-v5.17-rc8
- refs/heads/kmsan-v5.17-rc8-last
- refs/heads/kmsan-v5.18
- refs/heads/kmsan-v5.18-last
- refs/heads/kmsan-v5.18-rc3
- refs/heads/kmsan-v5.18-rc3-last
- refs/heads/kmsan-v5.18-rc4
- refs/heads/kmsan-v5.18-rc4-last
- refs/heads/kmsan-v5.19
- refs/heads/kmsan-v5.19-last
- refs/heads/kmsan-v5.19-rc3
- refs/heads/kmsan-v5.19-rc3-last
- refs/heads/kmsan-v5.19-rc4
- refs/heads/kmsan-v5.19-rc4-last
- refs/heads/kmsan-v5.19-rc8
- refs/heads/kmsan-v5.19-rc8-last
- refs/heads/kmsan-v5.2
- refs/heads/kmsan-v5.2-last
- refs/heads/kmsan-v5.2-rc4
- refs/heads/kmsan-v5.2-rc4-last
- refs/heads/kmsan-v5.3
- refs/heads/kmsan-v5.3-last
- refs/heads/kmsan-v5.3-rc3
- refs/heads/kmsan-v5.3-rc3-last
- refs/heads/kmsan-v5.3-rc6
- refs/heads/kmsan-v5.3-rc6-last
- refs/heads/kmsan-v5.3-rc7
- refs/heads/kmsan-v5.3-rc7-last
- refs/heads/kmsan-v5.4-rc2
- refs/heads/kmsan-v5.4-rc2-last
- refs/heads/kmsan-v5.4-rc3
- refs/heads/kmsan-v5.4-rc3-last
- refs/heads/kmsan-v5.4-rc5
- refs/heads/kmsan-v5.4-rc5-last
- refs/heads/kmsan-v5.4-rc8
- refs/heads/kmsan-v5.5-rc1
- refs/heads/kmsan-v5.5-rc1-last
- refs/heads/kmsan-v5.5-rc5
- refs/heads/kmsan-v5.5-rc5-last
- refs/heads/kmsan-v5.6-rc2
- refs/heads/kmsan-v5.6-rc2-last
- refs/heads/kmsan-v5.6-rc6
- refs/heads/kmsan-v5.6-rc6-last
- refs/heads/kmsan-v5.6-rc7
- refs/heads/kmsan-v5.6-rc7-last
- refs/heads/kmsan-v5.7-rc4
- refs/heads/kmsan-v5.7-rc4-last
- refs/heads/kmsan-v5.8-rc5
- refs/heads/kmsan-v5.9-rc4
- refs/heads/kmsan-v5.9-rc4-last
- refs/heads/kmsan-v5.9-rc8
- refs/heads/kmsan-v5.9-rc8-last
- refs/heads/kmsan-v6.0-rc2
- refs/heads/kmsan-v6.0-rc2-last
- refs/heads/kmsan-v6.0-rc3
- refs/heads/kmsan-v6.0-rc3-last
- refs/heads/kmsan-v6.0-rc4
- refs/heads/kmsan-v6.0-rc4-last
- refs/heads/kmsan-v6.0-rc5
- refs/heads/kmsan-v6.1
- refs/heads/kmsan-v6.1-last
- refs/heads/kmsan-v6.1-rc1-last
- refs/heads/kmsan-v6.1-rc2
- refs/heads/kmsan-v6.1-rc2-last
- refs/heads/kmsan-v6.1-rc3
- refs/heads/kmsan-v6.1-rc3-last
- refs/heads/kmsan-v6.1-rc4
- refs/heads/kmsan-v6.1-rc4-last
- refs/heads/kmsan-v6.1-rc5
- refs/heads/kmsan-v6.1-rc5-last
- refs/heads/kmsan-v6.1-rc6
- refs/heads/kmsan-v6.1-rc6-last
- refs/heads/kmsan-v6.1-rc7
- refs/heads/kmsan-v6.1-rc7-last
- refs/heads/kmsan-v6.1-rc8
- refs/heads/kmsan-v6.1-rc8-last
- refs/heads/kmsan-v6.2
- refs/heads/kmsan-v6.2-last
- refs/heads/kmsan-v6.2-rc3
- refs/heads/kmsan-v6.2-rc3-last
- refs/heads/kmsan-v6.2-rc5
- refs/heads/kmsan-v6.2-rc5-last
- refs/heads/kmsan-v6.2-rc6
- refs/heads/kmsan-v6.2-rc6-last
- refs/heads/kmsan-v6.2-rc7
- refs/heads/kmsan-v6.2-rc7-last
- refs/heads/kmsan-v6.2-rc8
- refs/heads/kmsan-v6.2-rc8-last
- refs/heads/kmsan-v6.3
- refs/heads/kmsan-v6.3-last
- refs/heads/kmsan-v6.3-rc1
- refs/heads/kmsan-v6.3-rc1-last
- refs/heads/kmsan-v6.3-rc2
- refs/heads/kmsan-v6.3-rc2-last
- refs/heads/kmsan-v6.3-rc3
- refs/heads/kmsan-v6.3-rc3-last
- refs/heads/kmsan-v6.3-rc5
- refs/heads/kmsan-v6.3-rc5-last
- refs/heads/kmsan-v6.3-rc6
- refs/heads/kmsan-v6.3-rc6-last
- refs/heads/kmsan-v6.3-rc7
- refs/heads/kmsan-v6.3-rc7-last
- refs/heads/kmsan-v6.4
- refs/heads/kmsan-v6.4-last
- refs/heads/kmsan-v6.4-rc1
- refs/heads/kmsan-v6.4-rc1-last
- refs/heads/kmsan-v6.4-rc2
- refs/heads/kmsan-v6.4-rc2-last
- refs/heads/kmsan-v6.4-rc3
- refs/heads/kmsan-v6.4-rc3-last
- refs/heads/kmsan-v6.4-rc4
- refs/heads/kmsan-v6.4-rc4-last
- refs/heads/kmsan-v6.4-rc6
- refs/heads/kmsan-v6.4-rc6-last
- refs/heads/kmsan-v6.4-rc7
- refs/heads/kmsan-v6.4-rc7-last
- refs/heads/kmsan-v6.5-rc1
- refs/heads/master
- refs/heads/torvalds-v5.13
- refs/tags/kmsan-v4.19-rc7-first
Take a new snapshot of a software origin
If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.
Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.![swh spinner](/static/img/swh-spinner.gif)
Processing "take a new snapshot" request ...
Permalinks
To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.
Revision | Author | Date | Message | Commit Date |
---|---|---|---|---|
82e66ad | Alexander Potapenko | 21 October 2021, 15:36:59 UTC | kmsan: core: better comment | 21 October 2021, 15:36:59 UTC |
a3428e7 | Alexander Potapenko | 21 October 2021, 15:36:44 UTC | kmsan: core: better comment | 21 October 2021, 15:36:44 UTC |
94f54a8 | Alexander Potapenko | 21 October 2021, 15:24:19 UTC | kmsan: core: better comments | 21 October 2021, 15:24:19 UTC |
ab12d45 | Alexander Potapenko | 21 October 2021, 15:19:52 UTC | kmsan: disable KMSAN in nested interrupts | 21 October 2021, 15:19:52 UTC |
09c9f3c | Alexander Potapenko | 18 October 2021, 15:53:25 UTC | stackdepot: export stack_depot_save | 18 October 2021, 15:53:25 UTC |
d6493d2 | Alexander Potapenko | 15 October 2021, 12:45:36 UTC | kmsan: test: pick the first KMSAN report Signed-off-by: Alexander Potapenko <glider@google.com> | 15 October 2021, 12:45:36 UTC |
951c054 | Alexander Potapenko | 15 October 2021, 11:59:35 UTC | kmsan: test: force origin chaining in UAF test | 15 October 2021, 11:59:35 UTC |
0b75885 | Alexander Potapenko | 15 October 2021, 11:59:02 UTC | kmsan: core: do not pass extra bits when storing chained origin stack | 15 October 2021, 11:59:02 UTC |
8bdd014 | Alexander Potapenko | 15 October 2021, 10:48:35 UTC | kmsan: core: added a comment about kmsan_internal_ functions | 15 October 2021, 10:48:35 UTC |
35211e5 | Alexander Potapenko | 05 October 2021, 14:22:02 UTC | kmsan: core: fix comment | 05 October 2021, 14:22:02 UTC |
5a4d3b2 | Alexander Potapenko | 05 October 2021, 14:10:45 UTC | kmsan: core: refactor kconfigs (Kconfig.kmsan) | 05 October 2021, 14:10:45 UTC |
4fce39a | Alexander Potapenko | 05 October 2021, 14:08:18 UTC | kmsan: core: refactor kconfigs (Makefile part) | 05 October 2021, 14:08:18 UTC |
c7f84f4 | Alexander Potapenko | 05 October 2021, 13:44:35 UTC | kmsan: core: do not touch interrupts when entering/leaving runtime See https://linux-review.googlesource.com/c/linux/kernel/git/torvalds/linux/+/12586 | 05 October 2021, 13:44:35 UTC |
879f6d7 | Alexander Potapenko | 05 October 2021, 12:42:00 UTC | kmsan: core: move doc comment to header | 05 October 2021, 12:42:00 UTC |
90f502f | Alexander Potapenko | 28 September 2021, 11:31:03 UTC | kmsan: speculatively unpoison curent_thread_info() | 28 September 2021, 11:31:03 UTC |
cd2c055 | Alexander Potapenko | 24 September 2021, 17:58:44 UTC | DO-NOT-SUBMIT: kmsan: suppress a report in kernfs_dop_revalidate() There seems to be a true positive in v5.15-rc2 Link: https://lore.kernel.org/linux-fsdevel/CAG_fn=VPO65xw7NGp0k+J8tpCdzd2P5Fauant25RWJNZb3WCmQ@mail.gmail.com/T/#u Signed-off-by: Alexander Potapenko <glider@google.com> | 24 September 2021, 17:58:44 UTC |
f8836e8 | Alexander Potapenko | 21 November 2019, 15:52:59 UTC | x86: kmsan: enable KMSAN builds for x86 Make KMSAN usable by adding the necessary Kconfig bits. Signed-off-by: Alexander Potapenko <glider@google.com> --- This patch was previously called "kmsan: Changing existing files to enable KMSAN builds". Logically unrelated parts of it were split away. v4: - split away changes to init/main.c as requested by Andrey Konovalov v6: - moved Makefile changes to the core patch Link: https://linux-review.googlesource.com/id/I1d295ce8159ce15faa496d20089d953a919c125e | 24 September 2021, 14:36:25 UTC |
f57cc79 | Alexander Potapenko | 21 September 2021, 15:48:11 UTC | security: kmsan: fix interoperability with auto-initialization Heap and stack initialization is great, but not when we are trying uses of uninitialized memory. When the kernel is built with KMSAN, having kernel memory initialization enabled may introduce false negatives. We disable CONFIG_INIT_STACK_ALL_PATTERN and CONFIG_INIT_STACK_ALL_ZERO under CONFIG_KMSAN, making it impossible to auto-initialize stack variables in KMSAN builds. We also disable CONFIG_INIT_ON_ALLOC_DEFAULT_ON and CONFIG_INIT_ON_FREE_DEFAULT_ON to prevent accidental use of heap auto-initialization. We however still let the users enable heap auto-initialization at boot-time (by setting init_on_alloc=1 or init_on_free=1), in which case a warning is printed. Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I86608dd867018683a14ae1870f1928ad925f42e9 | 24 September 2021, 14:36:25 UTC |
df18e8e | Alexander Potapenko | 17 July 2020, 15:18:30 UTC | x86: kmsan: handle register passing from uninstrumented code When calling KMSAN-instrumented functions from non-instrumented functions, function parameters may not be initialized properly, leading to false positive reports. In particular, this happens all the time when calling interrupt handlers from `noinstr` IDT entries. Fortunately, x86 code has instrumentation_begin() and instrumentation_end(), which denote the regions where `noinstr` code calls potentially instrumented code. We add calls to kmsan_instrumentation_begin() to those regions, which: - wipe the current KMSAN state at the beginning of the region, ensuring that the first call of an instrumented function receives initialized parameters (this is a pretty good approximation of having all other instrumented functions receive initialized parameters); - unpoison the `struct pt_regs` set up by the non-instrumented assembly code. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - moved softirq changes to this patch v6: - only call kmsan_instrumentation_begin() Link: https://linux-review.googlesource.com/id/I435ec076cd21752c2f877f5da81f5eced62a2ea4 | 24 September 2021, 14:36:25 UTC |
d4d0313 | Alexander Potapenko | 13 April 2020, 14:13:46 UTC | x86: fs: kmsan: disable CONFIG_DCACHE_WORD_ACCESS As noted by Andrey Konovalov, dentry_string_cmp() calls read_word_at_a_time(), which might read uninitialized bytes to optimize string comparisons. Disabling CONFIG_DCACHE_WORD_ACCESS should prohibit this optimization, as well as (probably) similar ones. Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I4c0073224ac2897cafb8c037362c49dda9cfa133 | 24 September 2021, 14:36:25 UTC |
3720323 | Alexander Potapenko | 23 November 2018, 16:37:33 UTC | x86: kasan: kmsan: support CONFIG_GENERIC_CSUM on x86, enable it for KASAN/KMSAN This is needed to allow memory tools like KASAN and KMSAN see the memory accesses from the checksum code. Without CONFIG_GENERIC_CSUM the tools can't see memory accesses originating from handwritten assembly code. For KASAN it's a question of detecting more bugs, for KMSAN using the C implementation also helps avoid false positives originating from seemingly uninitialized checksum values. Signed-off-by: Alexander Potapenko <glider@google.com> --- v2: - dropped the "default n" (as requested by Randy Dunlap) v4: - changed "net:" to "x86:" in the patch name Link: https://linux-review.googlesource.com/id/I3e95247be55b1112af59dbba07e8cbf34e50a581 | 24 September 2021, 14:36:25 UTC |
8ca1930 | Alexander Potapenko | 15 May 2019, 15:06:46 UTC | x86: kmsan: sync metadata pages on page fault KMSAN assumes shadow and origin pages for every allocated page are accessible. For pages between [VMALLOC_START, VMALLOC_END] those metadata pages start at KMSAN_VMALLOC_SHADOW_START and KMSAN_VMALLOC_ORIGIN_START, therefore we must sync a bigger memory region. Signed-off-by: Alexander Potapenko <glider@google.com> --- v6: - use new metadata range names - update comments, added double underscore to function name Link: https://linux-review.googlesource.com/id/Ia5bd541e54f1ecc11b86666c3ec87c62ac0bdfb8 | 24 September 2021, 14:36:24 UTC |
2552b43 | Alexander Potapenko | 09 November 2018, 16:24:47 UTC | x86: kmsan: use __msan_ string functions where possible. Unless stated otherwise (by explicitly calling __memcpy(), __memset() or __memmove()) we want all string functions to call their __msan_ versions (e.g. __msan_memcpy() instead of memcpy()), so that shadow and origin values are updated accordingly. Bootloader must still use the default string functions to avoid crashes. Signed-off-by: Alexander Potapenko <glider@google.com> --- v3: - use default string functions in the bootloader v4: - include kmsan-checks.h into compiler.h - also handle memset() and memmove() - fix https://github.com/google/kmsan/issues/64 v5: - don't compile memset() and memmove() under KMSAN v6: - work around a compilation problem in module.c - declare __msan_memcpy - don't replace memcpy with __memcpy in relocate.c (efi) - revert EFI changes and module.c after some macro changes Link: https://linux-review.googlesource.com/id/I7ca9bd6b4f5c9b9816404862ae87ca7984395f33 | 24 September 2021, 14:36:24 UTC |
309c979 | Alexander Potapenko | 09 January 2020, 14:16:30 UTC | kmsan: block: skip bio block merging logic for KMSAN KMSAN doesn't allow treating adjacent memory pages as such, if they were allocated by different alloc_pages() calls. The block layer however does so: adjacent pages end up being used together. To prevent this, make page_is_mergeable() return false under KMSAN. Suggested-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/Ie29cc2464c70032347c32ab2a22e1e7a0b37b905 | 24 September 2021, 14:36:24 UTC |
2486367 | Alexander Potapenko | 21 November 2019, 15:11:08 UTC | kmsan: disable physical page merging in biovec KMSAN metadata for consequent physical pages may be inconsequent, therefore accessing such pages together may lead to metadata corruption. We disable merging pages in biovec to prevent such corruptions. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - use IS_ENABLED instead of #ifdef (as requested by Marco Elver) Link: https://linux-review.googlesource.com/id/Iece16041be5ee47904fbc98121b105e5be5fea5c | 24 September 2021, 14:36:24 UTC |
a8d46c5 | Alexander Potapenko | 21 November 2019, 12:26:06 UTC | crypto: kmsan: disable accelerated configs under KMSAN KMSAN is unable to understand when initialized values come from assembly. Disable accelerated configs in KMSAN builds to prevent false positive reports. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - shorten comments as requested by Marco Elver v5: - move the 'depends' directives together, added missing configs as requested by Eric Biggers v6: - resolve build-time warnings caused by CONFIG_WIRESHARK Link: https://linux-review.googlesource.com/id/Idb2334bf3a1b68b31b399709baefaa763038cc50 | 24 September 2021, 14:36:24 UTC |
dbb0eef | Alexander Potapenko | 09 July 2018, 16:45:43 UTC | kmsan: disable strscpy() optimization under KMSAN Disable the efficient 8-byte reading under KMSAN to avoid false positives. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - actually disable the optimization under KMSAN via max=0 - use IS_ENABLED as requested by Marco Elver Link: https://linux-review.googlesource.com/id/Iffd8336965e88fce915db2e6a9d6524422975f69 | 24 September 2021, 14:36:24 UTC |
08cc3c4 | Alexander Potapenko | 09 November 2018, 12:35:36 UTC | kmsan: add tests for KMSAN The testing module triggers KMSAN warnings in different cases and checks that the errors are properly reported, using console probes to capture the tool's output. Signed-off-by: Alexander Potapenko <glider@google.com> --- v2: - added printk_test() v4: - test_kmsan: don't report -Wuninitialized warnings in the test - test_kmsan.c: addressed comments by Andrey Konovalov v6: - switch to KUnit, assorted test fixes, drop lib/test_kmsan.c - s/late_initcall/late_initcall_sync Link: https://linux-review.googlesource.com/id/I49c3f59014cc37fd13541c80beb0b75a75244650 | 24 September 2021, 14:36:24 UTC |
230a5b5 | Alexander Potapenko | 12 December 2019, 15:56:00 UTC | kmsan: handle memory sent to/from USB Depending on the value of is_out kmsan_handle_urb() KMSAN either marks the data copied to the kernel from a USB device as initialized, or checks the data sent to the device for being initialized. Signed-off-by: Alexander Potapenko <glider@google.com> --- This patch was previously called "kmsan: call KMSAN hooks where needed" v4: - split this patch away Link: https://linux-review.googlesource.com/id/Ifa67fb72015d4de14c30e971556f99fc8b2ee506 | 24 September 2021, 14:36:24 UTC |
54864f0 | Alexander Potapenko | 15 November 2019, 11:55:40 UTC | kmsan: dma: unpoison DMA mappings KMSAN doesn't know about DMA memory writes performed by devices. We unpoison such memory when it's mapped to avoid false positive reports. Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/Id4e33a612e9f9394845e1ca345e80057fc54f652 --- v6: - unpoison memory in more generic places, as suggested by Christoph Hellwig. | 24 September 2021, 14:36:23 UTC |
1ed31d1 | Alexander Potapenko | 13 November 2019, 10:58:25 UTC | kmsan: add iomap support Functions from lib/iomap.c interact with hardware, so KMSAN must ensure that: - every read function returns an initialized value - every write function checks values before sending them to hardware. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - adjust sizes of checked memory buffers as requested by Marco Elver v6: - use new poison API names Link: https://linux-review.googlesource.com/id/I45527599f09090aca046dfe1a26df453adab100d | 24 September 2021, 14:36:23 UTC |
b17558c | Alexander Potapenko | 18 November 2019, 16:48:16 UTC | kmsan: virtio: check/unpoison scatterlist in vring_map_one_sg() If vring doesn't use the DMA API, KMSAN is unable to tell whether the memory is initialized by hardware. Explicitly call kmsan_handle_dma() from vring_map_one_sg() in this case to prevent false positives. Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I3be0bcf75e984bce4059f06b58ca7cbc997a5b2b --- v6: - fix kmsan_handle_dma() call to match the new prototype | 24 September 2021, 14:36:23 UTC |
d7eef92 | Alexander Potapenko | 17 October 2019, 08:27:26 UTC | kmsan: disable instrumentation of certain functions Some functions are called from handwritten assembly, and therefore don't have their arguments' metadata fully set up by the instrumentation code. Mark them with __no_sanitize_memory to avoid false positives from spreading further. Certain functions perform task switching, so that the value of |current| is different as they proceed. Because KMSAN state pointer is only read once at the beginning of the function, touching it after |current| has changed may be dangerous. Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/Id8c1743d7e0497230eeffe1ed3d0ef148f72d24a --- v3: - removed TODOs from comments v4: - updated the comments, dropped __no_sanitize_memory from idle_cpu(), sched_init(), profile_tick() - split away the uprobes part as requested by Andrey Konovalov v6: - noinstr functions don't need KMSAN annotations - get_irq_regs() has moved to include/asm-generic/irq_regs.h - better instrumentation decisions/comments | 24 September 2021, 14:36:23 UTC |
d352c10 | Alexander Potapenko | 30 November 2018, 10:43:16 UTC | kmsan: disable KMSAN instrumentation for certain kernel parts Instrumenting some files with KMSAN will result in kernel being unable to link, boot or crashing at runtime for various reasons (e.g. infinite recursion caused by instrumentation hooks calling instrumented code again). Disable KMSAN in the following places: - arch/x86/boot and arch/x86/realmode/rm, as KMSAN doesn't work for i386; - arch/x86/entry/vdso, which isn't linked with KMSAN runtime; - three files in arch/x86/kernel - boot problems; - arch/x86/mm/cpu_entry_area.c - recursion; - EFI stub - build failures; - kcov, stackdepot, lockdep - recursion. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - fix lockdep support by not instrumenting lockdep.c - unified comments with KCSAN v6: - rebase after KCSAN merge Link: https://linux-review.googlesource.com/id/Id5e5c4a9f9d53c24a35ebb633b814c414628d81b | 24 September 2021, 14:36:23 UTC |
8f08827 | Alexander Potapenko | 22 November 2019, 10:32:45 UTC | kmsan: make READ_ONCE_TASK_STACK() return initialized values To avoid false positives, assume that reading from the task stack always produces initialized values. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - added an #include as requested by Marco Elver v6: - switch to kmsan_init() - always call READ_ONCE_NOCHECK() under KMSAN Link: https://linux-review.googlesource.com/id/I9e2350bf3e88688dd83537e12a23456480141997 | 24 September 2021, 14:36:23 UTC |
4b9117a | Alexander Potapenko | 30 October 2019, 11:13:20 UTC | kmsan: initialize the output of READ_ONCE_NOCHECK() READ_ONCE_NOCHECK() is already used by KASAN to ignore memory accesses from e.g. stack unwinders. Define READ_ONCE_NOCHECK() for KMSAN so that it returns initialized values. This helps defeat false positives from leftover stack contents. Signed-off-by: Alexander Potapenko <glider@google.com> --- v3: - removed unnecessary #ifdef as requested by Mark Rutland v4: - added an #include as requested by Marco Elver v6: - READ_ONCE_NOCHECK() moved to include/asm-generic/rwonce.h Link: https://linux-review.googlesource.com/id/I07499eb3e8e59c0ad2fd486cedc932d958b37afd | 24 September 2021, 14:36:23 UTC |
e6ed879 | Alexander Potapenko | 17 July 2020, 12:58:55 UTC | kmsan: mark noinstr as __no_sanitize_memory Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I3c9abe860b97b49bc0c8026918b17a50448dec0d | 24 September 2021, 14:36:22 UTC |
f703929 | Alexander Potapenko | 30 August 2021, 09:24:54 UTC | instrumented.h: add KMSAN support Signed-off-by: Alexander Potapenko <glider@google.com> --- v6: - use new poisoning API names Link: https://linux-review.googlesource.com/id/I43e93b9c02709e6be8d222342f1b044ac8bdbaaf | 24 September 2021, 14:36:22 UTC |
4b0f9c5 | Alexander Potapenko | 11 December 2019, 12:40:37 UTC | kmsan: init: call KMSAN initialization routines kmsan_initialize_shadow() creates metadata pages for mappings created at boot time. kmsan_initialize() initializes the bookkeeping for init_task and enables KMSAN. Signed-off-by: Alexander Potapenko <glider@google.com> --- v6: - move kmsan_initiaize() into mm_init() Link: https://linux-review.googlesource.com/id/I7bc53706141275914326df2345881ffe0cdd16bd | 24 September 2021, 14:36:22 UTC |
05c7f3e | Alexander Potapenko | 17 October 2019, 08:30:05 UTC | kmsan: unpoison |tlb| in arch_tlb_gather_mmu() This is a hack to reduce stackdepot pressure. struct mmu_gather contains 7 1-bit fields packed into a 32-bit unsigned int value. The remaining 25 bits remain uninitialized and are never used, but KMSAN updates the origin for them in zap_pXX_range() in mm/memory.c, thus creating very long origin chains. This is technically correct, but consumes too much memory. Unpoisoning the whole structure will prevent creating such chains. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - removed a TODO, updated patch description v6: - use new unpoisoning API names Link: https://linux-review.googlesource.com/id/I76abee411b8323acfdbc29bc3a60dca8cff2de77 | 24 September 2021, 14:36:22 UTC |
4b92713 | Alexander Potapenko | 12 December 2019, 16:05:30 UTC | kmsan: handle task creation and exiting Tell KMSAN that a new task is created, so the tool creates a backing metadata structure for that task. Signed-off-by: Alexander Potapenko <glider@google.com> --- This patch was previously called "kmsan: call KMSAN hooks where needed" v4: - split this patch away v6: - remove a redundant call to kmsan_task_create() Link: https://linux-review.googlesource.com/id/I0f41c3a1c7d66f7e14aabcfdfc7c69addb945805 | 24 September 2021, 14:36:22 UTC |
e99bad8 | Alexander Potapenko | 20 December 2018, 16:10:15 UTC | kmsan: mm: call KMSAN hooks from SLUB code In order to report uninitialized memory coming from heap allocations KMSAN has to poison them unless they're created with __GFP_ZERO. It's handy that we need KMSAN hooks in the places where init_on_alloc/init_on_free initialization is performed. Signed-off-by: Alexander Potapenko <glider@google.com> --- v3: - reverted unrelated whitespace changes v6: - switch to new poisoning API names - remove annotation from __kmalloc() Link: https://linux-review.googlesource.com/id/I6954b386c5c5d7f99f48bb6cbcc74b75136ce86e | 24 September 2021, 14:36:22 UTC |
fe0c725 | Alexander Potapenko | 12 December 2019, 15:44:59 UTC | kmsan: mm: maintain KMSAN metadata for page operations Insert KMSAN hooks that make the necessary bookkeeping changes: - poison page shadow and origins in alloc_pages()/free_page(); - clear page shadow and origins in clear_page(), copy_user_highpage(); - copy page metadata in copy_highpage(), wp_page_copy(); - handle vmap()/vunmap()/iounmap(); Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I08e2eed033c47fc754155fe8b2e8cbfd24577075 --- This patch was previously called "kmsan: call KMSAN hooks where needed" v2: - dropped call to kmsan_handle_vprintk, updated comment in printk.c v3: - put KMSAN_INIT_VALUE on a separate line in vprintk_store() - dropped call to kmsan_handle_i2c_transfer() - minor style fixes v4: - split mm-unrelated bits to other patches as requested by Andrey Konovalov - dropped changes to mm/compaction.c - use kmsan_unpoison_shadow in page_64.h and highmem.h v6: - switch to eager metadata allocation - switch to new KMSAN memory mapping/unmapping API that matches mm/vmalloc.c - use new poisoning API names - revert mm/ioremap.c | 24 September 2021, 14:36:22 UTC |
edaab30 | Alexander Potapenko | 09 August 2021, 09:10:54 UTC | kmsan: add KMSAN runtime core This patch adds the core parts of KMSAN runtime and associated files: - include/linux/kmsan-checks.h: user API to poison/unpoison/check the kernel memory; - include/linux/kmsan.h: declarations of KMSAN hooks to be referenced outside of KMSAN runtime; - lib/Kconfig.kmsan: CONFIG_KMSAN and related declarations; - Makefile, mm/Makefile, mm/kmsan/Makefile: boilerplate Makefile code; - mm/kmsan/annotations.c: non-inlineable implementation of KMSAN_INIT(); - mm/kmsan/core.c: core functions that operate with shadow and origin memory and perform checks, utility functions; - mm/kmsan/hooks.c: KMSAN hooks for kernel subsystems; - mm/kmsan/init.c: KMSAN initialization routines; - mm/kmsan/instrumentation.c: functions called by KMSAN instrumentation; - mm/kmsan/kmsan.h: internal KMSAN declarations; - mm/kmsan/shadow.c: routines that encapsulate metadata creation and addressing; - scripts/Makefile.kmsan: CFLAGS_KMSAN - scripts/Makefile.lib: KMSAN_SANITIZE macro The patch also adds the necessary bookkeeping bits to struct page and struct task_struct: - each struct page now contains pointers to two struct pages holding KMSAN metadata (shadow and origins) for the original struct page; - each task_struct contains a struct kmsan_task_state used to track the metadata of function parameters and return values for that task. Signed-off-by: Alexander Potapenko <glider@google.com> --- v2: - dropped kmsan_handle_vprintk() - use locking for single kmsan_pr_err() calls - don't try to understand we're inside printk() v3: - fix an endless loop in __msan_poison_alloca() - implement kmsan_handle_dma() - dropped kmsan_handle_i2c_transfer() - fixed compilation with UNWINDER_ORC - dropped assembly hooks for system calls v4: - splitted away some runtime parts to ease the review process - fix a lot of comments by Marco Elver and Andrey Konovalov: -- clean up headers and #defines, remove debugging code -- dropped kmsan_pr_* macros, fixed reporting code -- removed TODOs -- simplified kmsan_get_shadow_origin_ptr() - actually filter out IRQ frames using filter_irq_stacks() - simplify kmsan_get_metadata() - include build_bug.h into kmsan-checks.h - don't instrument KMSAN files with stackprotector - squashed "kmsan: add KMSAN bits to struct page and struct task_struct" into this patch as requested by Marco Elver v5: - s/kmsan_softirq/kmsan_context everywhere (spotted by kbuild test robot <lkp@intel.com>) v6: - moved functions used by KMSAN_INIT_VAL to a separate file - change prototype of kmsan_handle_dma(), add kmsan_handle_dma_sg() - implemented eager metadata allocation: most shadow/origin pages are allocated when releasing memblock memory at boot time. - dropped kmsan_split_page() - added KMSAN_ prefix to vmalloc range defines - fixed kmsan_handle_dma() prototype - use new vmalloc API - fixed compiler warnings in kmsan_shadow.c - unpoison stack trace buffer in kmsan_print_origin() - drop the opportunity to ignore pages - move kmsan_copy_to_user() to kmsan-checks.h - remove GPL from file headers - clang-format - fix compilation with KMSAN disabled - added kmsan_unpoison_pt_regs() - removed preempt_enable/preempt_disable - retired kmsan_in_runtime_cnt - s/KMSAN_BUG_REASON/kmsan_bug_reason - inlined kmsan_internal_alloc_meta_for_pages - retired kmsan_context_enter/kmsan_context_exit - deleted origin_tls - added panic_on_kmsan - better boot-time shadow allocation (no leaks) - deleted REASON_USE_AFTER_FREE - add kmsan_enter_runtime/kmsan_leave_runtime to shadow map hook - skip NULL pointers in kmsan_copy_page_meta() (fix https://github.com/google/kmsan/issues/83) - use new unpoisoning API names - use _Generic in kmsan-checks.h - use new extra bits api - move kmsan_annotations to mm/kmsan/ - new vmalloc space definitions - changed struct page field names - require Clang 11 - drop SKB checks - formatting - fix review comments by Dmitry Vyukov and Marco Elver - folded "kmsan: KMSAN compiler API implementation" into this patch - folded "kmsan: add KMSAN hooks for kernel subsystems" into this patch - dropped __force_order - converted macros to functions in kmsan_shadow.c - removed kmsan_ prefixes from mm/kmsan/ filenames - inlined kmsan_get_task_state() - reworked metadata copying - simplified level checking when entering/leaving runtime - better reporting, dropped kmsan_internal_return_address() - replaced panic() with BUG_ON() where applicable - reworked kmsan_metadata_is_contiguous() - moved arch/x86/Kconfig diff to another patch - moved Makefile changes from "kmsan: enable KMSAN builds" here - fix a data race on stats counter Link: https://linux-review.googlesource.com/id/I9b71bfe3425466c97159f9de0062e5e8e4fec866 | 24 September 2021, 14:36:22 UTC |
e0a7add | Alexander Potapenko | 14 March 2019, 13:18:12 UTC | kmsan: pgtable: reduce vmalloc space KMSAN is going to use 3/4 of existing vmalloc space to hold the metadata, therefore we lower VMALLOC_END to make sure vmalloc() doesn't allocate past the first 1/4. Signed-off-by: Alexander Potapenko <glider@google.com> --- v6: - addressed comments by Andrey Konovalov - added VMEMORY_END - addressed comments by Dmitry Vyukov Link: https://linux-review.googlesource.com/id/I9d8b7f0a88a639f1263bc693cbd5c136626f7efd | 24 September 2021, 14:36:21 UTC |
38cfe64 | Alexander Potapenko | 03 December 2018, 09:13:56 UTC | kmsan: introduce __no_sanitize_memory and __no_kmsan_checks __no_sanitize_memory is a function attribute that instructs KMSAN to skip a function during instrumentation. This is needed to e.g. implement the noinstr functions. __no_kmsan_checks is a function attribute that makes KMSAN ignore the uninitialized values coming from the function's inputs, and initialize the function's outputs. Functions marked with this attribute can't be inlined into functions not marked with it, and vice versa. __SANITIZE_MEMORY__ is a macro that's defined iff the file is instrumented with KMSAN. This is not the same as CONFIG_KMSAN, which is defined for every file. Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I959a338b1b955e40264ed224324da51ca1a82da4 --- v4: - dropped an unnecessary comment as requested by Marco Elver v6: - add a missing #endif - redefine __no_sanitize_memory to use disable_sanitizer_instrumentation - add __no_kmsan_checks - add GCC declarations | 24 September 2021, 14:35:52 UTC |
f358b11 | Alexander Potapenko | 20 November 2018, 14:20:56 UTC | kmsan: add ReST documentation Add Documentation/dev-tools/kmsan.rst and reference it in the dev-tools index. Signed-off-by: Alexander Potapenko <glider@google.com> --- v4: - address comments by Marco Elver: - remove contractions - fix references - minor fixes v6: - address comments by Andrey Konovalov: - add a link to 'Metadata allocation' - rewrite the paragraph about ignored pages - fix empty lines after headings - minor changes - remove mentioning of __GFP_NO_KMSAN_SHADOW - change kmsan_task_state to kmsan_context - address comments by Dmitry Vyukov Link: https://linux-review.googlesource.com/id/I751586f79418b95550a83c6035c650b5b01567cc | 24 September 2021, 09:33:43 UTC |
1d53719 | Alexander Potapenko | 02 September 2021, 14:19:55 UTC | asm-generic: instrument usercopy in cacheflush.h Notify memory tools about usercopy events in copy_to_user_page() and copy_from_user_page(). Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/Ic1ee8da1886325f46ad67f52176f48c2c836c48f | 24 September 2021, 09:33:42 UTC |
d4c217a | Alexander Potapenko | 02 September 2021, 13:01:56 UTC | asm: x86: instrument usercopy in get_user() and __put_user_size() Use hooks from instrumented.h to notify bug detection tools about usercopy events in get_user() and put_user_size(). It's still unclear how to instrument put_user(), which assumes that instrumentation code doesn't clobber RAX. Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/Ia9f12bfe5832623250e20f1859fdf5cc485a2fce | 24 September 2021, 09:33:42 UTC |
2b4b1c0 | Alexander Potapenko | 17 August 2021, 13:34:44 UTC | instrumented.h: allow instrumenting both sides of copy_from_user() Introduce instrument_copy_from_user_before() and instrument_copy_from_user_after() hooks to be invoked before and after the call to copy_from_user(). KASAN and KCSAN will be only using instrument_copy_from_user_before(), but for KMSAN we'll need to insert code after copy_from_user(). Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I855034578f0b0f126734cbd734fb4ae1d3a6af99 | 24 September 2021, 09:33:42 UTC |
9d2b597 | Alexander Potapenko | 07 October 2019, 15:10:19 UTC | stackdepot: reserve 5 extra bits in depot_stack_handle_t Some users (currently only KMSAN) may want to use spare bits in depot_stack_handle_t. Let them do so and provide get_dsh_extra_bits() and set_dsh_extra_bits() to access those bits. Signed-off-by: Alexander Potapenko <glider@google.com> --- v6: - introduce stack_depot_save_extra() and stack_depot_get_extra_bits() Link: https://linux-review.googlesource.com/id/I0587f6c777667864768daf07821d594bce6d8ff9 | 24 September 2021, 09:33:42 UTC |
4a40a60 | Alexander Potapenko | 12 April 2017, 16:41:41 UTC | DO-NOT-SUBMIT: kmsan: suppress (true) reports on self-XORed BPF registers This turns out to be undefined behavior in C11, but let's not open that box for now. Link: https://linux-review.googlesource.com/id/I4f5384a2bbfc4f0e5fb703a1735637079fd70f81 | 24 September 2021, 09:33:22 UTC |
0f5707b | Alexander Potapenko | 09 November 2018, 16:40:43 UTC | DO-NOT-SUBMIT: kmsan: handle /dev/[u]random The random number generator may use uninitialized memory, but it may not return uninitialized values. Unpoison the output buffer in _extract_crng() to prevent false reports. Signed-off-by: Alexander Potapenko <glider@google.com> --- This patch was previously known as "kmsan: unpoisoning buffers from devices etc.", but it turned out to be possible to drop most of the annotations from that patch, so it only relates to /dev/random now. v6: - also handle _mix_pool_bytes (maybe zero out that buffer?) - make a DO-NOT-SUBMIT - s/poison_shadow/poison_memory Link: https://linux-review.googlesource.com/id/I7fb905a13e987fe70886c5e50068ffd3f1e94ea3 | 24 September 2021, 09:33:22 UTC |
8f27ebf | Alexander Potapenko | 19 June 2021, 15:55:38 UTC | DO-NOT-SUBMIT: kmsan: added SECURITY.md Link: https://linux-review.googlesource.com/id/Ie546cf9d8f8d15cecb87d6198673f43ab96e5ace | 24 September 2021, 09:33:22 UTC |
e03c35a | Alexander Potapenko | 07 August 2020, 11:20:49 UTC | DO-NOT-SUBMIT: libnvdimm/pfn_dev: increase MAX_STRUCT_PAGE_SIZE With KMSAN enabled the pages do not fit into 64 bytes anymore Signed-off-by: Alexander Potapenko <glider@google.com> Link: https://linux-review.googlesource.com/id/I353796acc6a850bfd7bb342aa1b63e616fc614f1 | 24 September 2021, 09:33:21 UTC |
7f8aac6 | Dmitry Vyukov | 11 February 2021, 14:38:30 UTC | DO-NOT-SUBMIT: arch/x86: add missing include to sparsemem.h sparsemem.h:34:32: error: unknown type name 'phys_addr_t' extern int phys_to_target_node(phys_addr_t start); ^ sparsemem.h:36:39: error: unknown type name 'u64' extern int memory_add_physaddr_to_nid(u64 start); ^ Signed-off-by: Dmitry Vyukov <dvyukov@google.com> Link: https://linux-review.googlesource.com/id/Ifae221ce85d870d8f8d17173bd44d5cf9be2950f | 24 September 2021, 09:33:21 UTC |
913e810 | Alexander Potapenko | 26 September 2019, 15:49:57 UTC | DO-NOT-SUBMIT: kmsan: kcov: prettify the code unpoisoning area->list Unpoisoning area->list seems to fix all the problems with kcov_remote_start() false positives. This depends on the "kcov: remote coverage support" patch by Andrey Konovalov. Signed-off-by: Alexander Potapenko <glider@google.com> Cc: Vegard Nossum <vegard.nossum@oracle.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: linux-mm@kvack.org Link: https://linux-review.googlesource.com/id/Ie17f2ee47a7af58f5cdf716d585ebf0769348a5a | 24 September 2021, 09:33:21 UTC |
94c8fea | Alexander Potapenko | 20 November 2018, 09:19:19 UTC | DO-NOT-SUBMIT: kmsan: added .config.example, .config.extended and README.md Move along, nothing to see here. This patch is only to reduce diff between KMSAN development and review branches. Signed-off-by: Alexander Potapenko <glider@google.com> Cc: Vegard Nossum <vegard.nossum@oracle.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: linux-mm@kvack.org Link: https://linux-review.googlesource.com/id/Ic2faa63478167769e7b07845483ce0c1d2ca1844 | 24 September 2021, 09:33:07 UTC |
e4e737b | Linus Torvalds | 20 September 2021, 00:28:22 UTC | Linux 5.15-rc2 | 20 September 2021, 00:28:22 UTC |
316e8d7 | Linus Torvalds | 20 September 2021, 00:13:35 UTC | pci_iounmap'2: Electric Boogaloo: try to make sense of it all Nathan Chancellor reports that the recent change to pci_iounmap in commit 9caea0007601 ("parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled") causes build errors on arm64. It took me about two hours to convince myself that I think I know what the logic of that mess of #ifdef's in the <asm-generic/io.h> header file really aim to do, and rewrite it to be easier to follow. Famous last words. Anyway, the code has now been lifted from that grotty header file into lib/pci_iomap.c, and has fairly extensive comments about what the logic is. It also avoids indirecting through another confusing (and badly named) helper function that has other preprocessor config conditionals. Let's see what odd architecture did something else strange in this area to break things. But my arm64 cross build is clean. Fixes: 9caea0007601 ("parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled") Reported-by: Nathan Chancellor <nathan@kernel.org> Cc: Helge Deller <deller@gmx.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Ulrich Teichert <krypton@ulrich-teichert.org> Cc: James Bottomley <James.Bottomley@hansenpartnership.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 20 September 2021, 00:13:35 UTC |
20621d2 | Linus Torvalds | 19 September 2021, 20:29:36 UTC | Merge tag 'x86_urgent_for_v5.15_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Prevent a infinite loop in the MCE recovery on return to user space, which was caused by a second MCE queueing work for the same page and thereby creating a circular work list. - Make kern_addr_valid() handle existing PMD entries, which are marked not present in the higher level page table, correctly instead of blindly dereferencing them. - Pass a valid address to sanitize_phys(). This was caused by the mixture of inclusive and exclusive ranges. memtype_reserve() expect 'end' being exclusive, but sanitize_phys() wants it inclusive. This worked so far, but with end being the end of the physical address space the fail is exposed. - Increase the maximum supported GPIO numbers for 64bit. Newer SoCs exceed the previous maximum. * tag 'x86_urgent_for_v5.15_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Avoid infinite loop for copy from user recovery x86/mm: Fix kern_addr_valid() to cope with existing but not present entries x86/platform: Increase maximum GPIO number for X86_64 x86/pat: Pass valid address to sanitize_phys() | 19 September 2021, 20:29:36 UTC |
fec3036 | Linus Torvalds | 19 September 2021, 20:22:40 UTC | Merge tag 'perf-urgent-2021-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf event fix from Thomas Gleixner: "A single fix for the perf core where a value read with READ_ONCE() was checked and then reread which makes all the checks invalid. Reuse the already read value instead" * tag 'perf-urgent-2021-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: events: Reuse value read using READ_ONCE instead of re-reading it | 19 September 2021, 20:22:40 UTC |
f5e29a2 | Linus Torvalds | 19 September 2021, 20:11:19 UTC | Merge tag 'locking-urgent-2021-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "A set of updates for the RT specific reader/writer locking base code: - Make the fast path reader ordering guarantees correct. - Code reshuffling to make the fix simpler" [ This plays ugly games with atomic_add_return_release() because we don't have a plain atomic_add_release(), and should really be cleaned up, I think - Linus ] * tag 'locking-urgent-2021-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwbase: Take care of ordering guarantee for fastpath reader locking/rwbase: Extract __rwbase_write_trylock() locking/rwbase: Properly match set_and_save_state() to restore_state() | 19 September 2021, 20:11:19 UTC |
62453a4 | Linus Torvalds | 19 September 2021, 20:00:23 UTC | Merge tag 'powerpc-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix crashes when scv (System Call Vectored) is used to make a syscall when a transaction is active, on Power9 or later. - Fix bad interactions between rfscv (Return-from scv) and Power9 fake-suspend mode. - Fix crashes when handling machine checks in LPARs using the Hash MMU. - Partly revert a recent change to our XICS interrupt controller code, which broke the recently added Microwatt support. Thanks to Cédric Le Goater, Eirik Fuller, Ganesh Goudar, Gustavo Romero, Joel Stanley, Nicholas Piggin. * tag 'powerpc-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/xics: Set the IRQ chip data for the ICS native backend powerpc/mce: Fix access error in mce handler KVM: PPC: Book3S HV: Tolerate treclaim. in fake-suspend mode changing registers powerpc/64s: system call rfscv workaround for TM bugs selftests/powerpc: Add scv versions of the basic TM syscall tests powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state | 19 September 2021, 20:00:23 UTC |
2f62996 | Linus Torvalds | 19 September 2021, 19:55:12 UTC | Merge tag 'kbuild-fixes-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix bugs in checkkconfigsymbols.py - Fix missing sys import in gen_compile_commands.py - Fix missing FORCE warning for ARCH=sh builds - Fix -Wignored-optimization-argument warnings for Clang builds - Turn -Wignored-optimization-argument into an error in order to stop building instead of sprinkling warnings * tag 'kbuild-fixes-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: Add -Werror=ignored-optimization-argument to CLANG_FLAGS x86/build: Do not add -falign flags unconditionally for clang kbuild: Fix comment typo in scripts/Makefile.modpost sh: Add missing FORCE prerequisites in Makefile gen_compile_commands: fix missing 'sys' package checkkconfigsymbols.py: Remove skipping of help lines in parse_kconfig_file checkkconfigsymbols.py: Forbid passing 'HEAD' to --commit | 19 September 2021, 19:55:12 UTC |
d94f395 | Linus Torvalds | 19 September 2021, 19:49:17 UTC | Merge tag 'perf-tools-fixes-for-v5.15-2021-09-18' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix ip display in 'perf script' when output type != attr->type. - Ignore deprecation warning when using libbpf'sg btf__get_from_id(), fixing the build with libbpf v0.6+. - Make use of FD() robust in libperf, fixing a segfault with 'perf stat --iostat list'. - Initialize addr_location:srcline pointer to NULL when resolving callchain addresses. - Fix fused instruction logic for assembly functions in 'perf annotate'. * tag 'perf-tools-fixes-for-v5.15-2021-09-18' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf bpf: Ignore deprecation warning when using libbpf's btf__get_from_id() libperf evsel: Make use of FD robust. perf machine: Initialize srcline string member in add_location struct perf script: Fix ip display when type != attr->type perf annotate: Fix fused instr logic for assembly functions | 19 September 2021, 19:49:17 UTC |
bc1abb9 | Linus Torvalds | 19 September 2021, 17:49:42 UTC | dmascc: use proper 'virt_to_bus()' rather than casting to 'int' The old dmascc driver depends on the legacy ISA_DMA_API, and blindly just casts the kernel virtual address to 'int' for set_dma_addr(). That works only incidentally, and because the high bits of the address will be ignored anyway. And on 64-bit architectures it causes warnings. Admittedly, 64-bit architectures with ISA are basically dead - I think the only example of this is alpha, and nobody would ever use the dmascc driver there. But hey, the fix is easy enough, the end result is cleaner, and it's yet another configuration that now builds without warnings. If somebody actually uses this driver on an alpha and this fixes it for you, please email me. Because that is just incredibly bizarre. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 19 September 2021, 17:49:42 UTC |
4fef611 | Linus Torvalds | 19 September 2021, 17:37:00 UTC | alpha: enable GENERIC_PCI_IOMAP unconditionally With the previous commit (9caea0007601: "parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled") we can now enable GENERIC_PCI_IOMAP unconditionally on alpha, and if PCI is not enabled we will just get the nice empty helper functions that allow mixed-bus drivers to build. Example driver: the old 3com/3c59x.c driver works with either the PCI or the EISA version of the 3x59x card, but wouldn't build in an EISA-only configuration because of missing pci_iomap() and pci_iounmap() dummy wrappers. Most of the other PCI infrastructure just becomes empty wrappers even without GENERIC_PCI_IOMAP, and it's not obvious that the pci_iomap functionality shouldn't do the same, but this works. Cc: Ulrich Teichert <krypton@ulrich-teichert.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 19 September 2021, 17:37:00 UTC |
9caea00 | Helge Deller | 19 September 2021, 17:36:09 UTC | parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled Linus noticed odd declaration rules for pci_iounmap() in iomap.h and pci_iomap.h, where it dependend on either NO_GENERIC_PCI_IOPORT_MAP or GENERIC_IOMAP when CONFIG_PCI was disabled. Testing on parisc seems to indicate that we need pci_iounmap() only when CONFIG_PCI is enabled, so the declaration of pci_iounmap() can be moved cleanly into pci_iomap.h in sync with the declarations of pci_iomap(). Link: https://lore.kernel.org/all/CAHk-=wjRrh98pZoQ+AzfWmsTZacWxTJKXZ9eKU2X_0+jM=O8nw@mail.gmail.com/ Signed-off-by: Helge Deller <deller@gmx.de> Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Fixes: 97a29d59fc22 ("[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional") Cc: Arnd Bergmann <arnd@arndb.de> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Ulrich Teichert <krypton@ulrich-teichert.org> Cc: James Bottomley <James.Bottomley@hansenpartnership.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 19 September 2021, 17:36:09 UTC |
31ad37b | Linus Torvalds | 19 September 2021, 17:11:53 UTC | Revert "drm/vc4: hdmi: Remove drm_encoder->crtc usage" This reverts commit 27da370e0fb343a0baf308f503bb3e5dcdfe3362. Sudip Mukherjee reports that this broke pulseaudio with a NULL pointer dereference in vc4_hdmi_audio_prepare(), bisected it to this commit, and confirmed that a revert fixed the problem. Revert the problematic commit until fixed. Link: https://lore.kernel.org/all/CADVatmPB9-oKd=ypvj25UYysVo6EZhQ6bCM7EvztQBMyiZfAyw@mail.gmail.com/ Link: https://lore.kernel.org/all/CADVatmN5EpRshGEPS_JozbFQRXg5w_8LFB3OMP1Ai-ghxd3w4g@mail.gmail.com/ Reported-and-tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Maxime Ripard <maxime@cerno.tech> Cc: Emma Anholt <emma@anholt.net> Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 19 September 2021, 17:11:53 UTC |
b1044a9 | Linus Torvalds | 19 September 2021, 17:06:46 UTC | Revert drm/vc4 hdmi runtime PM changes This reverts commits 9984d6664ce9 ("drm/vc4: hdmi: Make sure the controller is powered in detect") 411efa18e4b0 ("drm/vc4: hdmi: Move the HSM clock enable to runtime_pm") as Michael Stapelberg reports that the new runtime PM changes cause his Raspberry Pi 3 to hang on boot, probably due to interactions with other changes in the DRM tree (because a bisect points to the merge in commit e058a84bfddc: "Merge tag 'drm-next-2021-07-01' of git://.../drm"). Revert these two commits until it's been resolved. Link: https://lore.kernel.org/all/871r5mp7h2.fsf@midna.i-did-not-set--mail-host-address--so-tickle-me/ Reported-and-tested-by: Michael Stapelberg <michael@stapelberg.ch> Cc: Maxime Ripard <maxime@cerno.tech> Cc: Dave Stevenson <dave.stevenson@raspberrypi.com> Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 19 September 2021, 17:06:46 UTC |
0664684 | Nathan Chancellor | 16 September 2021, 18:40:17 UTC | kbuild: Add -Werror=ignored-optimization-argument to CLANG_FLAGS Similar to commit 589834b3a009 ("kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS"). Clang ignores certain GCC flags that it has not implemented, only emitting a warning: $ echo | clang -fsyntax-only -falign-jumps -x c - clang-14: warning: optimization flag '-falign-jumps' is not supported [-Wignored-optimization-argument] When one of these flags gets added to KBUILD_CFLAGS unconditionally, all subsequent cc-{disable-warning,option} calls fail because -Werror was added to these invocations to turn the above warning and the equivalent -W flag warning into errors. To catch the presence of these flags earlier, turn -Wignored-optimization-argument into an error so that the flags can either be implemented or ignored via cc-option and there are no more weird errors. Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 19 September 2021, 01:55:18 UTC |
7fa6a27 | Nathan Chancellor | 16 September 2021, 18:40:16 UTC | x86/build: Do not add -falign flags unconditionally for clang clang does not support -falign-jumps and only recently gained support for -falign-loops. When one of the configuration options that adds these flags is enabled, clang warns and all cc-{disable-warning,option} that follow fail because -Werror gets added to test for the presence of this warning: clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument] To resolve this, add a couple of cc-option calls when building with clang; gcc has supported these options since 3.2 so there is no point in testing for their support. -falign-functions was implemented in clang-7, -falign-loops was implemented in clang-14, and -falign-jumps has not been implemented yet. Link: https://lore.kernel.org/r/YSQE2f5teuvKLkON@Ryzen-9-3900X.localdomain/ Link: https://lore.kernel.org/r/20210824022640.2170859-2-nathan@kernel.org/ Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Acked-by: Borislav Petkov <bp@suse.de> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 19 September 2021, 01:35:53 UTC |
7c80144 | Ramji Jiyani | 16 September 2021, 09:21:22 UTC | kbuild: Fix comment typo in scripts/Makefile.modpost Change comment "create one <module>.mod.c file pr. module" to "create one <module>.mod.c file per module" Signed-off-by: Ramji Jiyani <ramjiyani@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 19 September 2021, 01:14:19 UTC |
4e70b64 | Geert Uytterhoeven | 16 September 2021, 08:43:53 UTC | sh: Add missing FORCE prerequisites in Makefile make: arch/sh/boot/Makefile:87: FORCE prerequisite is missing Add the missing FORCE prerequisites for all build targets identified by "make help". Fixes: e1f86d7b4b2a5213 ("kbuild: warn if FORCE is missing for if_changed(_dep,_rule) and filechk") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 19 September 2021, 01:13:42 UTC |
ec783c7 | Kortan | 08 September 2021, 03:28:48 UTC | gen_compile_commands: fix missing 'sys' package We need to import the 'sys' package since the script has called sys.exit() method. Fixes: 6ad7cbc01527 ("Makefile: Add clang-tidy and static analyzer support to makefile") Signed-off-by: Kortan <kortanzh@gmail.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 19 September 2021, 01:13:03 UTC |
aa0f5ea | Ariel Marcovitch | 01 September 2021, 16:49:52 UTC | checkkconfigsymbols.py: Remove skipping of help lines in parse_kconfig_file When parsing Kconfig files to find symbol definitions and references, lines after a 'help' line are skipped until a new config definition starts. However, Kconfig statements can actually be after a help section, as long as these have shallower indentation. These are skipped by the parser. This means that symbols referenced in this kind of statements are ignored by this function and thus are not considered undefined references in case the symbol is not defined. Remove the 'skip' logic entirely, as it is not needed if we just use the STMT regex to find the end of help lines. However, this means that keywords that appear as part of the help message (i.e. with the same indentation as the help lines) it will be considered as a reference/definition. This can happen now as well, but only with REGEX_KCONFIG_DEF lines. Also, the keyword must have a SYMBOL after it, which probably means that someone referenced a config in the help so it seems like a bonus :) The real solution is to keep track of the indentation when a the first help line in encountered and then handle DEF and STMT lines only if the indentation is shallower. Signed-off-by: Ariel Marcovitch <arielmarcovitch@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 19 September 2021, 01:13:03 UTC |
d62d5ae | Ariel Marcovitch | 01 September 2021, 14:52:12 UTC | checkkconfigsymbols.py: Forbid passing 'HEAD' to --commit As opposed to the --diff option, --commit can get ref names instead of commit hashes. When using the --commit option, the script resets the working directory to the commit before the given ref, by adding '~' to the end of the ref. However, the 'HEAD' ref is relative, and so when the working directory is reset to 'HEAD~', 'HEAD' points to what was 'HEAD~'. Then when the script resets to 'HEAD' it actually stays in the same commit. In this case, the script won't report any cases because there is no diff between the cases of the two refs. Prevent the user from using HEAD refs. A better solution might be to resolve the refs before doing the reset, but for now just disallow such refs. Signed-off-by: Ariel Marcovitch <arielmarcovitch@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> | 19 September 2021, 01:13:03 UTC |
d4d016c | Linus Torvalds | 18 September 2021, 21:45:48 UTC | alpha: move __udiv_qrnnd library function to arch/alpha/lib/ We already had the implementation for __udiv_qrnnd (unsigned divide for multi-precision arithmetic) as part of the alpha math emulation code. But you can disable the math emulation code - even if you shouldn't - and then the MPI code that actually wants this functionality (and is needed by various crypto functions) will fail to build. So move the extended-precision divide code to be a regular library function, just like all the regular division code is. That way ie is available regardless of math-emulation. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 18 September 2021, 21:45:48 UTC |
ab41f75 | Linus Torvalds | 18 September 2021, 21:12:39 UTC | alpha: mark 'Jensen' platform as no longer broken Ok, it almost certainly is still broken on actual hardware, but the immediate reason for it having been marked BROKEN was a build error that is fixed by just making sure the low-level IO header file is included sufficiently early that the __EXTERN_INLINE hackery takes effect. This was marked broken back in 2017 by commit 1883c9f49d02 ("alpha: mark jensen as broken"), but Ulrich Teichert made me look at it as part of my cross-build work to make sure -Werror actually does the right thing. There are lots of alpha configurations that do not build cleanly, but now it's no longer because Jensen wouldn't be buildable. That said, because the Jensen platform doesn't force PCI to be enabled (Jensen only had EISA), it ends up being somewhat interesting as a source of odd configs. Reported-by: Ulrich Teichert <krypton@ulrich-teichert.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 18 September 2021, 21:12:39 UTC |
219d720 | Andrii Nakryiko | 14 September 2021, 17:00:04 UTC | perf bpf: Ignore deprecation warning when using libbpf's btf__get_from_id() Perf code re-implements libbpf's btf__load_from_kernel_by_id() API as a weak function, presumably to dynamically link against old version of libbpf shared library. Unfortunately this causes compilation warning when perf is compiled against libbpf v0.6+. For now, just ignore deprecation warning, but there might be a better solution, depending on perf's needs. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: kernel-team@fb.com LPU-Reference: 20210914170004.4185659-1-andrii@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | 18 September 2021, 20:47:02 UTC |
aba5dae | Ian Rogers | 18 September 2021, 05:44:40 UTC | libperf evsel: Make use of FD robust. FD uses xyarray__entry that may return NULL if an index is out of bounds. If NULL is returned then a segv happens as FD unconditionally dereferences the pointer. This was happening in a case of with perf iostat as shown below. The fix is to make FD an "int*" rather than an int and handle the NULL case as either invalid input or a closed fd. $ sudo gdb --args perf stat --iostat list ... Breakpoint 1, perf_evsel__alloc_fd (evsel=0x5555560951a0, ncpus=1, nthreads=1) at evsel.c:50 50 { (gdb) bt #0 perf_evsel__alloc_fd (evsel=0x5555560951a0, ncpus=1, nthreads=1) at evsel.c:50 #1 0x000055555585c188 in evsel__open_cpu (evsel=0x5555560951a0, cpus=0x555556093410, threads=0x555556086fb0, start_cpu=0, end_cpu=1) at util/evsel.c:1792 #2 0x000055555585cfb2 in evsel__open (evsel=0x5555560951a0, cpus=0x0, threads=0x555556086fb0) at util/evsel.c:2045 #3 0x000055555585d0db in evsel__open_per_thread (evsel=0x5555560951a0, threads=0x555556086fb0) at util/evsel.c:2065 #4 0x00005555558ece64 in create_perf_stat_counter (evsel=0x5555560951a0, config=0x555555c34700 <stat_config>, target=0x555555c2f1c0 <target>, cpu=0) at util/stat.c:590 #5 0x000055555578e927 in __run_perf_stat (argc=1, argv=0x7fffffffe4a0, run_idx=0) at builtin-stat.c:833 #6 0x000055555578f3c6 in run_perf_stat (argc=1, argv=0x7fffffffe4a0, run_idx=0) at builtin-stat.c:1048 #7 0x0000555555792ee5 in cmd_stat (argc=1, argv=0x7fffffffe4a0) at builtin-stat.c:2534 #8 0x0000555555835ed3 in run_builtin (p=0x555555c3f540 <commands+288>, argc=3, argv=0x7fffffffe4a0) at perf.c:313 #9 0x0000555555836154 in handle_internal_command (argc=3, argv=0x7fffffffe4a0) at perf.c:365 #10 0x000055555583629f in run_argv (argcp=0x7fffffffe2ec, argv=0x7fffffffe2e0) at perf.c:409 #11 0x0000555555836692 in main (argc=3, argv=0x7fffffffe4a0) at perf.c:539 ... (gdb) c Continuing. Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (uncore_iio_0/event=0x83,umask=0x04,ch_mask=0xF,fc_mask=0x07/). /bin/dmesg | grep -i perf may provide additional information. Program received signal SIGSEGV, Segmentation fault. 0x00005555559b03ea in perf_evsel__close_fd_cpu (evsel=0x5555560951a0, cpu=1) at evsel.c:166 166 if (FD(evsel, cpu, thread) >= 0) v3. fixes a bug in perf_evsel__run_ioctl where the sense of a branch was backward. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20210918054440.2350466-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | 18 September 2021, 20:43:06 UTC |
57f0ff0 | Michael Petlan | 19 July 2021, 14:53:32 UTC | perf machine: Initialize srcline string member in add_location struct It's later supposed to be either a correct address or NULL. Without the initialization, it may contain an undefined value which results in the following segmentation fault: # perf top --sort comm -g --ignore-callees=do_idle terminates with: #0 0x00007ffff56b7685 in __strlen_avx2 () from /lib64/libc.so.6 #1 0x00007ffff55e3802 in strdup () from /lib64/libc.so.6 #2 0x00005555558cb139 in hist_entry__init (callchain_size=<optimized out>, sample_self=true, template=0x7fffde7fb110, he=0x7fffd801c250) at util/hist.c:489 #3 hist_entry__new (template=template@entry=0x7fffde7fb110, sample_self=sample_self@entry=true) at util/hist.c:564 #4 0x00005555558cb4ba in hists__findnew_entry (hists=hists@entry=0x5555561d9e38, entry=entry@entry=0x7fffde7fb110, al=al@entry=0x7fffde7fb420, sample_self=sample_self@entry=true) at util/hist.c:657 #5 0x00005555558cba1b in __hists__add_entry (hists=hists@entry=0x5555561d9e38, al=0x7fffde7fb420, sym_parent=<optimized out>, bi=bi@entry=0x0, mi=mi@entry=0x0, sample=sample@entry=0x7fffde7fb4b0, sample_self=true, ops=0x0, block_info=0x0) at util/hist.c:288 #6 0x00005555558cbb70 in hists__add_entry (sample_self=true, sample=0x7fffde7fb4b0, mi=0x0, bi=0x0, sym_parent=<optimized out>, al=<optimized out>, hists=0x5555561d9e38) at util/hist.c:1056 #7 iter_add_single_cumulative_entry (iter=0x7fffde7fb460, al=<optimized out>) at util/hist.c:1056 #8 0x00005555558cc8a4 in hist_entry_iter__add (iter=iter@entry=0x7fffde7fb460, al=al@entry=0x7fffde7fb420, max_stack_depth=<optimized out>, arg=arg@entry=0x7fffffff7db0) at util/hist.c:1231 #9 0x00005555557cdc9a in perf_event__process_sample (machine=<optimized out>, sample=0x7fffde7fb4b0, evsel=<optimized out>, event=<optimized out>, tool=0x7fffffff7db0) at builtin-top.c:842 #10 deliver_event (qe=<optimized out>, qevent=<optimized out>) at builtin-top.c:1202 #11 0x00005555558a9318 in do_flush (show_progress=false, oe=0x7fffffff80e0) at util/ordered-events.c:244 #12 __ordered_events__flush (oe=oe@entry=0x7fffffff80e0, how=how@entry=OE_FLUSH__TOP, timestamp=timestamp@entry=0) at util/ordered-events.c:323 #13 0x00005555558a9789 in __ordered_events__flush (timestamp=<optimized out>, how=<optimized out>, oe=<optimized out>) at util/ordered-events.c:339 #14 ordered_events__flush (how=OE_FLUSH__TOP, oe=0x7fffffff80e0) at util/ordered-events.c:341 #15 ordered_events__flush (oe=oe@entry=0x7fffffff80e0, how=how@entry=OE_FLUSH__TOP) at util/ordered-events.c:339 #16 0x00005555557cd631 in process_thread (arg=0x7fffffff7db0) at builtin-top.c:1114 #17 0x00007ffff7bb817a in start_thread () from /lib64/libpthread.so.0 #18 0x00007ffff5656dc3 in clone () from /lib64/libc.so.6 If you look at the frame #2, the code is: 488 if (he->srcline) { 489 he->srcline = strdup(he->srcline); 490 if (he->srcline == NULL) 491 goto err_rawdata; 492 } If he->srcline is not NULL (it is not NULL if it is uninitialized rubbish), it gets strdupped and strdupping a rubbish random string causes the problem. Also, if you look at the commit 1fb7d06a509e, it adds the srcline property into the struct, but not initializing it everywhere needed. Committer notes: Now I see, when using --ignore-callees=do_idle we end up here at line 2189 in add_callchain_ip(): 2181 if (al.sym != NULL) { 2182 if (perf_hpp_list.parent && !*parent && 2183 symbol__match_regex(al.sym, &parent_regex)) 2184 *parent = al.sym; 2185 else if (have_ignore_callees && root_al && 2186 symbol__match_regex(al.sym, &ignore_callees_regex)) { 2187 /* Treat this symbol as the root, 2188 forgetting its callees. */ 2189 *root_al = al; 2190 callchain_cursor_reset(cursor); 2191 } 2192 } And the al that doesn't have the ->srcline field initialized will be copied to the root_al, so then, back to: 1211 int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al, 1212 int max_stack_depth, void *arg) 1213 { 1214 int err, err2; 1215 struct map *alm = NULL; 1216 1217 if (al) 1218 alm = map__get(al->map); 1219 1220 err = sample__resolve_callchain(iter->sample, &callchain_cursor, &iter->parent, 1221 iter->evsel, al, max_stack_depth); 1222 if (err) { 1223 map__put(alm); 1224 return err; 1225 } 1226 1227 err = iter->ops->prepare_entry(iter, al); 1228 if (err) 1229 goto out; 1230 1231 err = iter->ops->add_single_entry(iter, al); 1232 if (err) 1233 goto out; 1234 That al at line 1221 is what hist_entry_iter__add() (called from sample__resolve_callchain()) saw as 'root_al', and then: iter->ops->add_single_entry(iter, al); will go on with al->srcline with a bogus value, I'll add the above sequence to the cset and apply, thanks! Signed-off-by: Michael Petlan <mpetlan@redhat.com> CC: Milian Wolff <milian.wolff@kdab.com> Cc: Jiri Olsa <jolsa@redhat.com> Fixes: 1fb7d06a509e ("perf report Use srcline from callchain for hist entries") Link: https //lore.kernel.org/r/20210719145332.29747-1-mpetlan@redhat.com Reported-by: Juri Lelli <jlelli@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | 18 September 2021, 20:43:05 UTC |
ff6f41f | Adrian Hunter | 11 September 2021, 13:30:53 UTC | perf script: Fix ip display when type != attr->type set_print_ip_opts() was not being called when type != attr->type because there is not a one-to-one relationship between output types and attr->type. That resulted in ip not printing. The attr_type() function is removed, and the match of attr->type to output type is corrected. Example on ADL using taskset to select an atom cpu: # perf record -e cpu_atom/cpu-cycles/ taskset 0x1000 uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.003 MB perf.data (7 samples) ] Before: # perf script | head taskset 428 [-01] 10394.179041: 1 cpu_atom/cpu-cycles/: taskset 428 [-01] 10394.179043: 1 cpu_atom/cpu-cycles/: taskset 428 [-01] 10394.179044: 11 cpu_atom/cpu-cycles/: taskset 428 [-01] 10394.179045: 407 cpu_atom/cpu-cycles/: taskset 428 [-01] 10394.179046: 16789 cpu_atom/cpu-cycles/: taskset 428 [-01] 10394.179052: 676300 cpu_atom/cpu-cycles/: uname 428 [-01] 10394.179278: 4079859 cpu_atom/cpu-cycles/: After: # perf script | head taskset 428 10394.179041: 1 cpu_atom/cpu-cycles/: ffffffff95a0bb97 __intel_pmu_enable_all.constprop.48+0x47 ([kernel.kallsyms]) taskset 428 10394.179043: 1 cpu_atom/cpu-cycles/: ffffffff95a0bb97 __intel_pmu_enable_all.constprop.48+0x47 ([kernel.kallsyms]) taskset 428 10394.179044: 11 cpu_atom/cpu-cycles/: ffffffff95a0bb97 __intel_pmu_enable_all.constprop.48+0x47 ([kernel.kallsyms]) taskset 428 10394.179045: 407 cpu_atom/cpu-cycles/: ffffffff95a0bb97 __intel_pmu_enable_all.constprop.48+0x47 ([kernel.kallsyms]) taskset 428 10394.179046: 16789 cpu_atom/cpu-cycles/: ffffffff95a0bb97 __intel_pmu_enable_all.constprop.48+0x47 ([kernel.kallsyms]) taskset 428 10394.179052: 676300 cpu_atom/cpu-cycles/: 7f829ef73800 cfree+0x0 (/lib/libc-2.32.so) uname 428 10394.179278: 4079859 cpu_atom/cpu-cycles/: ffffffff95bae912 vma_interval_tree_remove+0x1f2 ([kernel.kallsyms]) Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lore.kernel.org/lkml/20210911133053.15682-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | 18 September 2021, 20:43:05 UTC |
7efbcc8 | Ravi Bangoria | 11 September 2021, 04:38:53 UTC | perf annotate: Fix fused instr logic for assembly functions Some x86 microarchitectures fuse a subset of cmp/test/ALU instructions with branch instructions, and thus perf annotate highlight such valid pairs as fused. When annotated with source, perf uses struct disasm_line to contain either source or instruction line from objdump output. Usually, a C statement generates multiple instructions which include such cmp/test/ALU + branch instruction pairs. But in case of assembly function, each individual assembly source line generate one instruction. The 'perf annotate' instruction fusion logic assumes the previous disasm_line as the previous instruction line, which is wrong because, for assembly function, previous disasm_line contains source line. And thus perf fails to highlight valid fused instruction pairs for assembly functions. Fix it by searching backward until we find an instruction line and consider that disasm_line as fused with current branch instruction. Before: │ cmpq %rcx, RIP+8(%rsp) 0.00 │ cmp %rcx,0x88(%rsp) │ je .Lerror_bad_iret <--- Source line 0.14 │ ┌──je b4 <--- Instruction line │ │movl %ecx, %eax After: │ cmpq %rcx, RIP+8(%rsp) 0.00 │ ┌──cmp %rcx,0x88(%rsp) │ │je .Lerror_bad_iret 0.14 │ ├──je b4 │ │movl %ecx, %eax Reviewed-by: Jin Yao <yao.jin@linux.intel.com> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kim Phillips <kim.phillips@amd.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https //lore.kernel.org/r/20210911043854.8373-1-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> | 18 September 2021, 20:43:05 UTC |
93ff9f1 | Linus Torvalds | 18 September 2021, 19:46:14 UTC | Merge tag 's390-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix potential out-of-range access during secure boot facility detection. - Fully validate the VMA before calling follow_pte() in pci code. - Remove arch specific WARN_DYNAMIC_STACK config option. - Fix zcrypto kernel doc comments. - Update defconfigs. * tag 's390-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: remove WARN_DYNAMIC_STACK s390/ap: fix kernel doc comments s390: update defconfigs s390/sclp: fix Secure-IPL facility detection s390/pci_mmio: fully validate the VMA before calling follow_pte() | 18 September 2021, 19:46:14 UTC |
d1a8869 | Linus Torvalds | 18 September 2021, 19:40:55 UTC | Merge tag 'devicetree-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Revert fw_devlink tracking 'phy-handle' links. This broke at least a few platforms. A better solution is being worked on. - Add Samsung UFS binding which fell thru the cracks - Doc reference fixes from Mauro - Fix for restricted DMA error handling * tag 'devicetree-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: arm: Fix Toradex compatible typo of: restricted dma: Fix condition for rmem init dt-bindings: arm: mediatek: mmsys: update mediatek,mmsys.yaml reference dt-bindings: net: dsa: sja1105: update nxp,sja1105.yaml reference dt-bindings: ufs: Add bindings for Samsung ufs host Revert "of: property: fw_devlink: Add support for "phy-handle" property" | 18 September 2021, 19:40:55 UTC |
cd395d5 | Linus Torvalds | 18 September 2021, 18:15:01 UTC | tgafb: clarify dependencies The TGA boards were based on the DECchip 21030 PCI graphics accelerator used mainly for alpha, and existed in a TURBOchannel (TC) version for the DECstation (MIPS) workstations. However, the config option for the TGA code is a bit confused, and says depends on FB && (ALPHA || TC) because people didn't really want to enable the option for random PCI environments, so the "ALPHA" stands in for that case (while the TC case is then the MIPS DECstation case). So that config dependency is kind of a mixture of architecture and bus choices. But it's incorrect, in that there were non-PCI-based alpha hardware, and then the driver just causes warnings: drivers/video/fbdev/tgafb.c:1532:13: error: ‘tgafb_unregister’ defined but not used [-Werror=unused-function] 1532 | static void tgafb_unregister(struct device *dev) | ^~~~~~~~~~~~~~~~ drivers/video/fbdev/tgafb.c:1387:12: error: ‘tgafb_register’ defined but not used [-Werror=unused-function] 1387 | static int tgafb_register(struct device *dev) | ^~~~~~~~~~~~~~ so let's make the config option dependencies a bit more explict: depends on FB depends on PCI || TC depends on ALPHA || TC where that first "FB" is the software configuration dependency, the second "PCI || TC" is the hardware bus dependency, while that final "ALPHA || TC" dependency is the "don't bother asking except for these situations. We could make that third case have "COMPILE_TEST" as an option, and mark the register/unregister functions as __maybe_unused, but I'm not sure it's really worth it. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 18 September 2021, 18:15:01 UTC |
cc9d3aa | Linus Torvalds | 18 September 2021, 17:57:10 UTC | alpha: make 'Jensen' IO functions build again The Jensen IO functions are overly copmplicated because some of the IO addresses refer to special 'local IO' ports, and they get accessed differently. That then makes gcc not actually inline them, and since they were marked "extern inline" when included through the regular <asm/io.h> path, and then only marked "inline" when included from sys_jensen.c, you never necessarily got a body for the IO functions at all. The intent of the sys_jensen.c code is to actually get the non-inlined copy generated, so remove the 'inline' from the magic macro that is supposed to sort this all out. Also, do not mix 'extern inline' functions (that may or may not be inlined and will not generate a function body if they are not) with 'static inline' (that _will_ generate a function body when not inlined). Because gcc will complain about this situation: error: ‘jensen_bus_outb’ is static but used in inline function ‘jensen_outb’ which is not static because gcc basically doesn't know whether to generate a body for that static inline function or not for that call site. So make all of these use that __EXTERN_INLINE marker. Gcc will generally not inline these things on use, and then generate the function body out-of-line in sys_jensen.c. This makes the core IO functions build for the alpha Jensen config. Not that the rest then builds, because it turns out Jensen also doesn't enable PCI, which then makes other drievrs very unhappy, but that's a separate issue. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 18 September 2021, 17:57:10 UTC |
efafec2 | Linus Torvalds | 18 September 2021, 17:05:06 UTC | spi: Fix tegra20 build with CONFIG_PM=n Without CONFIG_PM enabled, the SET_RUNTIME_PM_OPS() macro ends up being empty, and the only use of tegra_slink_runtime_{resume,suspend} goes away, resulting in drivers/spi/spi-tegra20-slink.c:1200:12: error: ‘tegra_slink_runtime_resume’ defined but not used [-Werror=unused-function] 1200 | static int tegra_slink_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/spi/spi-tegra20-slink.c:1188:12: error: ‘tegra_slink_runtime_suspend’ defined but not used [-Werror=unused-function] 1188 | static int tegra_slink_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ mark the functions __maybe_unused to make the build happy. This hits the alpha allmodconfig build (and others). Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | 18 September 2021, 17:05:06 UTC |
55c21d5 | David Heidelberg | 12 September 2021, 16:51:20 UTC | dt-bindings: arm: Fix Toradex compatible typo Fix board compatible typo reported by dtbs_check. Fixes: f4d1577e9bc6 ("dt-bindings: arm: Convert Tegra board/soc bindings to json-schema") Signed-off-by: David Heidelberg <david@ixit.cz> Link: https://lore.kernel.org/r/20210912165120.188490-1-david@ixit.cz Signed-off-by: Rob Herring <robh@kernel.org> | 17 September 2021, 21:02:41 UTC |
31c8025 | David Brazdil | 17 September 2021, 13:14:23 UTC | of: restricted dma: Fix condition for rmem init of_dma_set_restricted_buffer fails to handle negative return values from of_property_count_elems_of_size, e.g. when the property does not exist. This results in an attempt to assign a non-existent reserved memory region to the device and a warning being printed. Fix the condition to take negative values into account. Fixes: f3cfd136aef0 ("of: restricted dma: Don't fail device probe on rmem init failure") Cc: Will Deacon <will@kernel.org> Signed-off-by: David Brazdil <dbrazdil@google.com> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210917131423.2760155-1-dbrazdil@google.com Signed-off-by: Rob Herring <robh@kernel.org> | 17 September 2021, 20:58:09 UTC |
4357f03 | Linus Torvalds | 17 September 2021, 19:05:04 UTC | Merge tag 'pm-5.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two cpufreq issues, one in the intel_pstate driver and one in the core. Specifics: - Prevent intel_pstate from avoiding to use HWP, even if instructed to do so via the kernel command line, when HWP has been enabled already by the platform firmware (Doug Smythies). - Prevent use-after-free from occurring in the schedutil cpufreq governor on exit by fixing a core helper function that attempts to access memory associated with a kobject after calling kobject_put() on it (James Morse)" * tag 'pm-5.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory cpufreq: intel_pstate: Override parameters if HWP forced by BIOS | 17 September 2021, 19:05:04 UTC |
b9b11b1 | Linus Torvalds | 17 September 2021, 18:54:48 UTC | Merge tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: - page align size in sparc32 arch_dma_alloc (Andreas Larsson) - tone down a new dma-debug message (Hamza Mahfooz) - fix the kerneldoc for dma_map_sg_attrs (me) * tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping: sparc32: page align size in arch_dma_alloc dma-debug: prevent an error message from causing runtime problems dma-mapping: fix the kerneldoc for dma_map_sg_attrs | 17 September 2021, 18:54:48 UTC |
7639afa | Linus Torvalds | 17 September 2021, 18:42:31 UTC | Merge tag 'pci-v5.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Defer VPD sizing until we actually need the contents; fixes a boot-time slowdown reported by Dave Jones (Bjorn Helgaas) - Stop clobbering OF fwnodes when we look for an ACPI fwnode; fixes a virtio-iommu boot regression (Jean-Philippe Brucker) - Add AMD GPU multi-function power dependencies; fixes runtime power management, including GPU resume and temp and fan sensor issues (Evan Quan) - Update VMD maintainer to Nirmal Patel (Jon Derrick) * tag 'pci-v5.15-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: MAINTAINERS: Add Nirmal Patel as VMD maintainer PCI: Add AMD GPU multi-function power dependencies PCI/ACPI: Don't reset a fwnode set by OF PCI/VPD: Defer VPD sizing until first access | 17 September 2021, 18:42:31 UTC |
ddf21bd | Linus Torvalds | 17 September 2021, 16:23:44 UTC | Merge tag 'iov_iter.3-5.15-2021-09-17' of git://git.kernel.dk/linux-block Pull io_uring iov_iter retry fixes from Jens Axboe: "This adds a helper to save/restore iov_iter state, and modifies io_uring to use it. After that is done, we can now kill the iter->truncated addition that we added for this release. The io_uring change is being overly cautious with the save/restore/advance, but better safe than sorry and we can always improve that and reduce the overhead if it proves to be of concern. The only case to be worried about in this regard is huge IO, where iteration can take a while to iterate segments. I spent some time writing test cases, and expanded the coverage quite a bit from the last posting of this. liburing carries this regression test case now: https://git.kernel.dk/cgit/liburing/tree/test/file-verify.c which exercises all of this. It now also supports provided buffers, and explicitly tests for end-of-file/device truncation as well. On top of that, Pavel sanitized the IOPOLL retry path to follow the exact same pattern as normal IO" * tag 'iov_iter.3-5.15-2021-09-17' of git://git.kernel.dk/linux-block: io_uring: move iopoll reissue into regular IO path Revert "iov_iter: track truncated size" io_uring: use iov_iter state save/restore helpers iov_iter: add helper to save iov_iter state | 17 September 2021, 16:23:44 UTC |
0bc7eb0 | Linus Torvalds | 17 September 2021, 16:19:59 UTC | Merge tag 'io_uring-5.15-2021-09-17' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Mostly fixes for regressions in this cycle, but also a few fixes that predate this release. The odd one out is a tweak to the direct files added in this release, where attempting to reuse a slot is allowed instead of needing an explicit removal of that slot first. It's a considerable improvement in usability to that API, hence I'm sending it for -rc2. - io-wq race fix and cleanup (Hao) - loop_rw_iter() type fix - SQPOLL max worker race fix - Allow poll arm for O_NONBLOCK files, fixing a case where it's impossible to properly use io_uring if you cannot modify the file flags - Allow direct open to simply reuse a slot, instead of needing it explicitly removed first (Pavel) - Fix a case where we missed signal mask restoring in cqring_wait, if we hit -EFAULT (Xiaoguang)" * tag 'io_uring-5.15-2021-09-17' of git://git.kernel.dk/linux-block: io_uring: allow retry for O_NONBLOCK if async is supported io_uring: auto-removal for direct open/accept io_uring: fix missing sigmask restore in io_cqring_wait() io_uring: pin SQPOLL data before unlocking ring lock io-wq: provide IO_WQ_* constants for IORING_REGISTER_IOWQ_MAX_WORKERS arg items io-wq: fix potential race of acct->nr_workers io-wq: code clean of io_wqe_create_worker() io_uring: ensure symmetry in handling iter types in loop_rw_iter() | 17 September 2021, 16:19:59 UTC |
36d6753 | Linus Torvalds | 17 September 2021, 16:16:59 UTC | Merge tag 'block-5.15-2021-09-17' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request via Christoph: - fix ANA state updates when a namespace is not present (Anton Eidelman) - nvmet: fix a width vs precision bug in nvmet_subsys_attr_serial_show (Dan Carpenter) - avoid race in shutdown namespace removal (Daniel Wagner) - fix io_work priority inversion in nvme-tcp (Keith Busch) - destroy cm id before destroy qp to avoid use after free (Ruozhu Li) - blk-integrity profile registration fixes (Christoph, Lihong) - blk-cgroup UAF fix (Li) - blk-mq tag iterator fix (Ming) - blkcg memory leak fix (Yanfei) * tag 'block-5.15-2021-09-17' of git://git.kernel.dk/linux-block: blk-cgroup: fix UAF by grabbing blkcg lock before destroying blkg pd blkcg: fix memory leak in blk_iolatency_init nvme: remove the call to nvme_update_disk_info in nvme_ns_remove block: flush the integrity workqueue in blk_integrity_unregister block: check if a profile is actually registered in blk_integrity_unregister nvme-tcp: fix io_work priority inversion nvme-rdma: destroy cm id before destroy qp to avoid use after free nvme-multipath: fix ANA state updates when a namespace is not present nvme: avoid race in shutdown namespace removal nvmet: fix a width vs precision bug in nvmet_subsys_attr_serial_show() blk-mq: avoid to iterate over stale request | 17 September 2021, 16:16:59 UTC |
7f2cd14 | Linus Torvalds | 17 September 2021, 15:59:27 UTC | Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes and cleanups from Catalin Marinas: - Fix the memset() size when re-initialising the SVE state. - Mark __stack_chk_guard as __ro_after_init. - Remove duplicate include. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Mark __stack_chk_guard as __ro_after_init arm64/kernel: remove duplicate include in process.c arm64/sve: Use correct size when reinitialising SVE state | 17 September 2021, 15:59:27 UTC |
c6460da | Linus Torvalds | 17 September 2021, 15:31:49 UTC | Merge tag 'for-linus-5.15b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - The first hunk of a Xen swiotlb fixup series fixing multiple minor issues and doing some small cleanups - Some further Xen related fixes avoiding WARN() splats when running as Xen guests or dom0 - A Kconfig fix allowing the pvcalls frontend to be built as a module * tag 'for-linus-5.15b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: swiotlb-xen: drop DEFAULT_NSLABS swiotlb-xen: arrange to have buffer info logged swiotlb-xen: drop leftover __ref swiotlb-xen: limit init retries swiotlb-xen: suppress certain init retries swiotlb-xen: maintain slab count properly swiotlb-xen: fix late init retry swiotlb-xen: avoid double free xen/pvcalls: backend can be a module xen: fix usage of pmd_populate in mremap for pv guests xen: reset legacy rtc flag for PV domU PM: base: power: don't try to use non-existing RTC for storing data xen/balloon: use a kernel thread instead a workqueue | 17 September 2021, 15:31:49 UTC |