was
meant to be. Now that you mention it, I see it, and it does seem
consistent in that regard.
Justin, is your formatter configurable to match that convention?
Maybe it's still useful, as long as you configure it to stick to the
pre-existing convention.
--
Thanks,
~Nick Desaulniers
MAINTAINERS |3 +
> scripts/get_maintainer.pl | 3334
> +++--
> 2 files changed, 1718 insertions(+), 1619 deletions(-)
> ---
> base-commit: 6465e260f48790807eef06b583b38ca9789b6072
> change-id: 20230926-get_maintainer_add_d-07424a814e72
>
> Best regards,
> --
> Justin Stitt
>
--
Thanks,
~Nick Desaulniers
transfer_one() falls through to the next function"
>
> which is what we normally do in this type of situation.
>
> It may be caused by UB, or a compiler bug, but either way we should
> figure out the root cause.
We probably want to creduce or cvise this. IIRC we still have
outstanding issues with switch statements with user-annotated
unreachable branches not getting eliminated.
--
Thanks,
~Nick Desaulniers
- \
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 Desaulniers
Reviewed-by: Nathan Chancellor
Reviewed-by: Vincenzo Frascino
---
Changes V2 -> V3:
* Pick up reviewed by tags.
Changes
me machine and could have written this component in
Rust from the start, 51 (73.9%) of these bugs would not have been
possible."
--
Thanks,
~Nick Desaulniers
On Fri, Apr 16, 2021 at 11:47 AM Paul E. McKenney wrote:
>
> On Thu, Apr 15, 2021 at 11:04:37PM -0700, Nick Desaulniers wrote:
> > On Thu, Apr 15, 2021 at 9:27 PM Boqun Feng wrote:
> > >
> > > But I think the Rust Community still wants to have a good memory model,
ntly there is no code requiring
> synchronization between C side and Rust side, so we are currently fine.
> But in the longer term, we need to teach Rust memory model about the
> "design patterns" used in Linux kernel for parallel programming.
>
> What I have been doing so far is reviewing patches which have memory
> orderings in Rust-for-Linux project, try to make sure we don't include
> memory ordering bugs for the beginning.
>
> Regards,
> Boqun
--
Thanks,
~Nick Desaulniers
On Wed, Apr 14, 2021 at 5:43 PM Miguel Ojeda
wrote:
>
> On Thu, Apr 15, 2021 at 1:19 AM Nick Desaulniers
> wrote:
> >
> > -Oz in clang typically generates larger kernel code than -Os; LLVM
> > seems to aggressively emit libcalls even when the setup for a call
> >
NITIZE_cmdline.o := n
> KCSAN_SANITIZE_cmdline.o := n
>
> ifdef CONFIG_FUNCTION_TRACER
> -CFLAGS_REMOVE_cmdline.o = -pg
> +CFLAGS_REMOVE_cmdline.o = $(CC_FLAGS_FTRACE)
> endif
>
> CFLAGS_cmdline.o := -fno-stack-protector -fno-jump-tables
> --
> 2.20.1
>
>
>
--
Thanks,
~Nick Desaulniers
On Thu, Apr 15, 2021 at 6:31 AM Vincenzo Frascino
wrote:
>
>
>
> On 4/14/21 10:45 PM, Nick Desaulniers wrote:
> > Clang can assemble these files just fine; this is a relic from the top
> > level Makefile conditionally adding this. We no longer need --prefix,
> >
On Thu, Apr 15, 2021 at 12:10 AM Greg Kroah-Hartman
wrote:
>
> On Wed, Apr 14, 2021 at 04:24:45PM -0700, Nick Desaulniers wrote:
> > On Wed, Apr 14, 2021 at 12:35 PM Linus Torvalds
> > wrote:
> > >
> > > On Wed, Apr 14, 2021 at 11:47 AM wrote
at:
>
> rust-for-li...@vger.kernel.org
>
> and take a look at the project itself at:
>
> https://github.com/Rust-for-Linux
Looks like Wedson's writeup is now live. Nice job Wedson!
https://security.googleblog.com/2021/04/rust-in-linux-kernel.html
--
Thanks,
~Nick Desaulniers
#ifndef KSYM_NAME_LEN
> -#define KSYM_NAME_LEN 256
> +#define KSYM_NAME_LEN 512
> #endif
>
> struct perf_record_ksymbol {
> diff --git a/tools/lib/symbol/kallsyms.h b/tools/lib/symbol/kallsyms.h
> index 72ab9870454b..542f9b059c3b 100644
> --- a/tools/lib/symbol/kallsyms.h
> +++ b/tools/lib/symbol/kallsyms.h
> @@ -7,7 +7,7 @@
> #include
>
> #ifndef KSYM_NAME_LEN
> -#define KSYM_NAME_LEN 256
> +#define KSYM_NAME_LEN 512
> #endif
>
> static inline u8 kallsyms2elf_binding(char type)
> --
> 2.17.1
>
--
Thanks,
~Nick Desaulniers
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
> +# and from include/config/auto.conf.cmd to detect the compiler upgrade.
> +CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1 | sed
> 's/\#//g')
> +
> +ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
> +CLANG_FLAGS+= $(TENTATIVE_CLANG_FLAGS)
> KBUILD_CFLAGS += $(CLANG_FLAGS)
> KBUILD_AFLAGS += $(CLANG_FLAGS)
> export CLANG_FLAGS
> --
> 2.17.1
>
--
Thanks,
~Nick Desaulniers
people could
> use as a example of a real piece of code that actually does something
> meaningful?
Are you suggesting that they "rewrite it in Rust?" :^P *ducks*
(sorry, I couldn't help myself) Perhaps it would be a good exercise to
demonstrate some of the benefits of using Rust for driver work?
--
Thanks,
~Nick Desaulniers
-MMD,$(depfile) $(NOSTDINC_FLAGS)
> $(LINUXINCLUDE) \
> $(_c_flags) $(modkern_cflags) \
> $(basename_flags) $(modname_flags)
>
> +rustc_flags = $(_rustc_flags) $(modkern_rustcflags)
> @$(objtree)/include/generated/rustc_cfg
> +
> a_flags= -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
> $(_a_flags) $(modkern_aflags)
>
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index 2568dbe16ed6..a83d646ecef5 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -637,6 +637,56 @@ static struct conf_printer kconfig_printer_cb =
> .print_comment = kconfig_print_comment,
> };
>
> +/*
> + * rustc cfg printer
> + *
> + * This printer is used when generating the resulting rustc configuration
> + * after kconfig invocation and `defconfig` files.
> + */
> +static void rustc_cfg_print_symbol(FILE *fp, struct symbol *sym, const char
> *value, void *arg)
> +{
> + const char *str;
> +
> + switch (sym->type) {
> + case S_INT:
> + case S_HEX:
> + case S_BOOLEAN:
> + case S_TRISTATE:
> + str = sym_escape_string_value(value);
> +
> + /*
> +* We don't care about disabled ones, i.e. no need for
> +* what otherwise are "comments" in other printers.
> +*/
> + if (*value == 'n')
> + return;
> +
> + /*
> +* To have similar functionality to the C macro `IS_ENABLED()`
> +* we provide an empty `--cfg CONFIG_X` here in both `y`
> +* and `m` cases.
> +*
> +* Then, the common `fprintf()` below will also give us
> +* a `--cfg CONFIG_X="y"` or `--cfg CONFIG_X="m"`, which can
> +* be used as the equivalent of `IS_BUILTIN()`/`IS_MODULE()`.
> +*/
> + if (*value == 'y' || *value == 'm')
> + fprintf(fp, "--cfg=%s%s\n", CONFIG_, sym->name);
> +
> + break;
> + default:
> + str = value;
> + break;
> + }
> +
> + fprintf(fp, "--cfg=%s%s=%s\n", CONFIG_, sym->name, str);
> +}
> +
> +static struct conf_printer rustc_cfg_printer_cb =
> +{
> + .print_symbol = rustc_cfg_print_symbol,
> +};
> +
> /*
> * Header printer
> *
> @@ -1044,7 +1094,7 @@ int conf_write_autoconf(int overwrite)
> struct symbol *sym;
> const char *name;
> const char *autoconf_name = conf_get_autoconfig_name();
> - FILE *out, *out_h;
> + FILE *out, *out_h, *out_rustc_cfg;
> int i;
>
> if (!overwrite && is_present(autoconf_name))
> @@ -1065,6 +1115,13 @@ int conf_write_autoconf(int overwrite)
> return 1;
> }
>
> + out_rustc_cfg = fopen(".tmp_rustc_cfg", "w");
> + if (!out_rustc_cfg) {
> + fclose(out);
> + fclose(out_h);
> + return 1;
> + }
> +
> conf_write_heading(out, &kconfig_printer_cb, NULL);
> conf_write_heading(out_h, &header_printer_cb, NULL);
>
> @@ -1076,9 +1133,11 @@ int conf_write_autoconf(int overwrite)
> /* write symbols to auto.conf and autoconf.h */
> conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1);
> conf_write_symbol(out_h, sym, &header_printer_cb, NULL);
> + conf_write_symbol(out_rustc_cfg, sym, &rustc_cfg_printer_cb,
> NULL);
> }
> fclose(out);
> fclose(out_h);
> + fclose(out_rustc_cfg);
>
> name = getenv("KCONFIG_AUTOHEADER");
> if (!name)
> @@ -1097,6 +1156,12 @@ int conf_write_autoconf(int overwrite)
> if (rename(".tmpconfig", autoconf_name))
> return 1;
>
> + name = "include/generated/rustc_cfg";
> + if (make_parent_dir(name))
> + return 1;
> + if (rename(".tmp_rustc_cfg", name))
> + return 1;
> +
> return 0;
> }
>
> diff --git a/scripts/rust-version.sh b/scripts/rust-version.sh
> new file mode 100755
> index ..67b6d31688e2
> --- /dev/null
> +++ b/scripts/rust-version.sh
> @@ -0,0 +1,31 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# rust-version rust-command
> +#
> +# Print the compiler version of `rust-command' in a 5 or 6-digit form
> +# such as `14502' for rustc-1.45.2 etc.
> +#
> +# Returns 0 if not found (so that Kconfig does not complain)
> +compiler="$*"
> +
> +if [ ${#compiler} -eq 0 ]; then
> + echo "Error: No compiler specified." >&2
> + printf "Usage:\n\t$0 \n" >&2
> + exit 1
> +fi
> +
> +if ! command -v $compiler >/dev/null 2>&1; then
> + echo 0
> + exit 0
> +fi
> +
> +VERSION=$($compiler --version | cut -f2 -d' ')
> +
> +# Cut suffix if any (e.g. `-dev`)
> +VERSION=$(echo $VERSION | cut -f1 -d'-')
> +
> +MAJOR=$(echo $VERSION | cut -f1 -d'.')
> +MINOR=$(echo $VERSION | cut -f2 -d'.')
> +PATCHLEVEL=$(echo $VERSION | cut -f3 -d'.')
> +printf "%d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
> --
> 2.17.1
>
--
Thanks,
~Nick Desaulniers
: linux-r...@vger.kernel.org
...
> +F: rust/
> +F: samples/rust/
> +F: Documentation/rust/
Probably some other files, too? Like the target.json files under
arch/{arch}/rust/ ?
--
Thanks,
~Nick Desaulniers
> +
> +
> +Building
> +
> +
> +Building a kernel with Clang or a complete LLVM toolchain is the best
> supported
> +setup at the moment. That is::
> +
> +make ARCH=... CROSS_COMPILE=... CC=clang -j...
> +
> +or::
> +
> +make ARCH=... CROSS_COMPILE=... LLVM=1 -j...
Please reorder; prefer LLVM=1 to CC=clang. Probably worth another
cross reference to :ref:`kbuild_llvm`.
> +
> +Using GCC also works for some configurations, but it is *very* experimental
> at
> +the moment.
> +
> +
> +Hacking
> +---
> +
> +If you want to dive deeper, take a look at the source code of the samples
> +at ``samples/rust/``, the Rust support code under ``rust/`` and
> +the ``Rust hacking`` menu under ``Kernel hacking``.
> +
> +If you use GDB/Binutils and Rust symbols aren't getting demangled, the reason
> +is your toolchain doesn't support Rust's new v0 mangling scheme yet. There
> are
"new" as in changed, or "new" as in Rust previously did not mangle symbols?
> +a few ways out:
> +
> + - If you don't mind building your own tools, we provide the following fork
> +with the support cherry-picked from GCC on top of very recent releases:
> +
> +
> https://github.com/Rust-for-Linux/binutils-gdb/releases/tag/gdb-10.1-release-rust
> +
> https://github.com/Rust-for-Linux/binutils-gdb/releases/tag/binutils-2_35_1-rust
> +
> + - If you only need GDB and can enable ``CONFIG_DEBUG_INFO``, do so:
> +some versions of GDB (e.g. vanilla GDB 10.1) are able to use
> +the pre-demangled names embedded in the debug info.
> +
> + - If you don't need loadable module support, you may compile without
> +the ``-Zsymbol-mangling-version=v0`` flag. However, we don't maintain
> +support for that, so avoid it unless you are in a hurry.
> --
> 2.17.1
>
--
Thanks,
~Nick Desaulniers
least be part of Wedson's core responsibilities,
shouldn't this be "Supported." Per Maintainers:
87 S: *Status*, one of the following:
88 Supported: Someone is actually paid to look after this.
89 Maintained: Someone actually looks after it.
Either way,
Acked-by: Ni
- \
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 Desaulniers
---
Changes V1 -> V2:
* Remove --prefix, --gcc-toolchain, COMPAT_GCC_TOOLCHAIN, and
COMPAT_GCC_TOOLCHAIN_DIR as per Nat
) to the alternative_endif
> macro, shuffling the .org directives so that the length validation
> happen will always happen in the same subsections. alternative_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.
T
-by: Nick Desaulniers
---
arch/arm64/kernel/vdso32/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/vdso32/Makefile
b/arch/arm64/kernel/vdso32/Makefile
index 789ad420f16b..7812717f8b79 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64
m.org/rGcdd683b516d147925212724b09ec6fb792a40041
Link: https://reviews.llvm.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44
Link: https://lkml.kernel.org/r/20210312224132.3413602-3-ndesaulni...@google.com
Signed-off-by: Nick Desaulniers
Suggested-by: Nathan Chancellor
Acked-by: Peter Oberparleiter
Reviewed-by: N
en't had time to check this particular build!
Reviewed-by: Nick Desaulniers
Tested-by: Nick Desaulniers
> and my kvmalloc() conversion patch is in akpm/linux-next.
> I guess this should be folded into
>
> gcov: use kvmalloc()
>
> If desired, I can send a combined patch inst
ux/continuous-integration2/issues/118
> Reported-by: Arnd Bergmann
> Suggested-by: Arnd Bergmann
> Suggested-by: Jessica Clarke
> Signed-off-by: Nathan Chancellor
Great work tracking down that Debian was carrying patches! Thank you!
I've run this through the same 3 assemblers.
R
er from asm goto might help?
Then if there were side effects but you forgot to inform the compiler
that there were via an explicit volatile qualifier, and it performed
the suggested merge, oh well.
--
Thanks,
~Nick Desaulniers
On Thu, Apr 8, 2021 at 5:55 AM Zhao Xuehui wrote:
>
> The symbol 'HUF_compressWeights_wksp' is not used outside of
> huf_compress.c, so this commit marks it static.
Reviewed-by: Nick Desaulniers
Quite a few other functions are declared in a header, but I don't see
any
Cc: sta...@vger.kernel.org #5.4+
Reported-by: Prasad Sodagudi
Tested-by: Prasad Sodagudi
Signed-off-by: Nick Desaulniers
Reviewed-by: Nathan Chancellor
---
Changes V1 -> V2:
* Carried Nathan's reviewed-by tag.
* Rebased on mainline, as per Andrew.
* Left off patch 2/2 from the seri
me more cases using strncasecmp to check the entire string
> > > such as rtrs-clt-sysfs.c does. drivers/pnp/interface.c checks
> > > "disable" command with strncasecmp but it would also work if the
> > > command is "disable-wrong".
> > >
>
On Wed, Apr 7, 2021 at 12:07 PM Borislav Petkov wrote:
>
> On Wed, Apr 07, 2021 at 09:03:28PM +0200, Borislav Petkov wrote:
> > On Wed, Apr 07, 2021 at 10:41:26AM -0700, Nick Desaulniers wrote:
> > > You do have clang-tidy installed right? `which clang-tidy`?
>
> Btw,
On Wed, Apr 7, 2021 at 2:21 PM Andrew Morton wrote:
>
> On Wed, 7 Apr 2021 11:54:55 -0700 Nick Desaulniers
> wrote:
>
> > LLVM changed the expected function signature for
> > llvm_gcda_emit_function() in the clang-11 release. Users of clang-11 or
> > newer
err..with Marco's real email address this time
On Wed, Apr 7, 2021 at 1:14 PM Nick Desaulniers wrote:
>
> (replying to
> https://lore.kernel.org/lkml/ead0e9c32a2f70e0bde6f63b3b9470e0ef13d2ee.1616107969.git.andreyk...@google.com/)
>
> Just got the bounceback, RIP. :(
>
&
(replying to
https://lore.kernel.org/lkml/ead0e9c32a2f70e0bde6f63b3b9470e0ef13d2ee.1616107969.git.andreyk...@google.com/)
Just got the bounceback, RIP. :(
Marco is updating your epitaph.
Acked-by: Nick Desaulniers
> work even-if the input is "min-wrongcommand".
>
> I found some more cases using strncasecmp to check the entire string
> such as rtrs-clt-sysfs.c does. drivers/pnp/interface.c checks
> "disable" command with strncasecmp but it would also work if the
> comman
LLVM changed the expected function signatures for
llvm_gcda_emit_function() in the clang-11 release. Drop the older
implementations and require folks to upgrade their compiler if they're
interested in GCOV support.
Signed-off-by: Nick Desaulniers
---
kernel/gcov/clang.c
Cc: sta...@vger.kernel.org #5.4+
Reported-by: Prasad Sodagudi
Tested-by: Prasad Sodagudi
Signed-off-by: Nick Desaulniers
---
kernel/gcov/clang.c | 38 +-
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/kernel/gcov/clang.c b/kernel/gcov/clang.c
fo in
userspace.
Nick Desaulniers (2):
gcov: re-fix clang-11+ support
gcov: re-drop support for clang-10
kernel/gcov/clang.c | 20
1 file changed, 4 insertions(+), 16 deletions(-)
--
2.31.1.295.g9ea45b61b8-goog
On Wed, Apr 7, 2021 at 11:23 AM Arnd Bergmann wrote:
>
> On Wed, Apr 7, 2021 at 8:07 PM Nick Desaulniers
> wrote:
> >
> > On Wed, Apr 7, 2021 at 3:52 AM kernel test robot wrote:
> > >
> > > Hi Kees,
> > >
> > > FYI, the erro
/arm/include/asm/cpuidle.h defines
`CPUIDLE_METHOD_OF_DECLARE` to create a static struct in such a
section. Only arch/arm/mach-omap2/pm33xx-core.c uses that macro.
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
--
Thanks,
~Nick Desaulniers
gt;
> I get all kinds of missing python scripts:
> FileNotFoundError: [Errno 2] No such file or directory: 'clang-tidy'
You do have clang-tidy installed right? `which clang-tidy`?
--
Thanks,
~Nick Desaulniers
CK if
DEBUG_KERNEL to enable sysfs memblock debug")
Cc: Masahiro Yamada
Reported-by: Guenter Roeck
Signed-off-by: Nick Desaulniers
---
arch/mips/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e9893cd34992..702648f60e41 10
> If we have HOSTCXX why not have a CXX in toplevel Makefile?
>
> In "tools: Factor Clang, LLC and LLVM utils definitions" (see [3]) I
> did some factor-ing.
>
> For the records: Here Linus Git is my base.
>
> Ideas?
>
> Thanks.
>
> Regards,
> - Sedat -
>
> + if (!*s1 && *s2 == '\n' && !s2[1])
> + return true;
> + if (*s1 == '\n' && !s1[1] && !*s2)
> + return true;
> + return false;
> +}
> +EXPORT_SYMBOL(sysfs_streqcase);
This should be declared in
include/linux/string.h
in order for others to use this (as 0day bot notes).
> +
> /**
> * match_string - matches given string in an array
> * @array: array of strings
> --
> 2.25.1
>
--
Thanks,
~Nick Desaulniers
3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1325
Looks consistent to me with other callers of gpiod_add_lookup_table
from .init_machine callbacks.
Reviewed-by: Nick Desaulniers
> ---
> arch/arm/mach-o
nce this warning
> int irq;
>^
> = 0
> 1 warning generated.
Ooh, yeah if cpu_is_omap15xx() then irq is unused uninitialized; I
don't see any INT_1610_WAKE_UP_REQ-equlivalent for
INT_15XX_WAKE_UP_REQ.
Ok, LGTM.
Reviewed-by: Nick Desaulniers
receiving emails from it, send an
> email to clang-built-linux+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clang-built-linux/20210401160434.7655-1-maciej.falkowski9%40gmail.com.
--
Thanks,
~Nick Desaulniers
ed assembler, we do not check the
> > + # version here. It is the same as the clang
> > version, and
> > + # it has been already checked by
> > scripts/cc-version.sh.
> > + echo LLVM 0
> > + exit 0
> > + fi
> > + shift
> > + done
> > +}
> > +
> > +check_integrated_as "$@"
> > +
> > +orig_args="$@"
> > +
> > +# Get the first line of the --version output.
> > +IFS='
> > +'
> > +set -- $(LC_ALL=C "$@" -Wa,--version -c -x assembler /dev/null -o
> > /dev/null 2>&1)
> > +
> > +# Split the line on spaces.
> > +IFS=' '
> > +set -- $1
> > +
> > +min_tool_version=$(dirname $0)/min-tool-version.sh
> > +
> > +if [ "$1" = GNU -a "$2" = assembler ]; then
> > + shift $(($# - 1))
> > + version=$1
> > + min_version=$($min_tool_version binutils)
> > + name=GNU
> > +else
> > + echo "$orig_args: unknown assembler invoked" >&2
> > + exit 1
> > +fi
> > +
> > +# Some distributions append a package release number, as in 2.34-4.fc32
> > +# Trim the hyphen and any characters that follow.
> > +version=${version%-*}
> > +
> > +cversion=$(get_canonical_version $version)
> > +min_cversion=$(get_canonical_version $min_version)
> > +
> > +if [ "$cversion" -lt "$min_cversion" ]; then
> > + echo >&2 "***"
> > + echo >&2 "*** Assembler is too old."
> > + echo >&2 "*** Your $name assembler version:$version"
> > + echo >&2 "*** Minimum $name assembler version: $min_version"
> > + echo >&2 "***"
> > + exit 1
> > +fi
> > +
> > +echo $name $cversion
> > --
> > 2.27.0
> >
> > --
--
Thanks,
~Nick Desaulniers
s a fair but small amount of churn IMO; but if Jens
is not opposed it seems fine?
--
Thanks,
~Nick Desaulniers
/Makefile
> > index 7df3c0e4c52e..46f2465177f0 100644
> > --- a/scripts/kconfig/Makefile
> > +++ b/scripts/kconfig/Makefile
> > @@ -102,7 +102,8 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$@
> > $(srctree)/arch/$(SRCARCH)/c
> >
> > PHONY += tinyconfig
> > tinyconfig:
> > - $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
> > + $(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.config $(MAKE) -f
> > $(srctree)/Makefile allnoconfig
> > + $(Q)$(MAKE) -f $(srctree)/Makefile tiny.config
> >
> > # CHECK: -o cache_dir= working?
> > PHONY += testconfig
> > --
> > 2.27.0
> >
--
Thanks,
~Nick Desaulniers
DULE_SIG_SHA512
>
> -config MODULE_COMPRESS
The top level Makefile has comments and code that refer to this choice
which is now removed. I think you'll want to fix that up in this
change as well? Ah, patch 7 in the series does that:
https://lore.kernel.org/linux-kbuild/20210331133811.322154
On Wed, Mar 31, 2021 at 6:38 AM Masahiro Yamada wrote:
>
> This seems to be useful in sub-make as well. As a preparation of
> exporting it, rename extmod-prefix to extmod_prefix because exported
> variables cannot contain hyphens.
>
> Signed-off-by: Masahiro Yamada
Reviewed-by
bject code is identical before and after this change.
>
> No functional change. No change to object code.
Reviewed-by: Nick Desaulniers
Looks like this is from when this code was introduced in
commit 0d55ba46bfbe ("x86/cacheinfo: Move cacheinfo sysfs code to
generic infrastructure")
thou
1309
Signed-off-by: Nick Desaulniers
---
See:
https://lore.kernel.org/linux-arm-kernel/CAMj1kXE5uw4+zV3JVpfA2drOD5TZVMs5a_E5wrrnzjEYc=e...@mail.gmail.com/
for what I'd consider V1. The previous issues with .w suffixes have been
fixed or have fixes pending in LLVM:
* BL+DBG: https://reviews.l
On Fri, Jan 29, 2021 at 1:40 AM Ard Biesheuvel wrote:
>
> On Fri, 29 Jan 2021 at 01:22, Nick Desaulniers
> wrote:
> >
> > > On Thu, 28 Jan 2021 at 20:34, Nick Desaulniers
> > > wrote:
> > > > + TEST_RX("tbh[pc, r",7, (9f-(1f+4)
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/issues/1331
> Signed-off-by: Nathan Chancellor
Thanks for keeping this alive on clang-10, and resolving it for future
'int'.
>
> However, there is really no point in printing the number as a 16-bit
> 'short' rather than either an 8-bit or 32-bit number, so just change
> it to a normal %d.
Thanks for the patch!
Reviewed-by: Nick Desaulniers
>
> Fixes: de8f5e4f2dc1 ("lo
On Wed, Mar 24, 2021 at 2:12 AM Zhenyu Wang wrote:
>
> On 2021.03.23 15:15:29 -0700, Nick Desaulniers wrote:
> > On Fri, Mar 19, 2021 at 11:45 PM kernel test robot wrote:
> > >
> > > Hi Nick,
> > >
> > > FYI, the error/warning still remains.
>
b9 drm/i915/gvt: Introduce page
> table type of current level in GTT type enumerations
>
> :: TO: Zhi Wang
> :: CC: Zhenyu Wang
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
--
Thanks,
~Nick Desaulniers
if (mbi_phys_base == (phys_addr_t)OF_BAD_ADDR) {
> ret = -ENXIO;
> goto err_free_mbi;
> }
> --
> 2.29.2
>
--
Thanks,
~Nick Desaulniers
Integrity (CFI) checking.
>
> Instead of removing the consts, this change defines the
> list_cmp_func_t type and changes the comparison function types of
> all list_sort() callers to use const pointers, thus avoiding type
> mismatches.
>
> Suggested-by: Nick Desaulniers
> Signed-off
it grep -l --threads=3 ae46578b963f
$
Should it have found a7889c6320b9 and 773e0c402534? Perhaps `git log
--grep=` should be used instead? I thought `git grep` only greps
files in the archive, not commit history?
--
Thanks,
~Nick Desaulniers
On Tue, Mar 23, 2021 at 6:56 AM Greg Kroah-Hartman
wrote:
>
> On Tue, Mar 16, 2021 at 02:31:33PM -0700, Nick Desaulniers wrote:
> > A common recurring mistake made when backporting patches to stable is
> > forgetting to check for additional commits tagged with `Fixes:`. This
&g
imit clang regression testing to x86, arm, powerpc, s390, mips,
> riscv
> and arc.
We definitely cannot yet build arc.
$ cmake ... -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="ARC"
$ ARCH=arc CROSS_COMPILE=arc-linux-gnu- make LLVM=1 -j72 defconfig vmlinux
...
clang-13: error: unknown argument: '-mmedium-calls'
clang-13: error: unknown argument: '-fsection-anchors'
clang-13: error: unknown argument: '-mlock'
clang-13: error: unknown argument: '-mswape'
clang-13: error: unknown argument: '-mno-sdata'
clang-13: error: unknown argument: '-fcall-used-gp'
--
Thanks,
~Nick Desaulniers
github.com/ClangBuiltLinux/linux/issues/1057
Suggested-by: Peter Collingbourne
Signed-off-by: Nick Desaulniers
---
Makefile | 2 +-
scripts/tools-support-relr.sh | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 5160ff8903c1..47
t; +* With CONFIG_CFI_CLANG, we assume __cfi_check is at the beginning
> +* of the .text section, and is aligned to PAGE_SIZE.
> +*/
> + .text : ALIGN_CFI {
> + *(.text.__cfi_check)
> + *(.text .text.[0-9a-zA-Z_]* .text..L.cfi*)
> + }
> }
>
> /* bring in arch-specific sections */
> --
> 2.31.0.291.g576ba9dcdaf-goog
>
--
Thanks,
~Nick Desaulniers
syms_expand_symbol(get_symbol_offset(pos),
>name, KSYM_NAME_LEN);
> modname[0] = '\0';
> - return 0;
> + goto found;
> }
> /* See if it's in a module. */
> - return lookup_module_symbol_attrs(addr, size, offset, modname, name);
> + res = lookup_module_symbol_attrs(addr, size, offset, modname, name);
> + if (res)
> + return res;
> +
> +found:
> + cleanup_symbol_name(name);
> + return 0;
> }
>
> /* Look up a kernel symbol and return it in a text buffer. */
> --
> 2.31.0.291.g576ba9dcdaf-goog
>
--
Thanks,
~Nick Desaulniers
N_ON_ONCE(timer->function != delayed_work_timer_fn);
> + WARN_ON_FUNCTION_MISMATCH(timer->function, delayed_work_timer_fn);
> WARN_ON_ONCE(timer_pending(timer));
> WARN_ON_ONCE(!list_empty(&work->entry));
>
> --
> 2.31.0.291.g576ba9dcdaf-goog
>
--
Thanks,
~Nick Desaulniers
On Thu, Mar 18, 2021 at 11:43 AM Nick Desaulniers
wrote:
>
> On Thu, Mar 18, 2021 at 10:11 AM Sami Tolvanen
> wrote:
> >
> > To ensure we take the actual address of a function in kernel text, use
> > __va_function. Otherwise, with CONFIG_CFI_CLANG, the compiler repl
unconst + PAGE_SIZE)) {
> pr_warn("copy_to_user failed, but lacked Oops\n");
> goto free_user;
> --
> 2.31.0.291.g576ba9dcdaf-goog
>
--
Thanks,
~Nick Desaulniers
> }
> /* The final merge, rebuilding prev links */
> - merge_final(priv, (cmp_func)cmp, head, pending, list);
> + merge_final(priv, cmp, head, pending, list);
> }
> EXPORT_SYMBOL(list_sort);
> --
> 2.31.0.291.g576ba9dcdaf-goog
>
--
Thanks,
~Nick Desaulniers
hat's the minimum supported version of
clang for the kernel, and this series depends on LTO which depends on
clang-12, so no additional guards are necessary).
Reviewed-by: Nick Desaulniers
> ---
> include/linux/compiler-clang.h | 1 +
> include/linux/compiler_types.h | 4
>
(Replying to
https://lore.kernel.org/linux-s390/ca+g9fytbw0hav5ooayck2rz_m2sj73krxpj0idzt+o8qtc1...@mail.gmail.com/)
Yeah, our CI is failing today, too with the same error on linux-next:
https://github.com/ClangBuiltLinux/continuous-integration2/runs/2138006304?check_suite_focus=true
e
Oops, let me fixup the commit message and retry.
$ git commit --amend
$ ./scripts/stable/check_backports.py
Checking 2 local commits for additional Fixes: in master
$ echo $?
0
This allows for client side validation by the backports author, and
server side validation by the stable kernel maintain
rnel.org/lkml/202103160133.uzhgy0wt-...@intel.com
> Fixes: 34dc2efb39a2 ("memblock: fix section mismatch warning")
> Signed-off-by: Mike Rapoport
> Reported-by: kernel test robot
> Reviewed-by: Arnd Bergmann
Thank you Mike.
Acked-by: Nick Desaulniers
> ---
>
> @A
direction.
> */
> -static inline __init bool memblock_bottom_up(void)
> +static inline __init_memblock bool memblock_bottom_up(void)
> {
> return memblock.bottom_up;
> }
>
>
> --
> Sincerely yours,
> Mike.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clang-built-linux+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clang-built-linux/YFBYWjtWJrnGyiVp%40linux.ibm.com.
--
Thanks,
~Nick Desaulniers
C code is as follows:
>
> - gcc + gnu as -> requires gcc 5.0+ (but 7.0+ for full support)
> - clang + gnu as-> requires binutils 2.35.2+
> - clang + integrated as -> OK
>
> Signed-off-by: Masahiro Yamada
> Reviewed-by: Nathan Chancellor
Revi
d-by: Andy Shevchenko
Signed-off-by: Nick Desaulniers
---
Changes V2 -> V3:
* change to kmalloc+memset to fix logic error, as per Andy.
Changes V1 -> V2:
* rebased on mainline.
sound/soc/intel/skylake/skl-topology.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff -
Fixes:
sound/soc/intel/skylake/skl-topology.c:3613:13: warning: stack frame
size of 1304 bytes in function 'skl_tplg_complete'
[-Wframe-larger-than=]
struct snd_ctl_elem_value is 1224 bytes in my configuration.
Heap allocate it, then free it within the current frame.
Signed-of
Fixes:
sound/soc/intel/skylake/skl-topology.c:3613:13: warning: stack frame
size of 1304 bytes in function 'skl_tplg_complete'
[-Wframe-larger-than=]
struct snd_ctl_elem_value is 1224 bytes in my configuration.
Heap allocate it, then free it within the current frame.
Signed-of
m.org/rGcdd683b516d147925212724b09ec6fb792a40041
Link: https://reviews.llvm.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44
Suggested-by: Nathan Chancellor
Signed-off-by: Nick Desaulniers
---
For an easier time reviewing this series, reviewers may want to apply
these patches, then check the overall diff with `git diff o
athan Chancellor
Reviewed-by: Fangrui Song
Signed-off-by: Nick Desaulniers
Tested-by: Nathan Chancellor
---
Changes V1 -> V2:
* Use CONFIG_CLANG_VERSION instead of __clang_major__.
* Pick up and retain Suggested-by, Tested-by, and Reviewed-by tags.
* Drop note from commit message about `git b
m.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44
Nick Desaulniers (2):
gcov: fix clang-11+ support
gcov: clang: drop support for clang-10 and older
kernel/gcov/Kconfig | 1 +
kernel/gcov/clang.c | 32
2 files changed, 9 insertions(+), 24 deletions(-)
base-c
)*10 = 10)
How come LLVM doesn't default to 10.2 format, if it can optionally
produce it? We might be able to reuse more code in the kernel between
the two impelementations, though I expect the symbols the runtime is
expected to provide will still differ. Seeing the `B` in `B02*` is
also curious.
Thanks for the review, will include your tag in v2.
--
Thanks,
~Nick Desaulniers
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 AM Nathan Chancellor
> > wrote:
> > >
> > > On Fri, Mar 12, 2021 at 11:21:39AM -0800, Nick Des
On Fri, Mar 12, 2021 at 9:55 AM Nick Desaulniers
wrote:
>
> On Thu, Mar 11, 2021 at 5:09 PM Nick Desaulniers
> wrote:
> >
> > -Wframe-larger-than= requires stack frame information, which the
> > frontend cannot provide. This diagnostic is emitted late during
> >
On Fri, Mar 12, 2021 at 12:14 PM 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_
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_gcda_start_file()
> > and llvm_gcda_emit_function() in the clang-11 release. Users of cla
n the user's environment.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=212105
> Reported-by: Marco Scardovi
> Signed-off-by: Masahiro Yamada
Recensito-Da: Nick Desaulniers
In realtà non parlo italiano, ma so come usare Google Translate.
> ---
>
> scripts/ld-versi
m.org/rGcdd683b516d147925212724b09ec6fb792a40041
Link: https://reviews.llvm.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44
Cc: Fangrui Song
Reported-by: Prasad Sodagudi
Signed-off-by: Nick Desaulniers
---
kernel/gcov/clang.c | 69 +
1 file changed, 69 insertions(+)
diff --git a/kernel
On Thu, Mar 11, 2021 at 5:09 PM Nick Desaulniers
wrote:
>
> -Wframe-larger-than= requires stack frame information, which the
> frontend cannot provide. This diagnostic is emitted late during
> compilation once stack frame size is available.
>
> When building with LTO, the fronte
mpiler version guard or revert this based on the minimum
support version of Clang.
The error message is not generated during link:
LTO vmlinux.o
ld.lld: warning: stack size limit exceeded (8224) in foobarbaz
Cc: Sami Tolvanen
Reported-by: Candle Sun
Suggested-by: Fangrui Song
Signed-off-
om/ClangBuiltLinux/linux/issues/732
> Link:
> https://github.com/llvm/llvm-project/commit/48aebfc908ba7b9372aaa478a9c200789491096e
> Suggested-by: Nick Desaulniers
> Signed-off-by: Nathan Chancellor
Thanks for the patch. We discussed at the kernelCI meeting yesterday
and the clangb
e gets created that prevents the function
> from being garbage-collected unless that other option is removed
> as well?
I wish the linker had a debug flag that could let developers discover
the decisions it made during --gc-sections as to why certain symbols
were retained/kept or not.
--
Thanks,
~Nick Desaulniers
On Fri, Mar 5, 2021 at 3:51 PM Nick Desaulniers wrote:
>
> (in response to
> https://lore.kernel.org/linux-arm-kernel/20210303170932.1838634-1-jthie...@redhat.com/
> from the command line)
>
> > Changes since v1[2]:
> > - Drop gcc plugin in favor of -fno-jump-tables
config with LLVM=1 with this series applied.
Tested-by: Nick Desaulniers
One thing I noticed was a spew of warnings for allmodconfig, like:
init/main.o: warning: objtool: asan.module_ctor()+0xc: call without frame
pointer save/setup
init/main.o: warning: objtool: asan.module_dtor()+0xc: call w
+ # by scripts/cc-version.sh.
> + echo LLVM 0
> + exit 0
> +fi
> +
> +# Split the line on spaces.
> +IFS=' '
> +set -- $line
> +
> +tool_version=$(dirname $0)/tool-version.sh
> +
> +if [ "$1" = GNU -a "$2" = assembler ]; then
> + shift $(($# - 1))
> + version=$1
> + min_version=$($tool_version binutils)
> + name=GNU
> +else
> + echo "$orig_args: unknown assembler invoked" >&2
> + exit 1
> +fi
> +
> +# Some distributions append a package release number, as in 2.34-4.fc32
> +# Trim the hyphen and any characters that follow.
> +version=${version%-*}
> +
> +cversion=$(get_canonical_version $version)
> +min_cversion=$(get_canonical_version $min_version)
> +
> +if [ "$cversion" -lt "$min_cversion" ]; then
> + echo >&2 "***"
> + echo >&2 "*** Assembler is too old."
> + echo >&2 "*** Your $name assembler version:$version"
> + echo >&2 "*** Minimum $name assembler version: $min_version"
> + echo >&2 "***"
> + exit 1
> +fi
> +
> +echo $name $cversion
> --
> 2.27.0
>
--
Thanks,
~Nick Desaulniers
ux/compiler.h:246:
prevent_tail_call_optimization
commit a9a3ed1eff36 ("x86: Fix early boot crash on gcc-10, third try")
>
> Perhaps we can ask the toolchain folks to help add such an attribute. Or
> maybe the feature already exists somewhere, but hidden.
>
> +Cc linux-toolcha...@vger.kernel.org
>
> > > But I'm also not sure if with all that we'd be guaranteed the code we
> > > want, even though in practice it might.
> >
> > True! I'd just like to be on the least dodgy ground we can be.
>
> It's been dodgy for a while, and I'd welcome any low-cost fixes to make
> it less dodgy in the short-term at least. :-)
>
> Thanks,
> -- Marco
--
Thanks,
~Nick Desaulniers
O32 for MIPS64 due to lack of
> resources".
It's my hope we will fix the resourcing issue. I'm working on that;
it's a non-technical challenge though.
Acked-by: Nick Desaulniers
>
> It is not a good idea to remove CONFIG_MIPS32_O32=y directly
> in defconfig because
983 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -36,6 +36,7 @@
> #include
>
> #include
> +#include
This hunk of the patch is curious. I assume that bitops.h is needed
for fls(); if so, why not #include it in kernel/sched/fair.c?
Otherwise this potentially hurts compile time for all TUs that include
kernel/sched/sched.h.
> #include
> #include
> #include
> --
> 2.30.1.766.gb4fecdf3b7-goog
>
--
Thanks,
~Nick Desaulniers
ends on $(success,test $(LLVM) -eq 1)
IIRC, we needed some other LLVM utilities like llvm-nm and llvm-ar,
which are checked below. So I guess we can still support CC=clang
AR=llvm-ar NM=llvm-nm, and this check is redundant.
> depends on $(success,test $(LLVM_IAS) -eq 1)
> depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
> depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
> --
> 2.27.0
>
--
Thanks,
~Nick Desaulniers
1 - 100 of 1001 matches
Mail list logo