Re: selftests/filesystem: clang warning null passed to a callee that requires a non-null argument [-Wnonnull]

2025-06-11 Thread Nathan Chancellor
On Wed, Jun 11, 2025 at 07:47:39PM +0300, Dan Carpenter wrote: > This seems like a Clang bug, right? The test for _Nullable is reversed > or something? My copy of unistd.h has /* Execute program relative to a directory file descriptor. */ extern int execveat (int __fd, const char *__path, c

Re: [PATCH v4 6/7] dax/hmem: Save the DAX HMEM platform device pointer

2025-06-06 Thread Nathan Fontenot
can ever be registered. This ensures the > change is safe. > > > However, I agree that using a global pointer in a function that may be called > multiple times > does raise valid concerns. Note: The creation of the platform device is moved in patch 7/7. I think the placed it w

Re: [PATCH v4 1/7] cxl/region: Avoid null pointer dereference in is_cxl_region()

2025-06-04 Thread Nathan Fontenot
to handle possible NULL dev pointers when updating soft reserve resources, see cxl_region_softreserv_update() in patch 5/7. In the current form of the that routine it appears we shouldn't execute the while loop if dev is NULL so this could get from the patch set. -Nathan > >

Re: [PATCH 6.1 000/167] 6.1.136-rc1 review

2025-04-30 Thread Nathan Chancellor
warning for aggregate members, as that triggers often in the kernel: https://github.com/llvm/llvm-project/pull/137961 The only instance of -Wdefault-const-init-var-unsafe that I have found so far is in typecheck(), which should be easy enough to clean up. Cheers, Nathan diff --git a/include/linu

Re: [PATCH 0/2] kmod /usr support

2024-08-21 Thread Nathan Chancellor
ersation go anywhere? After the upgrade to kmod 33 in Arch Linux, which includes building with the configuration option '--with-module-directory' set to '/usr/lib/modules' [1], building a tarzst-pkg breaks for me, seemingly for the reason noted above. $ make -skj"$(nproc

Re: [PATCH 4/8] riscv: ftrace: align patchable functions to 4 Byte boundary

2024-06-17 Thread Nathan Chancellor
On Mon, Jun 17, 2024 at 10:38:55AM +0800, Andy Chiu wrote: > On Fri, Jun 14, 2024 at 3:09 AM Nathan Chancellor wrote: > > > > Hi Andy, > > > > On Thu, Jun 13, 2024 at 03:11:09PM +0800, Andy Chiu wrote: > > > We are changing ftrace code patchin

Re: [PATCHv8 bpf-next 3/9] uprobe: Add uretprobe syscall to speed up return probe

2024-06-14 Thread Nathan Chancellor
On Fri, Jun 14, 2024 at 09:26:59PM +0200, Jiri Olsa wrote: > On Fri, Jun 14, 2024 at 10:48:22AM -0700, Nathan Chancellor wrote: > > Hi Jiri, > > > > On Tue, Jun 11, 2024 at 01:21:52PM +0200, Jiri Olsa wrote: > > > Adding uretprobe syscall instead of

Re: [PATCHv8 bpf-next 3/9] uprobe: Add uretprobe syscall to speed up return probe

2024-06-14 Thread Nathan Chancellor
k *utask; > struct return_instance *ri, *next; > @@ -2187,8 +2197,8 @@ static void handle_swbp(struct pt_regs *regs) > int is_swbp; > > bp_vaddr = uprobe_get_swbp_addr(regs); > - if (bp_vaddr == get_trampoline_vaddr()) > - return handle_trampoline(regs); > + if (bp_vaddr == uprobe_get_trampoline_vaddr()) > + return uprobe_handle_trampoline(regs); > > uprobe = find_active_uprobe(bp_vaddr, &is_swbp); > if (!uprobe) { > -- > 2.45.1 > Cheers, Nathan

Re: [PATCH 3/8] riscv: ftrace: support fastcc in Clang for WITH_ARGS

2024-06-13 Thread Nathan Chancellor
event ftrace from clobbering them. > > - [1]: https://reviews.llvm.org/D68559 > Reported-by: Evgenii Shatokhin > Closes: > https://lore.kernel.org/linux-riscv/7e7c7914-445d-426d-89a0-59a9199c4...@yadro.com/ > Signed-off-by: Andy Chiu Acked-by: Nathan Chancellor > --- >

Re: [PATCH 4/8] riscv: ftrace: align patchable functions to 4 Byte boundary

2024-06-13 Thread Nathan Chancellor
Hi Andy, On Thu, Jun 13, 2024 at 03:11:09PM +0800, Andy Chiu wrote: > We are changing ftrace code patching in order to remove dependency from > stop_machine() and enable kernel preemption. This requires us to align > functions entry at a 4-B align address. > > However, -falign-functions on older

Re: [PATCH] drivers: remoteproc: xlnx: Add Versal and Versal-NET support

2024-04-23 Thread Nathan Chancellor
_is_compatible(dev, "xlnx,zynqmp-r5fss")) | ^~~ 915 | ret = zynqmp_r5_get_tcm_node(cluster); drivers/remoteproc/xlnx_r5_remoteproc.c:907:9: note: initialize the variable 'ret' to silence this warning 907

Re: [PATCH 0/2] tracing: Fully silence instance of -Wstring-compare

2024-03-19 Thread Nathan Chancellor
On Tue, Mar 19, 2024 at 06:15:09PM -0400, Steven Rostedt wrote: > On Tue, 19 Mar 2024 09:07:51 -0700 > Nathan Chancellor wrote: > > > Hi all, > > > > This series fully resolves the new instance of -Wstring-compare from > > within the __assign_str() macro.

[PATCH 2/2] tracing: Ignore -Wstring-compare with diagnostic macros

2024-03-19 Thread Nathan Chancellor
ARN_ON() check") Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/all/CA+G9fYs=otkazs6g1p1ewadfr0qoe6lgovsohqkxmfxoteo...@mail.gmail.com/ Signed-off-by: Nathan Chancellor --- include/trace/stages/stage6_event_callback.h | 5 + 1 file changed, 5 insertions(

[PATCH 0/2] tracing: Fully silence instance of -Wstring-compare

2024-03-19 Thread Nathan Chancellor
to make the merge window so that this warning does not proliferate into other trees that base on -rc1. --- Nathan Chancellor (2): compiler_types: Ensure __diag_clang() is always available tracing: Ignore -Wstring-compare with diagnostic macros include/linux/compiler_types.h

[PATCH 1/2] compiler_types: Ensure __diag_clang() is always available

2024-03-19 Thread Nathan Chancellor
oth compiler-clang.h and compiler-gcc.h. Add an empty stub for __diag_clang() in compiler_types.h, so that it is always defined and just becomes a no-op when using GCC. Fixes: f014a00bbeb0 ("compiler-clang.h: Add __diag infrastructure for clang") Signed-off-by: Nathan Chancellor --- incl

Re: net/sunrpc/sched.c: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead)

2024-03-18 Thread Nathan Chancellor
Hi Naresh, On Mon, Mar 18, 2024 at 02:55:54PM +0530, Naresh Kamboju wrote: > The following build warnings / errors noticed on x86 kselftests build with > clang nightly / clang-17 on Linux next tag next-20240318. > > This build config is generated from kselftest merge configs [1]. > > Reported-

Re: [PATCH] tracing: Use strcmp() in __assign_str() WARN_ON() check

2024-03-13 Thread Nathan Chancellor
On Tue, Mar 12, 2024 at 11:30:02AM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The WARN_ON() check in __assign_str() to catch where the source variable > to the macro doesn't match the source variable to __string() gives an > error in clang: > > >> include/trace/events/sun

Re: [PATCH 1/6] tools/rtla: Fix Makefile compiler options for clang

2024-02-06 Thread Nathan Chancellor
On Tue, Feb 06, 2024 at 12:05:29PM +0100, Daniel Bristot de Oliveira wrote: > The following errors are showing up when compiling rtla with clang: > > $ make HOSTCC=clang CC=clang LLVM_IAS=1 > [...] > > clang -O -g -DVERSION=\"6.8.0-rc1\" -flto=auto -ffat-lto-objects > -fexceptions -fsta

[PATCH] eventfs: Use ERR_CAST() in eventfs_create_events_dir()

2023-10-18 Thread Nathan Chancellor
Fixes: 5790b1fb3d67 ("eventfs: Remove eventfs_file and just use eventfs_inode") Signed-off-by: Nathan Chancellor --- fs/tracefs/event_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c index 1ccd100bc565..9f19b6

Re: [PATCH 5/5] kbuild: unify no-compiler-targets and no-sync-config-targets

2023-10-09 Thread Nathan Chancellor
On Mon, Oct 09, 2023 at 09:42:10PM +0900, Masahiro Yamada wrote: > Now that vdso_install does not depend on any in-tree build artifact, > it no longer invokes a compiler, making no-compiler-targets the same > as no-sync-config-targets. > > Signed-off-by: Masahiro Yamada > --- > > Makefile | 13

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-06 Thread Nathan Chancellor
E) part. > > Signed-off-by: Michal Suchanek This appears to work for me. Reviewed-by: Nathan Chancellor > --- > scripts/package/kernel.spec | 8 > scripts/package/mkspec | 1 + > 2 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/scripts/p

Re: [patch 11/12] gcov: clang: fix clang-11+ build

2021-04-19 Thread Nathan Chancellor
be reverted in mainline then added as a fix patch for the patch that is still in -mm: https://www.ozlabs.org/~akpm/mmotm/broken-out/gcov-use-kvmalloc.patch Cheers, Nathan

[tip: perf/core] x86/events/amd/iommu: Fix sysfs type mismatch

2021-04-16 Thread tip-bot2 for Nathan Chancellor
The following commit has been merged into the perf/core branch of tip: Commit-ID: de5bc7b425d4c27ae5faa00ea7eb6b9780b9a355 Gitweb: https://git.kernel.org/tip/de5bc7b425d4c27ae5faa00ea7eb6b9780b9a355 Author:Nathan Chancellor AuthorDate:Wed, 14 Apr 2021 17:11:11 -07:00

[tip: perf/core] perf/amd/uncore: Fix sysfs type mismatch

2021-04-16 Thread tip-bot2 for Nathan Chancellor
The following commit has been merged into the perf/core branch of tip: Commit-ID: 5deac80d4571dffb51f452f0027979d72259a1b9 Gitweb: https://git.kernel.org/tip/5deac80d4571dffb51f452f0027979d72259a1b9 Author:Nathan Chancellor AuthorDate:Wed, 14 Apr 2021 17:11:12 -07:00

[tip: perf/core] x86/events/amd/iommu: Fix sysfs type mismatch

2021-04-16 Thread tip-bot2 for Nathan Chancellor
The following commit has been merged into the perf/core branch of tip: Commit-ID: bccae9d7b013bd708ece414f74defaee56790e1d Gitweb: https://git.kernel.org/tip/bccae9d7b013bd708ece414f74defaee56790e1d Author:Nathan Chancellor AuthorDate:Wed, 14 Apr 2021 17:11:11 -07:00

[tip: perf/core] perf/amd/uncore: Fix sysfs type mismatch

2021-04-16 Thread tip-bot2 for Nathan Chancellor
The following commit has been merged into the perf/core branch of tip: Commit-ID: b04c0cddff6d1d6656c7f7c08c0b8f07eb287564 Gitweb: https://git.kernel.org/tip/b04c0cddff6d1d6656c7f7c08c0b8f07eb287564 Author:Nathan Chancellor AuthorDate:Wed, 14 Apr 2021 17:11:12 -07:00

[PATCH] drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update

2021-04-15 Thread Nathan Chancellor
and will not overflow. Fixes: 7b6f846785f4 ("drm/tegra: Support sector layout on Tegra194") Link: https://github.com/ClangBuiltLinux/linux/issues/1351 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/tegra/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

Re: [PATCH 1/2] x86/events/amd/iommu: Fix sysfs type mismatch

2021-04-15 Thread Nathan Chancellor
On Thu, Apr 15, 2021 at 08:53:35AM +0100, Christoph Hellwig wrote: > On Wed, Apr 14, 2021 at 05:11:11PM -0700, Nathan Chancellor wrote: > > dev_attr_show() calls _iommu_event_show() via an indirect call but > > _iommu_event_show()'s type does not currently match the type of t

Re: [PATCH 2/3] habanalabs: support legacy and new pll indexes

2021-04-15 Thread Nathan Chancellor
iff --git a/drivers/misc/habanalabs/common/habanalabs.h b/drivers/misc/habanalabs/common/habanalabs.h index 44e89da30b4a..fd550a0a4bff 100644 --- a/drivers/misc/habanalabs/common/habanalabs.h +++ b/drivers/misc/habanalabs/common/habanalabs.h @@ -2071,7 +2071,7 @@ struct hl_device { struct

Re: [PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif}

2021-04-15 Thread Nathan Chancellor
On Thu, Apr 15, 2021 at 10:17:43AM +0100, Catalin Marinas wrote: > Hi Nathan, > > On Tue, Apr 13, 2021 at 05:08:04PM -0700, Nathan Chancellor wrote: > > After commit 2decad92f473 ("arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is > > set atomically"), LLVM's integra

Re: [PATCH v2] arm64: vdso32: drop -no-integrated-as flag

2021-04-14 Thread Nathan Chancellor
> remove those too. > > To test building: > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ > CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \ > defconfig arch/arm64/kernel/vdso32/ > > Suggested-by: Nathan Chancellor > Signed-off-by: Nick Desaulni

[PATCH 2/2] perf/amd/uncore: Fix sysfs type mismatch

2021-04-14 Thread Nathan Chancellor
06f2c24584f3 ("perf/amd/uncore: Prepare to scale for more attributes that vary per family") Signed-off-by: Nathan Chancellor --- arch/x86/events/amd/uncore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/u

[PATCH 1/2] x86/events/amd/iommu: Fix sysfs type mismatch

2021-04-14 Thread Nathan Chancellor
/linux/issues/1350 Fixes: 7be6296fdd75 ("perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation") Signed-off-by: Nathan Chancellor --- arch/x86/events/amd/iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/events/amd/i

Re: [PATCH 03/13] Makefile: Generate CLANG_FLAGS even in GCC builds

2021-04-14 Thread Nathan Chancellor
Hi Miguel, On Wed, Apr 14, 2021 at 08:45:54PM +0200, oj...@kernel.org wrote: > From: Miguel Ojeda > > To support Rust under GCC-built kernels, we need to save the flags that > would have been passed if the kernel was being compiled with Clang. > > The reason is that bindgen -- the tool we use t

[PATCH] arm64: alternatives: Move length validation in alternative_{insn,endif}

2021-04-13 Thread Nathan Chancellor
rnative_insn has not shown any issue yet but it appears that it could have the same issue in the future so just preemptively change it. Cc: sta...@vger.kernel.org Fixes: f7b93d42945c ("arm64/alternatives: use subsections for replacement sequences") Link: https://github.com/ClangBuiltLinux

Re: [PATCH] arm64: vdso32: drop -no-integrated-as flag

2021-04-13 Thread Nathan Chancellor
On Tue, Apr 13, 2021 at 04:06:06PM -0700, Nick Desaulniers wrote: > Clang can assemble these files just fine; this is a relic from the top > level Makefile conditionally adding this. > > To test building: > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ > CROSS_COMPILE_COMPAT=arm-linux-gnueabi-

Re: arch/arm64/kvm/perf.c:58:36: error: implicit declaration of function 'perf_num_counters'

2021-04-13 Thread Nathan Chancellor
est solution would be for providing a static inline version of perf_num_counters() would be, as only arm64 actually uses it (sh and s390 define it but it does not appear to be used) but it is only available through CONFIG_ARM_PMU instead of just CONFIG_PERF_EVENTS like the other two architectures mentioned above. Cheers, Nathan

[PATCH] crypto: arm/curve25519 - Move '.fpu' after '.arch'

2021-04-09 Thread Nathan Chancellor
clang with and without Debian's patch and GCC. Cc: sta...@vger.kernel.org Fixes: d8f1308a025f ("crypto: arm/curve25519 - wire up NEON implementation") Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/118 Reported-by: Arnd Bergmann Suggested-by: Arnd Bergmann

[PATCH] MIPS: generic: Update node names to avoid unit addresses

2021-04-09 Thread Nathan Chancellor
.@vger.kernel.org Link: https://source.denx.de/u-boot/u-boot/-/commit/79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4 Link: https://source.denx.de/u-boot/u-boot/-/commit/3f04db891a353f4b127ed57279279f851c6b4917 Suggested-by: Simon Glass Signed-off-by: Nathan Chancellor --- arch/mips/generic/board-boston

[RFC v3] KVM: x86: Support KVM VMs sharing SEV context

2021-04-08 Thread Nathan Tempelman
as it does not handle handing off attested VMSAs to the mirror. For additional context, we need a Migration Helper because SEV PSP migration is far too slow for our live migration on its own. Using an in-guest migrator lets us speed this up significantly. Signed-off-by: Nathan Temp

Re: [PATCH] KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command

2021-04-08 Thread Nathan Tempelman
t; --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -1671,6 +1671,8 @@ enum sev_cmd_id { > KVM_SEV_CERT_EXPORT, > /* Attestation report */ > KVM_SEV_GET_ATTESTATION_REPORT, > + /* Guest Migration Extension */ > + KVM_SEV_SEND_CANCEL, > > KVM_SEV_NR_MAX, > }; > -- > 2.31.0.208.g409f899ff0-goog > Reviewed-by: Nathan Tempelman

[PATCH] block: Disable -Walign-mismatch for blk-mq.c

2021-04-08 Thread Nathan Chancellor
0310182307.zzcbi5w5jrmveld4@archlinux-ax161/ Link: https://lore.kernel.org/r/20210330230249.709221-1-jian...@google.com/ Signed-off-by: Nathan Chancellor --- block/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/block/Makefile b/block/Makefile index 8d841f5f986f..d69ac0bd8e61 100644 --- a

Re: [PATCH] blk-mq: fix alignment mismatch.

2021-04-08 Thread Nathan Chancellor
Hi Jian, On Thu, Apr 08, 2021 at 10:57:54AM -0700, Jian Cai wrote: > So this issue is blocking the LLVM upgrading on ChromeOS. Nathan, do > you mind sending out the smaller patch like Nick suggested just to see > what feedback we could get? I could send it for you if you are busy, >

Re: [PATCH v9] pgo: add clang's Profile Guided Optimization infrastructure

2021-04-07 Thread Nathan Chancellor
cs/UsersManual.html#profile-guided-optimization > > Signed-off-by: Sami Tolvanen > Co-developed-by: Bill Wendling > Signed-off-by: Bill Wendling > Tested-by: Nick Desaulniers > Reviewed-by: Nick Desaulniers > Reviewed-by: Fangrui Song Few small nits below, not sure they wa

[PATCH] ACPI / CPPC: Replace cppc_attr with kobj_attribute

2021-04-07 Thread Nathan Chancellor
158c998ea44b ("ACPI / CPPC: add sysfs support to compute delivered performance") Link: https://github.com/ClangBuiltLinux/linux/issues/1343 Signed-off-by: Nathan Chancellor --- drivers/acpi/cppc_acpi.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dr

Re: [PATCH 2/2] gcov: re-drop support for clang-10

2021-04-07 Thread Nathan Chancellor
d in GCOV support. > > Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor > --- > kernel/gcov/clang.c | 40 > 1 file changed, 40 deletions(-) > > diff --git a/kernel/gcov/clang.c b/kernel/gcov/clang.c > index 1747204541bf

Re: [PATCH 1/2] gcov: re-fix clang-11+ support

2021-04-07 Thread Nathan Chancellor
r, in clang-11, the additional checksum is no longer optional. > > Link: https://reviews.llvm.org/rG25544ce2df0daa4304c07e64b9c8b0f7df60c11d > Cc: sta...@vger.kernel.org #5.4+ > Reported-by: Prasad Sodagudi > Tested-by: Prasad Sodagudi > Signed-off-by: Nick Desaulniers Review

Re: [PATCH v4] pseries: prevent free CPU ids to be reused on another node

2021-04-07 Thread Nathan Lynch
variables (removing 'i') > - Add comment about the cpu_add_remove_lock protecting the added CPU mask. > Changes since V1 (no functional changes): > - update the test's output in the commit's description > - node_recorded_ids_map should be static > > Signed-off-by: Laurent Dufour Thanks Laurent. Reviewed-by: Nathan Lynch

Re: [PATCH v3] pseries: prevent free CPU ids to be reused on another node

2021-04-07 Thread Nathan Lynch
Laurent Dufour writes: > Changes since V2, addressing Nathan's comments: > - Remove the retry feature > - Reduce the number of local variables (removing 'i') I was more interested in not having two variables for NUMA nodes in the function named 'node' and 'nid', hoping at least one of them coul

Re: CFI violation in drivers/infiniband/core/sysfs.c

2021-04-02 Thread Nathan Chancellor
On Fri, Apr 02, 2021 at 04:03:30PM -0700, Kees Cook wrote: > On Fri, Apr 02, 2021 at 12:52:41PM -0700, Nathan Chancellor wrote: > > Hi all, > > > > I am testing the Clang Control Flow Integrity series that is being > > worked on right now [1] and I encounter a

Re: [PATCH 3/3] kbuild: fix false-positive modpost warning when all symbols are trimmed

2021-04-02 Thread Nathan Chancellor
On Fri, Mar 26, 2021 at 03:54:11AM +0900, Masahiro Yamada wrote: > Nathan reports that the mips defconfig emits the following warning: > > WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol > check will be entirely skipped. > > This false-positive

Re: [PATCH v5 00/18] Add support for Clang CFI

2021-04-02 Thread Nathan Chancellor
9 +- > 75 files changed, 759 insertions(+), 113 deletions(-) > create mode 100644 include/linux/cfi.h > create mode 100644 kernel/cfi.c > > > base-commit: 6905b1dc3c32a094f0da61bd656a740f0a97d592 > -- > 2.31.0.208.g409f899ff0-goog > Hi Sami, I booted this series on Equinix's c1.large.arm (2x Cavium ThunderX CN8890) and c2.large.arm (1x Ampere eMAG 8180) servers [1] and my Raspberry Pi 4B. I ran them through LTP's read_all test case on both /proc and /sys and a few compile workloads, only uncovering one issue [2]. Consider this series: Tested-by: Nathan Chancellor [1]: https://metal.equinix.com/developers/docs/servers/ [2]: https://lore.kernel.org/r/20210402195241.gahc5w25gezluw7p@archlinux-ax161/ Cheers, Nathan

CFI violation in drivers/infiniband/core/sysfs.c

2021-04-02 Thread Nathan Chancellor
g working config), and let it rip: $ scripts/config \ -d KASAN \ -d GCOV_KERNEL \ -d LTO_NONE \ -e LTO_CLANG_THIN \ -e CFI_CLANG \ -e CFI_PERMISSIVE $ make -skj"$(nproc)" LLVM=1 LLVM_IAS=1 olddefconfig all [1]: https://lore.kernel.org/r/20210401233216.2540591-1-samitolva...@google.com/ [2]: https://github.com/samitolvanen/linux/commits/clang-cfi [3]: https://github.com/ClangBuiltLinux/tc-build Cheers, Nathan

Re: [PATCH] qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute

2021-04-02 Thread Nathan Chancellor
On Fri, Apr 02, 2021 at 11:25:42AM -0700, Kees Cook wrote: > On Fri, Apr 02, 2021 at 08:42:07AM +0200, Sedat Dilek wrote: > > On Thu, Feb 25, 2021 at 10:25 PM Kees Cook wrote: > > > > > > On Thu, 11 Feb 2021 12:42:58 -0700, Nathan Chancellor wrote: > > >

Re: [PATCH v2] pseries: prevent free CPU ids to be reused on another node

2021-04-02 Thread Nathan Lynch
Laurent Dufour writes: > Le 02/04/2021 à 15:34, Nathan Lynch a écrit : >> Laurent Dufour writes: >>> When a CPU is hot added, the CPU ids are taken from the available mask from >>> the lower possible set. If that set of values was previously used for CPU >>>

Re: [PATCH v2] pseries: prevent free CPU ids to be reused on another node

2021-04-02 Thread Nathan Lynch
Hi Laurent, Laurent Dufour writes: > When a CPU is hot added, the CPU ids are taken from the available mask from > the lower possible set. If that set of values was previously used for CPU > attached to a different node, this seems to application like if these CPUs > have migrated from a node to

Re: [PATCH] ARM: OMAP: Fix use of possibly uninitialized irq variable

2021-04-01 Thread Nathan Chancellor
ilence this warning > int irq; >^ > = 0 > 1 warning generated. > > The patch provides a default value to the `irq` variable > along with a validity check. > Might be worth a fixes tag: Fixes: b75ca5217743 ("ARM: OMAP: r

Re: [PATCH] usb: isp1301-omap: Add missing gpiod_add_lookup_table function

2021-04-01 Thread Nathan Chancellor
f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors") > Link: https://github.com/ClangBuiltLinux/linux/issues/1325 Thanks for the patch! Reviewed-by: Nathan Chancellor > --- > arch/arm/mach-omap1/board-h2.c | 4 +++- > 1 file changed, 3 insertions(+), 1 delet

Re: [PATCH] ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power

2021-04-01 Thread Nathan Chancellor
ej Falkowski > Fixes: ce548396a433 ("media: mach-omap1: board-ams-delta.c: remove soc_camera > dependencies") > Link: https://github.com/ClangBuiltLinux/linux/issues/1326 Thanks for the patch! Reviewed-by: Nathan Chancellor > --- > arch/arm/mach-omap1/board-ams-delta.

Re: [PATCH] blk-mq: fix alignment mismatch.

2021-03-31 Thread Nathan Chancellor
Hi Jian, On Wed, Mar 31, 2021 at 02:27:03PM -0700, Jian Cai wrote: > Hi Nathan, > > I just realized you already proposed solutions for skipping the check > in > https://lore.kernel.org/linux-block/20210310225240.4epj2mdmzt4vurr3@archlinux-ax161/#t. > Do you have any plan

Re: [PATCH] blk-mq: fix alignment mismatch.

2021-03-30 Thread Nathan Chancellor
2307.zzcbi5w5jrmveld4@archlinux-ax161/ This is obviously a correct fix, I am not just sure what the impact to 'struct request' will be. Cheers, Nathan > --- > include/linux/blkdev.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/includ

Re: BTRFS Balance Hard System Crash (Blinking LEDs)

2021-03-27 Thread Nathan Royce
as being LUKS even though badblocks was run non-destructive. On Fri, Mar 26, 2021 at 11:51 AM Nathan Royce wrote: > > Oh man, I'm hoping things aren't starting to fall apart here. > I was doing my normal routine (tv, browsing, ... (no filesystem > manipulations)) and out of th

Re: F2FS Segmentation Fault

2021-03-27 Thread Nathan Royce
pply fan. The whole debacle (including btrfs, keyboard leds blinking) may very well have been from the sd-card not being seated well. On Sat, Mar 27, 2021 at 7:02 AM Nathan Royce wrote: > > An update, not quite 1 year later. I encountered another segfault issue. > > It began with my email r

Re: F2FS Segmentation Fault

2021-03-27 Thread Nathan Royce
ed corruption. Info: Force to fix corruption Info: Segments per section = 1 Info: Sections per zone = 1 Info: sector size = 512 Info: total sectors = 124168159 (60628 MB) Can't find a valid F2FS superblock at 0x0 Mismatch segment0(3096048428) cp_blkaddr(24874649)

Re: [PATCH] riscv: Use $(LD) instead of $(CC) to link vDSO

2021-03-26 Thread Nathan Chancellor
On Sat, Mar 27, 2021 at 12:05:34AM +0800, kernel test robot wrote: > Hi Nathan, > > I love your patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v5.12-rc4 next-20210326] > [If your patch is applied to the wrong git t

Re: BTRFS Balance Hard System Crash (Blinking LEDs)

2021-03-26 Thread Nathan Royce
n) and everything seems fine (so far) as I write this and have the recorded DVR playing (kodi). I don't know what those "kernel: Code:" is supposed to be/mean to me. On Fri, Mar 26, 2021 at 8:29 AM Nathan Royce wrote: > > * > ...I "think" this is where the &quo

BTRFS Balance Hard System Crash (Blinking LEDs)

2021-03-26 Thread Nathan Royce
* ...I "think" this is where the "emergency" drop out of boot occurred, and I just did a "systemctl reboot" which had the next boot succeed. Nope, I'm wrong. For whatever reason, this appears to be the boot that ended up working (searching for the first "microcode" reference indicating the star

[tip: x86/build] efi/libstub: Add $(CLANG_FLAGS) to x86 flags

2021-03-26 Thread tip-bot2 for Nathan Chancellor
The following commit has been merged into the x86/build branch of tip: Commit-ID: 58d746c119dfa28e72fc35aacaf3d2a3ac625cd0 Gitweb: https://git.kernel.org/tip/58d746c119dfa28e72fc35aacaf3d2a3ac625cd0 Author:Nathan Chancellor AuthorDate:Thu, 25 Mar 2021 17:04:35 -07:00

[tip: x86/build] x86/boot: Add $(CLANG_FLAGS) to compressed KBUILD_CFLAGS

2021-03-26 Thread tip-bot2 for Nathan Chancellor
The following commit has been merged into the x86/build branch of tip: Commit-ID: d5cbd80e302dfea59726c44c56ab7957f822409f Gitweb: https://git.kernel.org/tip/d5cbd80e302dfea59726c44c56ab7957f822409f Author:Nathan Chancellor AuthorDate:Thu, 25 Mar 2021 17:04:34 -07:00

Re: [PATCH 0/3] Fix CONFIG_FUNCTION_TRACER with clang

2021-03-26 Thread Nathan Chancellor
On Fri, Mar 26, 2021 at 09:37:55AM +0100, Sedat Dilek wrote: > On Thu, Mar 25, 2021 at 11:38 PM Nathan Chancellor wrote: > > > > Hi all, > > > > This series fixes function tracing with clang. > > > > Patch 1 adjusts the mcount regex in scripts/recordmcou

[PATCH 3/3] efi/libstub: Add $(CLANG_FLAGS) to x86 flags

2021-03-25 Thread Nathan Chancellor
to the cflags for x86 so that cross compiling works as expected. Signed-off-by: Nathan Chancellor --- drivers/firmware/efi/libstub/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index c23

[PATCH 2/3] x86/boot: Add $(CLANG_FLAGS) to compressed KBUILD_CFLAGS

2021-03-25 Thread Nathan Chancellor
CFLAGS so that cross compiling works as expected. Signed-off-by: Nathan Chancellor --- arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index e0bc3988c3fa..6e5522aebbbd 100644 --- a/arch/x86/

[PATCH 0/3] Fix cross compiling x86 with clang

2021-03-25 Thread Nathan Chancellor
on an ARM based server with both defconfig and allmodconfig, where the build now passes. Please let me know if there are any problems. Cheers, Nathan John Millikin (1): x86: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) Nathan Chancellor (2): x86/boot: Add $(CLANG_FLAGS) to compressed

[PATCH 1/3] x86: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS)

2021-03-25 Thread Nathan Chancellor
is set, because the LLVM assembler can't yet   parse certain GNU extensions. Signed-off-by: John Millikin Tested-by: Sedat Dilek Signed-off-by: Nathan Chancellor --- arch/x86/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 2d6d5a28c3bf.

[PATCH 3/3] riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available

2021-03-25 Thread Nathan Chancellor
Fixes: afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") Link: https://github.com/ClangBuiltLinux/linux/issues/1268 Reported-by: kernel test robot Signed-off-by: Nathan Chancellor --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 2/3] riscv: Workaround mcount name prior to clang-13

2021-03-25 Thread Nathan Chancellor
.llvm.org/D98881 but the minimum supported clang version is 10.0.1. To avoid build errors and to gain a working function tracer, adjust the name of the mcount symbol for older versions of clang in mount.S and recordmcount.pl. Cc: sta...@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux

[PATCH 1/3] scripts/recordmcount.pl: Fix RISC-V regex for clang

2021-03-25 Thread Nathan Chancellor
properly generated and function tracing still works. Cc: sta...@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1331 Signed-off-by: Nathan Chancellor --- scripts/recordmcount.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/recordmcount.pl b/scripts

[PATCH 0/3] Fix CONFIG_FUNCTION_TRACER with clang

2021-03-25 Thread Nathan Chancellor
orted (patches 1 and 2 are already marked for stable). This series has been build tested with gcc-8 through gcc-10 and clang-11 through clang-13 with defconfig and nommu_virt_defconfig plus CONFIG_FTRACE=y and CONFIG_FUNCTION_TRACER=y then boot tested under QEMU. Cheers, Nathan Nathan Chanc

[PATCH] riscv: Use $(LD) instead of $(CC) to link vDSO

2021-03-25 Thread Nathan Chancellor
' to GCC's invocation. Additionally, since this area is being modified, use the $(OBJCOPY) variable instead of an open coded $(CROSS_COMPILE)objcopy so that the user's choice of objcopy binary is respected. Link: https://github.com/ClangBuiltLinux/linux/issues/803 Link: https://

Re: [PATCH] arm64: move --fix-cortex-a53-843419 linker test to Kconfig

2021-03-24 Thread Nathan Chancellor
tree queued up a patch to avoid needless > compiler/linker flag evaluation. I beleive it is a good improvement > itself, but causing a false-positive warning for arm64 installation > in linux-next. (Thanks to Nathan for the report) > > Kconfig can test the linker capability just

Re: [PATCH v5] x86/Hyper-V: Support for free page reporting

2021-03-23 Thread Nathan Chancellor
. This patch adds the support to hook into the free > page reporting infrastructure and leverage the Hyper-V cold memory > discard hint hypercall to report/free these pages back to the host. > > Signed-off-by: Sunil Muthuswamy > Tested-by: Matheus Castello Tested-by: Nathan

Re: [PATCH] Makefile: fix GDB warning with CONFIG_RELR

2021-03-23 Thread Nathan Chancellor
;t care about these numbers; it determines the > location of the RELR section using symbols defined by a linker script. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1057 > Suggested-by: Peter Collingbourne > Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor &

Re: [PATCH] pinctrl: qcom: fix unintentional string concatenation

2021-03-23 Thread Nathan Chancellor
o22", >^ > Add the missing comma that must have accidentally been removed. > > Fixes: ac43c44a7a37 ("pinctrl: qcom: Add SDX55 pincontrol driver") > Signed-off-by: Arnd Bergmann Reviewed-by: Na

Re: [PATCH] clang-format: Update ColumnLimit

2021-03-19 Thread Nathan Chancellor
ions have changed since but this has come up before: https://lore.kernel.org/r/20200610125147.2782142-1-christian.brau...@ubuntu.com/ Cheers, Nathan

Re: Clang: powerpc: kvm/book3s_hv_nested.c:264:6: error: stack frame size of 2480 bytes in function 'kvmhv_enter_nested_guest'

2021-03-19 Thread Nathan Chancellor
jobs/1110841371#L59 > This is a deficiency in clang that has been fixed in clang-12: https://github.com/llvm/llvm-project/commit/0a23fbd28c7509f2f980946091e6055bf27164d2 but tuxmake can resolve it by using a more appropriate CROSS_COMPILE variable for powerpc64 big-endian (powerpc64-linux-gnu-): https://gitlab.com/Linaro/tuxmake/-/issues/108 Cheers, Nathan

Re: [PATCH 4/4] kbuild: include Makefile.compiler only when compiler is required

2021-03-18 Thread Nathan Chancellor
_install' or 'dtbs_install' because ld-option evaluates to nothing, which triggers the warning in arch/arm64/Makefile: $ make -skj"$(nproc)" \ ARCH=arm64 \ CROSS_COMPILE=aarch64-linux- \ INSTALL_DTBS_PATH=rootfs \ INSTALL_MOD_PATH=rootfs \ O=build/arm64 \ distclean defconfig all

[RFC v2] KVM: x86: Support KVM VMs sharing SEV context

2021-03-15 Thread Nathan Tempelman
as it does not handle handing off attested VMSAs to the mirror. For additional context, we need a Migration Helper because SEV PSP migration is far too slow for our live migration on its own. Using an in-guest migrator lets us speed this up significantly. Signed-off-by: Nathan Temp

Re: [PATCH v2 2/2] gcov: clang: drop support for clang-10 and older

2021-03-15 Thread Nathan Chancellor
e > interested in GCOV support. > > Link: https://reviews.llvm.org/rGcdd683b516d147925212724b09ec6fb792a40041 > Link: https://reviews.llvm.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44 > Suggested-by: Nathan Chancellor > Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Ch

Re: [PATCH v2 1/2] gcov: fix clang-11+ support

2021-03-15 Thread Nathan Chancellor
38b6500ecad9e4f936ebadf3411d0f44 > Cc: sta...@vger.kernel.org # 5.4 > Reported-by: Prasad Sodagudi > Suggested-by: Nathan Chancellor > Reviewed-by: Fangrui Song > Signed-off-by: Nick Desaulniers > Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor > --- > C

Re: [PATCH v2 2/3] kbuild: check the minimum assembler version in Kconfig

2021-03-15 Thread Nathan Chancellor
a,' > > For the last case, checking the error message is fragile. If the > proposal for -Wa,--version support [1] is accepted, this may not be > even an error in the future. > > One easy way is to check if -integrated-as is present in the passed > arguments. We did not

Re: [PATCH] staging: andriod: ashmem: Declared file operation with const keyword

2021-03-13 Thread Nathan Chancellor
8.2670-1-amritkher...@gmail.com/ https://lore.kernel.org/r/20210306063817.674041-1-nabil.ibn.mah...@gmail.com/ I once considered adding a comment above it saying that it should not be marked const but it is a good benchmark for seeing if people compile their patches before sending them out. Cheers, Nathan

Re: [RFC] KVM: x86: Support KVM VMs sharing SEV context

2021-03-12 Thread Nathan Tempelman
On Wed, Feb 24, 2021 at 9:37 AM Sean Christopherson wrote: > > On Wed, Feb 24, 2021, Nathan Tempelman wrote: > > static bool __sev_recycle_asids(int min_asid, int max_asid) > > { > > @@ -1124,6 +1129,10 @@ int svm_mem_enc_op(struct kvm *kvm, void __user > > *argp

Re: [PATCH] gcov: fix clang-11+ support

2021-03-12 Thread Nathan Chancellor
On Fri, Mar 12, 2021 at 01:57:47PM -0800, 'Nick Desaulniers' via Clang Built Linux wrote: > On Fri, Mar 12, 2021 at 12:51 PM Nathan Chancellor wrote: > > > > On Fri, Mar 12, 2021 at 12:14:42PM -0800, Nick Desaulniers wrote: > > > On Fri, Mar 12, 2021 at 11:58

Re: [PATCH] gcov: fix clang-11+ support

2021-03-12 Thread Nathan Chancellor
On Fri, Mar 12, 2021 at 12:14:42PM -0800, Nick Desaulniers wrote: > On Fri, Mar 12, 2021 at 11:58 AM Nathan Chancellor wrote: > > > > On Fri, Mar 12, 2021 at 11:21:39AM -0800, Nick Desaulniers wrote: > > > LLVM changed the expected function signatures for llvm_gcd

Re: [PATCH] gcov: fix clang-11+ support

2021-03-12 Thread Nathan Chancellor
ck Desaulniers I can reproduce the panic (as a boot hang) in QEMU before this patch and it is resolved after it so: Tested-by: Nathan Chancellor However, the duplication hurts :( would it potentially be better to just do the full update to clang-11+ and require it for CONFIG_GCOV_KERNEL?

Re: [PATCH] kbuild: fix ld-version.sh to not be affected by locale

2021-03-12 Thread Nathan Chancellor
if LC_ALL is set on the user's environment. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=212105 > Reported-by: Marco Scardovi > Signed-off-by: Masahiro Yamada LGTM, this is Debian's recommendation as well: https://wiki.debian.org/Locale Reviewed-by: Nathan Chancellor >

[PATCH] ARM: Make UNWINDER_ARM depend on ld.bfd or ld.lld 11.0.0+

2021-03-10 Thread Nathan Chancellor
Suggested-by: Nick Desaulniers Signed-off-by: Nathan Chancellor --- arch/arm/Kconfig.debug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 9e0b5e7f12af..64c1f8a46ab5 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug

Re: -Walign-mismatch in block/blk-mq.c

2021-03-10 Thread Nathan Chancellor
On Wed, Mar 10, 2021 at 02:03:56PM -0700, Jens Axboe wrote: > On 3/10/21 1:52 PM, Nathan Chancellor wrote: > > On Wed, Mar 10, 2021 at 01:40:25PM -0700, Jens Axboe wrote: > >> On 3/10/21 1:33 PM, Nathan Chancellor wrote: > >>> On Wed, Mar 10, 2021 at 01:21:52PM -0700,

Re: -Walign-mismatch in block/blk-mq.c

2021-03-10 Thread Nathan Chancellor
On Wed, Mar 10, 2021 at 01:40:25PM -0700, Jens Axboe wrote: > On 3/10/21 1:33 PM, Nathan Chancellor wrote: > > On Wed, Mar 10, 2021 at 01:21:52PM -0700, Jens Axboe wrote: > >> On 3/10/21 11:23 AM, Nathan Chancellor wrote: > >>> Hi Jens, > >>> >

Re: -Walign-mismatch in block/blk-mq.c

2021-03-10 Thread Nathan Chancellor
On Wed, Mar 10, 2021 at 01:21:52PM -0700, Jens Axboe wrote: > On 3/10/21 11:23 AM, Nathan Chancellor wrote: > > Hi Jens, > > > > There is a new clang warning added in the development branch, > > -Walign-mismatch, which shows an instance in block/blk-mq.c: > > &

  1   2   3   4   5   6   7   8   9   10   >