This month felt longer than others but I feel like that was because I was a lot more spread out in the work that I was doing. Let’s dive in, shall we?
Linux kernel patches / backports
-
[PATCH] fbmem: Correct position of '__maybe_unused' in proc_fb_seq_ops
: A common mistake people make is splitting “struct” with an attribute, in this case “__maybe_unused”, which clang warns about while GCC does not. This causes a warning in all of our builds. Unfortunately, this patch did not actually make it into mainline because Linus fixed it himself. -
[PATCH] vmlinux.lds.h: Handle decrypted data section with !SMP
: Kees Cook enabled orphan section warnings in 5.10, which means the linker will warn when a section is not handled by a linker script. Intel’s 0day bot turned up a randconfig that triggers a warning that will probably never be seen otherwise so I sent a patch to get that cleared up. -
Backport of 1139aeb1c521 for all supported stable branches
: This was a series of backports to the stable kernels for a warning about intentional misalignment, which impacted ChromeOS and will impact Android when they upgrade their version of clang. -
UPSTREAM: crypto: arm/curve25519 - Move '.fpu' after '.arch'
: Our continuous integration tests Android trees since they are one of the biggest downstream consumers of our work (go figure, Google started this…) and this upstream patch is needed to buildARCH=arm allmodconfig
. -
[PATCH] Revert "ASoC: q6dsp: q6afe: remove unneeded dead-store initialization"
: Two patches that fixed the same Clang static analyzer warning were merged, which actually ended up introducing use of an uninitialized variable, which Intel’s 0day build robot thankfully pointed out to us. -
Revert "UPSTREAM: usb: gadget: f_uac2: validate input parameters"
: A mismerge in the Android trees broke our continuous integration so I sent this in to get it working again. -
[PATCH] x86: Fix location of '-plugin-opt=' flags
: Someone reported a panic in the AMDGPU driver, which I helped track down to the fact that the stack alignment was not being passed along to the linker for LTO due to a Makefile variable clobber. This patch fixes it up and ensures we do not have something like this happen again. This will eventually be added to LLVM’s IR so that this flag is not necessary. -
[PATCH 0/3] hexagon: Fix build error with CONFIG_STACKDEPOT and select CONFIG_ARCH_WANT_LD_ORPHAN_WARN
: The Hexagon architecture is special because it is the only architecture in the kernel that cannot be built with GCC; it can only be built with LLVM. Qualcomm got it working upstream in v5.13-rc1 then within a couple of weeks, it was broken again because of some unnoticed bitrot. This patch series fixes it up and helps make sure it should not happen again. -
[PATCH] powerpc/barrier: Avoid collision with clang's __lwsync macro
: An upstream LLVM change broke all of our PowerPC builds back to 4.14 due to a builtin macro defintion coliding with an already existing defintion inarch/powerpc
. This patch fixes it up by undefining the macro because the kernel does not want the builtin version. -
[PATCH] MAINTAINERS: Add Clang CFI section
: This patch solidifies the path for CFI patches to go upstream.
Patch review and input
This month had quite a lot of review and patch testing, maybe more than the previous month. Code review is so critical for the success of these projects so it is important to do it quickly and well due to the velocity of both LLVM and Linux. There When possible, I link directly to my response but sometimes, the link is to the main post and my response can be seen inline.
-
[AArch64] Adds a pre-indexed paired Load/Store optimization for LDR-STR.
-
Re: [PATCH v3] arm64: vdso: remove commas between macro name and arguments
-
Re: [PATCH 4.19 ONLY v4] arm64: vdso: remove commas between macro name and arguments
-
Re: [PATCH kernel v2] powerpc/makefile: Do not redefine $(CPP) for preprocessor
-
Re: [PATCH kernel v3] powerpc/makefile: Do not redefine $(CPP) for preprocessor
-
Re: [PATCH] [v2] platform/surface: aggregator: avoid clang -Wconstant-conversion warning
-
Re: [PATCH] arm64: Define only {pud/pmd}_{set/clear}_huge when usefull
-
Re: [PATCH v2 3/4] memory: tegra124-emc: Fix compilation warnings on 64bit platforms
-
[RESEND PATCH 0/4] iio: Drop use of %hhx and %hx format strings
-
Re: [PATCH 00/13] Reorganize sysfs file creation for struct ib_devices
-
Re: [PATCH v3] kcov: add __no_sanitize_coverage to fix noinstr for all architectures
-
Re: [PATCH 1/6] pgo: modules Expose module sections for clang PGO instumentation.
-
Re: [PATCH 2/6] pgo: modules Add definitions in pgo/pgo.h for modules
-
Re: [PATCH 3/6] pgo: modules Add module profile data export machinery.
-
Re: [PATCH] pgo: rename the raw profile file to vmlinux.profraw
-
Re: [PATCH v9] pgo: add clang's Profile Guided Optimization infrastructure
Issue triage and reporting
As always, a little bit all over the place, LLVM and kernel issues, revisiting old problems, and triaging/reporting new ones :)
-
FAIL: Test report for kernel 5.12.0 (mainline.kernel.org-clang, 10a3efd0)
-
s390 all{mod,yes}config __ashlti3 and __lshrti3 after LLVM commit 1886aad9d03b
-
Re: [BUG mips llvm] MIPS: malformed R_MIPS_{HI16,LO16} with LLVM
-
Re: [PATCH v1 2/2] memory: tegra: Enable compile testing for all drivers
-
Re: arch/powerpc/kernel/optprobes.c:34:1: error: unused function 'is_kprobe_ppc_optinsn_slot'
-
Re: -Wconstant-conversion in drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
-
missing mflr/mtlr (link register save/restore) when using inline asm w/ "lr" clobber
-
Re: [PATCH v3] mm, slub: change run-time assertion in kmalloc_index() to compile-time
-
Re: [PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries
-
Stack alignment plugin option boot failure with CONFIG_CFI_CLANG
-
51d334a845a082338735b0fdfc620a4b15fa26fe breaks x86_64 ThinLTO + dynamic ftrace
-
Re: [PATCH v2] fb_defio: Remove custom address_space_operations
-
[InstCombine] Fix miscompile on GEP+load to icmp fold (PR45210)
Tooling improvements
Way more continuous integration work this time around, namely due to the additional testing with Android’s LLVM and regressions or changes upstream.
-
Enable LLVM_IAS=1 for Android arm32 allmodconfig with LLVM 13
-
Enable LLVM_IAS=1 for Android arm32 allmodconfig with LLVM 13
-
Enable LLVM_IAS=1 for 32-bit ARM on mainline and next with LLVM 13
-
generator.yml: Disable arm64 big endian build with AOSP LLVM
Special thanks to:
- Google and the Linux Foundation for sponsoring my work.