[PATCH 4/9] crypto: zstd: Switch to zstd-1.4.6 API

2020-09-15 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- crypto/zstd.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/crypto/zstd.c b/crypto/zstd.c

[PATCH 7/9] squashfs: zstd: Switch to the zstd-1.4.6 API

2020-09-15 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- fs/squashfs/zstd_wrapper.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/squashfs/zstd_wrapper.c b/fs

[PATCH 9/9] lib: zstd: Remove zstd compatibility wrapper

2020-09-15 Thread Nick Terrell
From: Nick Terrell All callers have been transitioned to the new zstd-1.4.6 API. There are no more callers of the zstd compatibility wrapper, so delete it. Signed-off-by: Nick Terrell --- include/linux/zstd_compat.h | 112 1 file changed, 112 deletions

[PATCH 8/9] lib: unzstd: Switch to the zstd-1.4.6 API

2020-09-15 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- lib/decompress_unzstd.c | 40 ++-- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/lib

[PATCH 2/9] lib: zstd: Add decompress_sources.h for decompress_unzstd

2020-09-15 Thread Nick Terrell
From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we

[PATCH 6/9] f2fs: zstd: Switch to the zstd-1.4.6 API

2020-09-15 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is more efficient because it uses the single-pass API instead of the streaming API. The streaming API is not necessary because the whole input and output buffers are available. This saves memory because

[PATCH 5/9] btrfs: zstd: Switch to the zstd-1.4.6 API

2020-09-15 Thread Nick Terrell
From: Nick Terrell Move away from the compatibility wrapper to the zstd-1.4.6 API. This code is functionally equivalent. Signed-off-by: Nick Terrell --- fs/btrfs/zstd.c | 48 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/fs

[PATCH 1/9] lib: zstd: Add zstd compatibility wrapper

2020-09-15 Thread Nick Terrell
From: Nick Terrell Adds zstd_compat.h which provides the necessary functions from the current zstd.h API. It is only active for zstd versions 1.4.6 and newer. That means it is disabled currently, but will become active when a later patch in this series updates the zstd library in the kernel

[PATCH 0/9] Update to zstd-1.4.6

2020-09-15 Thread Nick Terrell
From: Nick Terrell This patchset upgrades the zstd library to the latest upstream release. The current zstd version in the kernel is a modified version of upstream zstd-1.3.1. At the time it was integrated, zstd wasn't ready to be used in the kernel as-is. But, it is now possible to use upstream

Re: [PATCH v5] lib/string.c: implement stpcpy

2020-09-15 Thread Nick Desaulniers
n fact. https://lore.kernel.org/lkml/20200818072531.gc9...@kroah.com/ -- Thanks, ~Nick Desaulniers

[PATCH] nfs: remove incorrect fallthrough label

2020-09-15 Thread Nick Desaulniers
erred fallthrough macro") Link: https://bugs.llvm.org/show_bug.cgi?id=47539 Signed-off-by: Nick Desaulniers --- fs/nfs/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index d20326ee0475..7de4e0b03be0 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
ts on the above? -- Thanks, ~Nick Desaulniers

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 1:12 PM Nick Desaulniers wrote: > > On Tue, Sep 15, 2020 at 10:02 AM Josh Poimboeuf wrote: > > > > On Tue, Sep 15, 2020 at 06:05:54PM +0200, Borislav Petkov wrote: > > > On Tue, Sep 15, 2020 at 10:18:16PM +0800, Rong Chen wrote: > > >

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
report. Filed https://bugs.llvm.org/show_bug.cgi?id=47538. Do you have an account there Arvind so that I can CC you on them? Yikes, it looks like gcc 5.0 supports that. We'd better get to implementing that lest someone try to remove the cc-option on it soon. -- Thanks, ~Nick Desaulniers

Re: [PATCH] arch: x86: power: cpu: init %gs before __restore_processor_state (clang)

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 1:20 PM Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 12:51:47PM -0700, Nick Desaulniers wrote: > > I agree; I also would not have sent the patch though. > > Maybe google folks should run stuff by you before sending it up... :-) Ha! 1. they d

Re: [PATCH] x86/smap: Fix the smap_save() asm

2020-09-15 Thread Nick Desaulniers
tive memory operand. It is incorrect because ... (I think mentioning the point about the red zone would be good, unless there were additional concerns?) The patch should be fine, so Reviewed-by: Nick Desaulniers regardless of whether or not you choose to amend the commit message. I suspect that

Re: linux tooling mailing list

2020-09-15 Thread Nick Desaulniers
Hello postmaster, Any thoughts on linux-toolcha...@vger.kernel.org? On Wed, Aug 26, 2020 at 3:14 AM Nick Clifton wrote: > > Hi Guys, > > >>>> Would it be possible to setup: > >>>> linux-tool...@vger.kernel.org > > >>> s/linux-tooling/l

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
achable instruction 1 warning: objtool: kmem_cache_create_usercopy()+0x286: unreachable instruction 1 warning: objtool: oops_end()+0xc1: unreachable instruction 1 warning: objtool: __register_nosave_region()+0x87: unreachable instruction $ ag ist_exc_vmm_communication arch/x86/kern

Re: [PATCH] arch: x86: power: cpu: init %gs before __restore_processor_state (clang)

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 11:25 AM Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 11:00:30AM -0700, Nick Desaulniers wrote: > > This is exactly the same code from __restore_processor_state. > > No, this patch is adding > > #ifdef __clang__ > > and I don't like

Re: [PATCH] arch: x86: power: cpu: init %gs before __restore_processor_state (clang)

2020-09-15 Thread Nick Desaulniers
effectively being run twice). > If it is too late to fix it there, then maybe disable LTO builds for the > buggy version only. We could do that, too. (We can disable LTO on a per translation unit basis in KBuild). Note the author of the bug report linked above. :^P "Revenge of the stack protector" > > We had a similar discussion this week and we already have one buggy > compiler to deal with and this second one is not making it any easier... -- Thanks, ~Nick Desaulniers

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
On Tue, Sep 15, 2020 at 11:01 AM Borislav Petkov wrote: > > On Tue, Sep 15, 2020 at 10:41:24AM -0700, Nick Desaulniers wrote: > > We want them finding bugs in unreleased versions of the compiler, > > before those bugs in ship in release. This is a good thing. > > The bu

Re: [PATCH v5] lib/string.c: implement stpcpy

2020-09-15 Thread Nick Desaulniers
ks' thoughts on the comments in the patch, but please stop delaying this patch from hitting mainline. You can rewrite the commit message to whatever you want, delete it for all I care, please for god's sake please unbreak the build first). -- Thanks, ~Nick Desaulniers

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
e Cc the people of interest and leave the rest in here for > > reference. Note that CONFIG_LIVEPATCH is enabled in that .config. > > If somebody can share the .o file, I can take a look. I'm cc'ed on and read every report from 0day bot from builds with Clang. I started noticing a few randconfigs getting this report from objtool. I had filed a bug to follow up on this: https://github.com/ClangBuiltLinux/linux/issues/1148. They all seem to be coming from randconfigs. I've not yet had the time to bisect configs to isolate which config this is coming from, but I wouldn't be surprised if it was UBSAN. -- Thanks, ~Nick Desaulniers

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
you 0day guys testing with it and reporting issues? Are you testing > unreleased compilers and reporting bugs against the kernel? > > What's up?! We want them finding bugs in unreleased versions of the compiler, before those bugs in ship in release. This is a good thing. -- Thanks, ~Nick Desaulniers

Re: [tip:x86/seves] BUILD SUCCESS WITH WARNING e6eb15c9ba3165698488ae5c34920eea20eaa38e

2020-09-15 Thread Nick Desaulniers
ers/scsi/scsi_transport_sas.o:scsi_transport_sas.c:(.text+0x6139): > more undefined references to `stpcpy' follow > make: *** [Makefile:1166: vmlinux] Error 1 b4 am https://lore.kernel.org/lkml/20200914161643.938408-1-ndesaulni...@google.com/ -o | git am > > > I'm thinking clang12 is too unstable to take it seriously... -- Thanks, ~Nick Desaulniers

Re: [PATCH 06/14] Fix CFLAGS for UBSAN_BOUNDS on Clang

2020-09-14 Thread Nick Desaulniers
d that sanitizer in the 5.0+ releases; the kernel still support GCC 4.9. > + else > +CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds) > + endif > endif > > ifdef CONFIG_UBSAN_MISC > -- > 2.28.0.618.gf4bc123cb7-goog > -- Thanks, ~Nick Desaulniers

Re: [PATCH] x86: use clang builtins to read and write eflags

2020-09-14 Thread Nick Desaulniers
review for a long time. Recently, they've caused some headaches with LTO as well. Once we have those, I plan on adding that to compiler_attributes.h.) I would sleep better at night if I undid/reverted d0a8d9378d16. -- Thanks, ~Nick Desaulniers

Re: [PATCH] zstd: Fix decompression of large window archives on 32-bit platforms

2020-09-14 Thread Nick Terrell
r than > 8MB was disabled on 32-bit platforms. > > Signed-off-by: Petr Malat Reviewed-by: Nick Terrell Thanks for the fix! I looked upstream and this fix corresponds to this upstream commit: https://github.com/facebook/zstd/commit/8a5c0c98ae5a7884694589d7a69bc99011add94d Thanks, Nick Terre

[PATCH v5] lib/string.c: implement stpcpy

2020-09-14 Thread Nick Desaulniers
y: Masahiro Yamada Suggested-by: Rasmus Villemoes Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor Cc: sta...@vger.kernel.org Link: https://bugs.llvm.org/show_bug.cgi?id=47162 Link: https://bugs.llvm.org/show_bug.cgi?id=47280 Link: https://github.com/ClangBuiltLinux/linux/issues/1126 Li

Re: [PATCH v4] lib/string.c: implement stpcpy

2020-09-14 Thread Nick Desaulniers
On Mon, Sep 14, 2020 at 9:10 AM Nick Desaulniers wrote: > > LLVM implemented a recent "libcall optimization" that lowers calls to > `sprintf(dest, "%s", str)` where the return value is used to > `stpcpy(dest, str) - dest`. This generally avoids the machinery invo

[PATCH v4] lib/string.c: implement stpcpy

2020-09-14 Thread Nick Desaulniers
y: Masahiro Yamada Suggested-by: Rasmus Villemoes Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor Reviewed-by: Kees Cook Cc: sta...@vger.kernel.org Link: https://bugs.llvm.org/show_bug.cgi?id=47162 Link: https://bugs.llvm.org/show_bug.cgi?id=47280 Link: https://github.com/ClangBuiltLi

Re: [PATCH v2 00/28] Add support for Clang LTO

2020-09-10 Thread Nick Desaulniers
ries > and replaced recordmcount with the objtool pass to avoid > whitelisting relocations that are not calls. > > - Updated several commit messages with better explanations. > > > Arvind Sankar (2): > x86/boot/compressed: Disable relocation relaxation > x86/asm:

Re: [PATCH 1/2] kconfig: qconf: use delete[] instead of delete to free array (again)

2020-09-10 Thread Nick Desaulniers
[] > scripts/kconfig/qconf.cc:1239:15: note: allocated with 'new[]' here > char *data = new char[count + 1]; > ^ > > Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again") > Fixes: c9b09a9249e6 ("kconfig: qconf: use del

[PATCH v3 2/7] Revert "kbuild: disable clang's default use of -fmerge-all-constants"

2020-09-02 Thread Nick Desaulniers
This reverts commit 87e0d4f0f37fb0c8c4aeeac46fff5e957738df79. -fno-merge-all-constants has been the default since clang-6; the minimum supported version of clang in the kernel is clang-10 (10.0.1). Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed

[PATCH v3 7/7] compiler-gcc: improve version error

2020-09-02 Thread Nick Desaulniers
umentation, headers, etc.) Reviewed-by: Kees Cook Reviewed-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Reviewed-by: Sedat Dilek Suggested-by: Kees Cook Tested-by: Sedat Dilek Signed-off-by: Nick Desaulniers --- include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v3 6/7] kasan: Remove mentions of unsupported Clang versions

2020-09-02 Thread Nick Desaulniers
From: Marco Elver Since the kernel now requires at least Clang 10.0.1, remove any mention of old Clang versions and simplify the documentation. Signed-off-by: Marco Elver Signed-off-by: Nick Desaulniers Reviewed-by: Andrey Konovalov Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor

[PATCH v3 5/7] Partially revert "ARM: 8905/1: Emit __gnu_mcount_nc when using Clang 10.0.0 or newer"

2020-09-02 Thread Nick Desaulniers
This partially reverts commit b0fe66cf095016e0b238374c10ae366e1f087d11. The minimum supported version of clang is now clang 10.0.1. We still want to pass -meabi=gnu. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor

[PATCH v3 4/7] Revert "arm64: vdso: Fix compilation with clang older than 8"

2020-09-02 Thread Nick Desaulniers
This reverts commit 3acf4be235280f14d838581a750532219d67facc. The minimum supported version of clang is clang 10.0.1. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor --- arch/arm64/kernel/vdso/Makefile | 7 --- 1 file

[PATCH v3 3/7] Revert "arm64: bti: Require clang >= 10.0.1 for in-kernel BTI support"

2020-09-02 Thread Nick Desaulniers
This reverts commit b9249cba25a5dce5de87e5404503a5e11832c2dd. The minimum supported version of clang is now 10.0.1. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Reviewed-by: Kees Cook Reviewed-by: Nathan Chancellor --- arch/arm64/Kconfig | 2 -- 1 file changed, 2

[PATCH v3 0/7] set clang minimum version to 10.0.1

2020-09-02 Thread Nick Desaulniers
suggested fixes to KASAN docs. Finally, improve the warning for GCC too as per Kees. Patches after 001 are new for v2. v3 just collects tags and fixes typos in a few commit messages. Marco Elver (1): kasan: Remove mentions of unsupported Clang versions Nick Desaulniers (6): compiler-clang: add

[PATCH v3 1/7] compiler-clang: add build check for clang 10.0.1

2020-09-02 Thread Nick Desaulniers
-by: Kees Cook Signed-off-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Miguel Ojeda Reviewed-by: Sedat Dilek Acked-by: Marco Elver Acked-by: Nathan Chancellor Acked-by: Sedat Dilek Link: https://github.com/ClangBuiltLinux/linux/issues/9 Link: https

Re: [PATCH] Makefile: add -fuse-ld=lld to KBUILD_HOSTLDFLAGS when LLVM=1

2020-09-02 Thread Nick Desaulniers
On Fri, Aug 21, 2020 at 10:14 PM Masahiro Yamada wrote: > > On Fri, Aug 21, 2020 at 7:10 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > While moving Android kernels over to use LLVM=1, we observe the failure > > when building in a hermetic docker image:

Re: [PATCH v2 0/7] set clang minimum version to 10.0.1

2020-09-02 Thread Nick Desaulniers
On Tue, Sep 1, 2020 at 1:01 PM Kees Cook wrote: > > On Mon, Aug 31, 2020 at 05:23:19PM -0700, Nick Desaulniers wrote: > > Adds a compile time #error to compiler-clang.h setting the effective > > minimum supported version to clang 10.0.1. A separate patch has already

Re: [PATCH v7 0/5] Warn on orphan section placement

2020-09-02 Thread Nick Desaulniers
his all into -tip! For the series, Reviewed-by: Nick Desaulniers As the recent ppc vdso boogaloo exposed, what about the vdsos? * arch/x86/entry/vdso/Makefile * arch/arm/vdso/Makefile * arch/arm64/kernel/vdso/Makefile * arch/arm64/kernel/vdso32/Makefile > > -Kees > > v6: > https://lo

Re: [PATCH 1/2] powerpc/vdso64: link vdso64 with linker

2020-09-02 Thread Nick Desaulniers
On Wed, Sep 2, 2020 at 5:14 AM Michael Ellerman wrote: > > Nick Desaulniers writes: > > Fixes: commit f2af201002a8 ("powerpc/build: vdso linker warning for orphan > > sections") > > I think I'll just revert that for v5.9 ? SGTM; you'll probably still want the

Re: [PATCH v6 00/29] Warn on orphan section placement

2020-09-01 Thread Nick Desaulniers
On Tue, Sep 1, 2020 at 4:18 PM Kees Cook wrote: > > On Tue, Sep 01, 2020 at 11:02:02AM -0700, Nick Desaulniers wrote: > > Uh oh, the ppc vdso uses cc-ldoption which was removed! (I think by > > me; let me send patches) How is that not an error? Yes, guilty, > > officer.

Re: [PATCH v3 1/2] lib: decompress_unzstd: Limit output size

2020-09-01 Thread Nick Terrell
it as big as possible without having the end address overflow. > + */ > if (out_len == 0) > - out_len = LONG_MAX; /* no limit */ > + out_len = UINTPTR_MAX - (uintptr_t)out_buf; Great, that works for me. Thanks for fixing this! Reviewed-by: Nick Terrell > if (fill == NULL && flush == NULL) > /* > -- > 2.28.0 >

[PATCH 0/2] link vdso with linker

2020-09-01 Thread Nick Desaulniers
review around the error mentioned below the fold related to the .got section. Nick Desaulniers (2): powerpc/vdso64: link vdso64 with linker powerpc/vdso32: link vdso64 with linker arch/powerpc/include/asm/vdso.h | 17 ++--- arch/powerpc/kernel/vdso32/Makefile | 7

[PATCH 1/2] powerpc/vdso64: link vdso64 with linker

2020-09-01 Thread Nick Desaulniers
lore.kernel.org/lkml/cakwvodnn3wxydjomvnveyd_njwrku3fabwt_bs92duihhyw...@mail.gmail.com/ Signed-off-by: Nick Desaulniers --- arch/powerpc/include/asm/vdso.h | 17 ++--- arch/powerpc/kernel/vdso64/Makefile | 8 ++-- arch/powerpc/kernel/vdso64/vdso64.lds.S | 1 - 3 files c

[PATCH 2/2] powerpc/vdso32: link vdso64 with linker

2020-09-01 Thread Nick Desaulniers
t was used in the vdso32. Fixes: commit f2af201002a8 ("powerpc/build: vdso linker warning for orphan sections") Link: https://lore.kernel.org/lkml/cakwvodnn3wxydjomvnveyd_njwrku3fabwt_bs92duihhyw...@mail.gmail.com/ Signed-off-by: Nick Desaulniers --- Not sure removing .got is a good idea

Re: [PATCH v6 00/29] Warn on orphan section placement

2020-09-01 Thread Nick Desaulniers
th: > > > > > > GNU ld version 2.25-17.fc23 > > (At best, this is from 2015 ... but yes, min binutils in 2.23.) Ah, crap! Indeed arch/powerpc/Makefile wraps this in ld-option. Uh oh, the ppc vdso uses cc-ldoption which was removed! (I think by me; let me send patches) How is that not an error? Yes, guilty, officer. commit 055efab3120b ("kbuild: drop support for cc-ldoption"). Did I not know how to use grep, or? No, it is commit f2af201002a8 ("powerpc/build: vdso linker warning for orphan sections") that is wrong. -- Thanks, ~Nick Desaulniers

Re: [PATCH] mwifiex: Remove unnecessary braces from HostCmd_SET_SEQ_NO_BSS_INFO

2020-09-01 Thread Nick Desaulniers
es/1146 > Reported-by: Andy Lavr > Signed-off-by: Nathan Chancellor Wow, that's tricky. The unnecessary extra parens mix with the extra curly braces to form a GNU C statement expression. Thanks for the patch. Reviewed-by: Nick Desaulniers > --- > drivers/net/wireless/marvell/mwifiex/cmdevt.c |

Re: [PATCH] soundwire: fix error handling

2020-09-01 Thread Nick Desaulniers
a null pointer. > > Need to check before freeing. > > The change looks good to me, but the title of patch should be revised. > > The patch subject should describe the patch, in this case is setting > pointer to null on cleanup, so an appropriate subject may be" > "[P

[tip: core/build] vmlinux.lds.h: Add PGO and AutoFDO input sections

2020-09-01 Thread tip-bot2 for Nick Desaulniers
The following commit has been merged into the core/build branch of tip: Commit-ID: eff8728fe69880d3f7983bec3fb6cea4c306261f Gitweb: https://git.kernel.org/tip/eff8728fe69880d3f7983bec3fb6cea4c306261f Author:Nick Desaulniers AuthorDate:Fri, 21 Aug 2020 12:42:47 -07:00

[PATCH v2 1/7] compiler-clang: add build check for clang 10.0.1

2020-08-31 Thread Nick Desaulniers
://github.com/ClangBuiltLinux/linux/issues/941 Suggested-by: Sedat Dilek Suggested-by: Nathan Chancellor Suggested-by: Kees Cook Acked-by: Marco Elver Acked-by: Nathan Chancellor Acked-by: Sedat Dilek Reviewed-by: Kees Cook Reviewed-by: Miguel Ojeda Signed-off-by: Nick Desaulniers --- Changes

[PATCH v2 4/7] Revert "arm64: vdso: Fix compilation with clang older than 8"

2020-08-31 Thread Nick Desaulniers
This reverts commit 3acf4be235280f14d838581a750532219d67facc. The minimum supported version of clang is clang 10.0.1. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers --- arch/arm64/kernel/vdso/Makefile | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/arm64/kernel

[PATCH v2 7/7] compiler-gcc: improve version error

2020-08-31 Thread Nick Desaulniers
umentation, headers, etc.) Suggested-by: Kees Cook Signed-off-by: Nick Desaulniers --- include/linux/compiler-gcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 7a3769040d7d..d1e3c6896b71 100644 --- a/inc

[PATCH v2 2/7] Revert "kbuild: disable clang's default use of -fmerge-all-constants"

2020-08-31 Thread Nick Desaulniers
Signed-off-by: Nick Desaulniers --- Makefile | 9 - 1 file changed, 9 deletions(-) diff --git a/Makefile b/Makefile index 37739ee53f27..144ac6a073ff 100644 --- a/Makefile +++ b/Makefile @@ -932,15 +932,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized) # disable invalid

[PATCH v2 5/7] Partial revert "ARM: 8905/1: Emit __gnu_mcount_nc when using Clang 10.0.0 or newer"

2020-08-31 Thread Nick Desaulniers
This partially reverts commit b0fe66cf095016e0b238374c10ae366e1f087d11. The minimum supported version of clang is now clang 10.0.1. We still want to pass -meabi=gnu. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 3/7] Revert "arm64: bti: Require clang >= 10.0.1 for in-kernel BTI support"

2020-08-31 Thread Nick Desaulniers
This reverts commit b9249cba25a5dce5de87e5404503a5e11832c2dd. The minimum supported version of clang is now 10.0.1. Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers --- arch/arm64/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64

[PATCH v2 6/7] kasan: Remove mentions of unsupported Clang versions

2020-08-31 Thread Nick Desaulniers
From: Marco Elver Since the kernel now requires at least Clang 10.0.1, remove any mention of old Clang versions and simplify the documentation. Reviewed-by: Andrey Konovalov Signed-off-by: Marco Elver Signed-off-by: Nick Desaulniers --- Documentation/dev-tools/kasan.rst | 4 ++-- lib

[PATCH v2 0/7] set clang minimum version to 10.0.1

2020-08-31 Thread Nick Desaulniers
suggested fixes to KASAN docs. Finally, improve the warning for GCC too as per Kees. Patches after 001 are new for v2. Marco Elver (1): kasan: Remove mentions of unsupported Clang versions Nick Desaulniers (6): compiler-clang: add build check for clang 10.0.1 Revert "kbuild: disable cl

Re: [PATCH] compiler-clang: add build check for clang 10.0.1

2020-08-31 Thread Nick Desaulniers
On Mon, Aug 31, 2020 at 4:32 PM Nick Desaulniers wrote: > > On Wed, Aug 26, 2020 at 2:42 PM Nathan Chancellor > wrote: > > > > On Wed, Aug 26, 2020 at 01:14:19PM -0700, Nick Desaulniers wrote: > > > During Plumbers 2020, we voted to just support the latest releas

Re: [PATCH] compiler-clang: add build check for clang 10.0.1

2020-08-31 Thread Nick Desaulniers
On Wed, Aug 26, 2020 at 2:42 PM Nathan Chancellor wrote: > > On Wed, Aug 26, 2020 at 01:14:19PM -0700, Nick Desaulniers wrote: > > During Plumbers 2020, we voted to just support the latest release of > > Clang for now. Add a compile time check for this. > > > >

Re: [PATCH v3] lib/string.c: implement stpcpy

2020-08-31 Thread Nick Desaulniers
lean on the compiler to help > (e.g. CONFIG_FORTIFY_SOURCE). Having seatbelts is great (ie. fortify source), but is no substitute for driving carefully (having proper APIs that help me not shoot my foot off). I think it's nice to have *both*, but if I drove solely relying on my seatbelts, we might all be in trouble. Not disagreeing with you, Kees. -- Thanks, ~Nick Desaulniers

Re: [PATCH] soundwire: fix error handling

2020-08-31 Thread Nick Desaulniers
On Mon, Aug 31, 2020 at 11:20 AM Tom Rix wrote: > > > On 8/31/20 10:48 AM, Nick Desaulniers wrote: > > On Mon, Aug 31, 2020 at 10:47 AM Nick Desaulniers > > wrote: > >> On Sat, Aug 29, 2020 at 8:35 AM wrote: > >>> From: Tom Rix > >>> > &

Re: [PATCH] soundwire: fix error handling

2020-08-31 Thread Nick Desaulniers
On Mon, Aug 31, 2020 at 10:47 AM Nick Desaulniers wrote: > > On Sat, Aug 29, 2020 at 8:35 AM wrote: > > > > From: Tom Rix > > > > clang static analysis flags this problem Also, Tom, please use ./scripts/get_maintainer.pl on your patches to CC ou

Re: [PATCH] soundwire: fix error handling

2020-08-31 Thread Nick Desaulniers
_rt->bus; > - > - kfree(bus->defer_msg.msg->buf); > - kfree(bus->defer_msg.msg); > + if (bus->defer_msg.msg) { > + kfree(bus->defer_msg.msg->buf); > + kfree(bus->defer_msg.msg)

Re: [PATCH] media: tc358743: initialize variable

2020-08-31 Thread Nick Desaulniers
andler(int irq, void *dev_id) > { > struct tc358743_state *state = dev_id; > - bool handled; > + bool handled = false; > > tc358743_isr(>sd, 0, ); > > -- > 2.18.1 > -- Thanks, ~Nick Desaulniers

Re: [PATCH] media: ov7670: check status of ov7670_read

2020-08-28 Thread Nick Desaulniers
et == 0) { > - ret = ov7670_read(sd, REG_COM8, ); > - ret = ov7670_write(sd, REG_COM8, com8 & ~COM8_AGC); > - } > + ret = ov7670_read(sd, REG_COM8, ); > + if (ret) > + return ret; > + ret = ov7670_write(sd, REG_COM8, com8 & ~COM8_AGC); > + > return ret; > } > > -- > 2.18.1 > -- Thanks, ~Nick Desaulniers

Re: [PATCH] deprecated.rst: Remove now removed uninitialized_var

2020-08-26 Thread Nick Desaulniers
On Wed, Aug 26, 2020 at 8:12 PM Joe Perches wrote: > > It's now gone from the kernel so remove it from the deprecated API text. > > Signed-off-by: Joe Perches Thanks Joe. Reviewed-by: Nick Desaulniers > --- > Documentation/process/deprecated.rst | 18 -- >

[PATCH] compiler-clang: add build check for clang 10.0.1

2020-08-26 Thread Nick Desaulniers
/linux/issues/941 Suggested-by: Sedat Dilek Signed-off-by: Nick Desaulniers --- include/linux/compiler-clang.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index cee0c728d39a..7338d3ffd240 100644 --- a/include/linux

[PATCH v2] Documentation: add minimum clang/llvm version

2020-08-26 Thread Nick Desaulniers
-by: Nick Desaulniers --- Changes V1 -> V2: * fix typo, as per Will. * add link to getting LLVM, as per Nathan. * collect tags. Documentation/kbuild/llvm.rst | 4 Documentation/process/changes.rst | 15 +++ 2 files changed, 19 insertions(+) diff --git a/Documentation/kbu

Re: [PATCH] Documentation: add minimum clang/llvm version

2020-08-26 Thread Nick Desaulniers
to support you're referring to. Otherwise we're talking about a complicated multidimensional table that we don't have CI coverage of. > [1] https://github.com/ClangBuiltLinux/linux/issues/941 > [2] > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/kbuild/llvm.rst#n47 -- Thanks, ~Nick Desaulniers

Re: [PATCH v3] lib/string.c: implement stpcpy

2020-08-26 Thread Nick Desaulniers
cpy() is not recommended ? > > > > The implementation of strcpy() is almost the same. > > It is unclear to me what makes stpcpy() unsafe.. https://lore.kernel.org/lkml/202008150921.B70721A359@keescook/ > > It's the same thing that makes strcpy unsafe: > > Unchecked buffer lengths with no guarantee src is terminated. -- Thanks, ~Nick Desaulniers

Re: [PATCH] Documentation/llvm: Improve formatting of commands, variables, and arguments

2020-08-26 Thread Nick Desaulniers
this, we can remove the escaped backslashes in the last > code block and move them to single backslashes. > > Signed-off-by: Nathan Chancellor Ah, yeah, I saw that. Thanks for the fix! Reviewed-by: Nick Desaulniers > --- > Documentation/kbuild/llvm.rst | 26 +-

Re: [PATCH v2 1/2] lib: decompress_unzstd: Limit output size

2020-08-25 Thread Nick Terrell
in this way. A better solution might be to pass MAX_ADDRESS_PTR - OUTPUT_PTR as the size to the __decompress() call. Or some other size that won’t overflow the pointer. Best, Nick > Signed-off-by: Paul Cercueil > Reviewed-by: Nick Terrell > --- > > Notes: >v2: Change limit t

[PATCH] Documentation: add minimum clang/llvm version

2020-08-25 Thread Nick Desaulniers
major release per year while releasing minor updates to the past 3 major versions. LLVM tends to support one major release and one minor release every six months. Signed-off-by: Nick Desaulniers --- Note to reviewers: working remote, I'm having trouble testing/verifying that I have the RST links

[PATCH] MAINTAINERS: add LLVM maintainers

2020-08-25 Thread Nick Desaulniers
at the same employer, I would gladly step down. Cc: clang-built-li...@googlegroups.com Cc: Nathan Chancellor Signed-off-by: Nick Desaulniers --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 33aab0c88118..0cbb24753153 100644 --- a/MAINTAINERS +++ b

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-25 Thread Nick Desaulniers
On Tue, Aug 25, 2020 at 5:30 AM Masahiro Yamada wrote: > > On Tue, Aug 25, 2020 at 4:10 PM Nick Desaulniers > wrote: > > > > Masahiro, are you implying that we shouldn't take the > > -fno-builtin-stpcpy patch, because Clang is inconsistent? (That can be > >

[PATCH v3] lib/string.c: implement stpcpy

2020-08-25 Thread Nick Desaulniers
uggested-by: Masahiro Yamada Suggested-by: Rasmus Villemoes Reported-by: Sami Tolvanen Signed-off-by: Nick Desaulniers --- Changes V3: * Drop Sami's Tested by tag; newer patch. * Add EXPORT_SYMBOL as per Andy. * Rewrite commit message, rewrote part of what Masahiro said to be generic in terms of

[PATCH v3] lib/string.c: implement stpcpy

2020-08-25 Thread Nick Desaulniers
uggested-by: Masahiro Yamada Suggested-by: Rasmus Villemoes Reported-by: Sami Tolvanen Signed-off-by: Nick Desaulniers --- Changes V3: * Drop Sami's Tested by tag; newer patch. * Add EXPORT_SYMBOL as per Andy. * Rewrite commit message, rewrote part of what Masahiro said to be generic in terms of

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-25 Thread Nick Desaulniers
On Tue, Aug 25, 2020 at 12:10 AM Nick Desaulniers wrote: > > On Mon, Aug 24, 2020 at 10:34 AM Arvind Sankar wrote: > > > > On Tue, Aug 25, 2020 at 12:57:22AM +0900, Masahiro Yamada wrote: > > > > > > > > > To prevent transformation from foo() into b

Re: [PATCH 0/4] -ffreestanding/-fno-builtin-* patches

2020-08-25 Thread Nick Desaulniers
shouldn't take the -fno-builtin-stpcpy patch, because Clang is inconsistent? (That can be fixed.) Even though -fno-builtin-stpcpy works here as intended? https://lore.kernel.org/lkml/20200817220212.338670-2-ndesaulni...@google.com/ Otherwise we need to provide an implementation of this symbol in the kernel. https://lore.kernel.org/lkml/20200815020946.1538085-1-ndesaulni...@google.com/ Please, pick your poison. -- Thanks, ~Nick Desaulniers

Re: [PATCH 1/2] lib: decompress_unzstd: Limit output size

2020-08-24 Thread Nick Terrell
> On Aug 24, 2020, at 2:05 PM, Paul Cercueil wrote: > > > > Le lun. 24 août 2020 à 20:11, Nick Terrell a écrit : >>> On Aug 21, 2020, at 9:29 AM, Paul Cercueil wrote: >>> The zstd decompression code, as it is right now, will have internal >>&

Re: [PATCH 2/2] MIPS: Add support for ZSTD-compressed kernels

2020-08-24 Thread Nick Terrell
> On Aug 24, 2020, at 2:02 PM, Paul Cercueil wrote: > > Hi Nick, > > Le lun. 24 août 2020 à 19:51, Nick Terrell a écrit : >>> On Aug 21, 2020, at 9:29 AM, Paul Cercueil wrote: >>> Add support for self-extracting kernels with a ZSTD compression. >&g

Re: [PATCH 1/2] lib: decompress_unzstd: Limit output size

2020-08-24 Thread Nick Terrell
t we don’t overflow a 32-bit size_t, so this will be fixed after the update. -Nick > Signed-off-by: Paul Cercueil > --- > lib/decompress_unzstd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/decompress_unzstd.c b/lib/decompress_unzstd.c > index

Re: [PATCH 2/2] MIPS: Add support for ZSTD-compressed kernels

2020-08-24 Thread Nick Terrell
= zstd You can use zstd22 here. It will give you slightly better compression without any additional memory usage. Also, you should add -D__DISABLE_EXPORTS to the KBUILD_CFLAGS like x86 does [1]. [1] https://github.com/torvalds/linux/blob/master/arch/x86/boot/compressed/Makefile -Nick &g

Re: [PATCH v3 09/10] gen_compile_commands: remove the warning about too few .cmd files

2020-08-22 Thread Nick Desaulniers
=/path/to/your/external/module compile_commands.json > > Then, this warning is displayed since there are usually less than > 300 files in a single module. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers > --- > > Changes in v3: > - New patch > > scripts/gen_

Re: [PATCH v3 07/10] gen_compile_commands: support *.o, *.a, modules.order in positional argument

2020-08-22 Thread Nick Desaulniers
sed by the next commit to wire up the > compile_commands.json rule to the Makefile. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers > --- > > Changes in v3: > - Use 'llvm-ar' instead of 'ar' for the default of -a option > - Fix the corrupted comment block > &g

Re: [PATCH v2 4/9] gen_compile_commands: reword the help message of -d option

2020-08-21 Thread Nick Desaulniers
On Fri, Aug 21, 2020 at 6:56 PM Masahiro Yamada wrote: > > On Sat, Aug 22, 2020 at 9:29 AM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > On Fri, Aug 21, 2020 at 12:02 PM Masahiro Yamada > > wrote: > > > > > > I think the help me

Re: arch/s390/include/asm/atomic_ops.h:56:45: error: invalid operand for inline asm constraint 'i'

2020-08-21 Thread Nick Desaulniers
artin Schwidefsky > :: CC: Martin Schwidefsky > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org > > -- > You received this message because you are subscribed to the Google Groups > "Clang

Re: [PATCH v2 0/9] kbuild: clang-tidy

2020-08-21 Thread Nick Desaulniers
e build, > out-of-tree build (O=), and external module build (M=). > > This version keeps the previous work-flow. > You can still manually run scripts/gen_compile_commands.json > > 'make compile_commands.json' or 'make clang-tidy' is handier > for most cases. As Nick noted

Re: [PATCH v2 7/9] gen_compile_commands: support *.o, *.a, modules.order in positional argument

2020-08-21 Thread Nick Desaulniers
-cmdfiles = cmdfiles_in_dir(path) > +# If 'path' is a directory, handle all .cmd files under it. > +# Otherwise, handle .cmd files associated with the file. > +# Most of built-in objects are linked via archives (built-in.a or > lib.a) > +# but some are linked to vmlinux directly. > +# Modules are lis ^ was this comment cut off? > +if os.path.isdir(path): > +cmdfiles = cmdfiles_in_dir(path) > +elif path.endswith('.o'): > +cmdfiles = cmdfiles_for_o(path) > +elif path.endswith('.a'): > +cmdfiles = cmdfiles_for_a(path, ar) > +elif path.endswith('modules.order'): > +cmdfiles = cmdfiles_for_modorder(path) > +else: > +sys.exit('{}: unknown file type'.format(path)) > > for cmdfile in cmdfiles: > with open(cmdfile, 'rt') as f: > -- > 2.25.1 > -- Thanks, ~Nick Desaulniers

Re: [PATCH v2 8/9] kbuild: wire up the build rule of compile_commands.json to Makefile

2020-08-21 Thread Nick Desaulniers
; > build-dirs := $(KBUILD_EXTMOD) > PHONY += modules > -modules: descend > +modules: $(MODORDER) > $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost > > +$(MODORDER): descend > + @: ^ stuff like this I don't understand. But I understand the premise

Re: [PATCH v2 6/9] gen_compile_commands: move directory walk to a generator function

2020-08-21 Thread Nick Desaulniers
-continue > -filepath = os.path.join(dirpath, filename) > > -with open(filepath, 'rt') as f: > +for path in paths: > +cmdfiles = cmdfiles_in_dir(path) > + > +for cmdfile in cmdfiles: If `cmdfiles` is never referenced again, please

Re: [PATCH v2 5/9] gen_compile_commands: make -o option independent of -d option

2020-08-21 Thread Nick Desaulniers
rectory (unless the source tree is read-only) because it is > the default location Clang Tools search for the compilation database. > > Also, move the default parameter to the default= argument of the > .add_argument(). > > Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desa

Re: [PATCH v2 4/9] gen_compile_commands: reword the help message of -d option

2020-08-21 Thread Nick Desaulniers
to the kernel source directory to search ' > +directory_help = ('specify the output directory used for the kernel > build ' Capitalization (specify -> Specify) With that: Reviewed-by: Nick Desaulniers > '(defaults to the working directory)') > parser.add_argument('-d', '--directory', type=str, help=directory_help) > > -- > 2.25.1 > -- Thanks, ~Nick Desaulniers

Re: [PATCH v2 3/9] gen_compile_commands: do not support .cmd files under tools/ directory

2020-08-21 Thread Nick Desaulniers
_path'. > > os.path.join(root_directory, file_path) works whether the file_path > is relative or not. If file_path is already absolute, it returns it > as-is. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers > --- > > Change

Re: [PATCH v2 2/9] gen_compile_commands: use choices for --log_levels option

2020-08-21 Thread Nick Desaulniers
DEBUG,INFO,WARNING,ERROR,CRITICAL} > > Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers > --- > > Changes in v2: > - New patch > > scripts/gen_compile_commands.py | 14 -- > 1 file changed, 4 insertions(+), 10 deletions(-) > &g

<    3   4   5   6   7   8   9   10   11   12   >