Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Cross-merge bpf fixes after downstream PR. No conflicts. Adjacent changes in: include/linux/bpf.h include/uapi/linux/bpf.h kernel/bpf/btf.c kernel/bpf/helpers.c kernel/bpf/syscall.c kernel/bpf/verifier.c kernel/trace/bpf_trace.c mm/slab_common.c tools/include/uapi/linux/bpf.h tools/testing/selftests/bpf/Makefile Link: https://lore.kernel.org/all/20241024215724.60017-1-daniel@iogearbox.net/ Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
@@ -65,6 +65,9 @@ cc-option-bit = $(if-success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null,$
|
||||
m32-flag := $(cc-option-bit,-m32)
|
||||
m64-flag := $(cc-option-bit,-m64)
|
||||
|
||||
rustc-version := $(shell,$(srctree)/scripts/rustc-version.sh $(RUSTC))
|
||||
rustc-llvm-version := $(shell,$(srctree)/scripts/rustc-llvm-version.sh $(RUSTC))
|
||||
|
||||
# $(rustc-option,<flag>)
|
||||
# Return y if the Rust compiler supports <flag>, n otherwise
|
||||
# Calls to this should be guarded so that they are not evaluated if
|
||||
|
||||
@@ -53,13 +53,11 @@ cc-option = $(call __cc-option, $(CC),\
|
||||
|
||||
# cc-option-yn
|
||||
# Usage: flag := $(call cc-option-yn,-march=winchip-c6)
|
||||
cc-option-yn = $(call try-run,\
|
||||
$(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n)
|
||||
cc-option-yn = $(if $(call cc-option,$1),y,n)
|
||||
|
||||
# cc-disable-warning
|
||||
# Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
|
||||
cc-disable-warning = $(call try-run,\
|
||||
$(CC) -Werror $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
|
||||
cc-disable-warning = $(if $(call cc-option,-W$(strip $1)),-Wno-$(strip $1))
|
||||
|
||||
# gcc-min-version
|
||||
# Usage: cflags-$(call gcc-min-version, 70100) += -foo
|
||||
@@ -75,8 +73,11 @@ ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3))
|
||||
|
||||
# __rustc-option
|
||||
# Usage: MY_RUSTFLAGS += $(call __rustc-option,$(RUSTC),$(MY_RUSTFLAGS),-Cinstrument-coverage,-Zinstrument-coverage)
|
||||
# TODO: remove RUSTC_BOOTSTRAP=1 when we raise the minimum GNU Make version to 4.4
|
||||
__rustc-option = $(call try-run,\
|
||||
$(1) $(2) $(3) --crate-type=rlib /dev/null --out-dir=$$TMPOUT -o "$$TMP",$(3),$(4))
|
||||
echo '#![allow(missing_docs)]#![feature(no_core)]#![no_core]' | RUSTC_BOOTSTRAP=1\
|
||||
$(1) --sysroot=/dev/null $(filter-out --sysroot=/dev/null,$(2)) $(3)\
|
||||
--crate-type=rlib --out-dir=$(TMPOUT) --emit=obj=- - >/dev/null,$(3),$(4))
|
||||
|
||||
# rustc-option
|
||||
# Usage: rustflags-y += $(call rustc-option,-Cinstrument-coverage,-Zinstrument-coverage)
|
||||
@@ -85,5 +86,4 @@ rustc-option = $(call __rustc-option, $(RUSTC),\
|
||||
|
||||
# rustc-option-yn
|
||||
# Usage: flag := $(call rustc-option-yn,-Cinstrument-coverage)
|
||||
rustc-option-yn = $(call try-run,\
|
||||
$(RUSTC) $(KBUILD_RUSTFLAGS) $(1) --crate-type=rlib /dev/null --out-dir=$$TMPOUT -o "$$TMP",y,n)
|
||||
rustc-option-yn = $(if $(call rustc-option,$1),y,n)
|
||||
|
||||
@@ -34,12 +34,14 @@ $(obj)/dtbs-list: $(dtb-y) FORCE
|
||||
# Assembly file to wrap dtb(o)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
builtin-dtb-section = $(if $(filter arch/$(SRCARCH)/boot/dts%, $(obj)),.dtb.init.rodata,.rodata)
|
||||
|
||||
# Generate an assembly file to wrap the output of the device tree compiler
|
||||
quiet_cmd_wrap_S_dtb = WRAP $@
|
||||
cmd_wrap_S_dtb = { \
|
||||
symbase=__$(patsubst .%,%,$(suffix $<))_$(subst -,_,$(notdir $*)); \
|
||||
echo '\#include <asm-generic/vmlinux.lds.h>'; \
|
||||
echo '.section .dtb.init.rodata,"a"'; \
|
||||
echo '.section $(builtin-dtb-section),"a"'; \
|
||||
echo '.balign STRUCT_ALIGNMENT'; \
|
||||
echo ".global $${symbase}_begin"; \
|
||||
echo "$${symbase}_begin:"; \
|
||||
|
||||
@@ -127,6 +127,36 @@ static inline void list_del(struct list_head *entry)
|
||||
entry->prev = LIST_POISON2;
|
||||
}
|
||||
|
||||
/**
|
||||
* list_replace - replace old entry by new one
|
||||
* @old : the element to be replaced
|
||||
* @new : the new element to insert
|
||||
*
|
||||
* If @old was empty, it will be overwritten.
|
||||
*/
|
||||
static inline void list_replace(struct list_head *old,
|
||||
struct list_head *new)
|
||||
{
|
||||
new->next = old->next;
|
||||
new->next->prev = new;
|
||||
new->prev = old->prev;
|
||||
new->prev->next = new;
|
||||
}
|
||||
|
||||
/**
|
||||
* list_replace_init - replace old entry by new one and initialize the old one
|
||||
* @old : the element to be replaced
|
||||
* @new : the new element to insert
|
||||
*
|
||||
* If @old was empty, it will be overwritten.
|
||||
*/
|
||||
static inline void list_replace_init(struct list_head *old,
|
||||
struct list_head *new)
|
||||
{
|
||||
list_replace(old, new);
|
||||
INIT_LIST_HEAD(old);
|
||||
}
|
||||
|
||||
/**
|
||||
* list_move - delete from one list and add as another's head
|
||||
* @list: the entry to move
|
||||
@@ -150,6 +180,26 @@ static inline void list_move_tail(struct list_head *list,
|
||||
list_add_tail(list, head);
|
||||
}
|
||||
|
||||
/**
|
||||
* list_is_first -- tests whether @list is the first entry in list @head
|
||||
* @list: the entry to test
|
||||
* @head: the head of the list
|
||||
*/
|
||||
static inline int list_is_first(const struct list_head *list, const struct list_head *head)
|
||||
{
|
||||
return list->prev == head;
|
||||
}
|
||||
|
||||
/**
|
||||
* list_is_last - tests whether @list is the last entry in list @head
|
||||
* @list: the entry to test
|
||||
* @head: the head of the list
|
||||
*/
|
||||
static inline int list_is_last(const struct list_head *list, const struct list_head *head)
|
||||
{
|
||||
return list->next == head;
|
||||
}
|
||||
|
||||
/**
|
||||
* list_is_head - tests whether @list is the list @head
|
||||
* @list: the entry to test
|
||||
|
||||
@@ -47,6 +47,7 @@ static struct expr *expr_lookup(enum expr_type type, void *l, void *r)
|
||||
e->type = type;
|
||||
e->left._initdata = l;
|
||||
e->right._initdata = r;
|
||||
e->val_is_valid = false;
|
||||
|
||||
hash_add(expr_hashtable, &e->node, hash);
|
||||
|
||||
|
||||
@@ -159,8 +159,14 @@ config_stmt: config_entry_start config_option_list
|
||||
yynerrs++;
|
||||
}
|
||||
|
||||
list_add_tail(¤t_entry->sym->choice_link,
|
||||
¤t_choice->choice_members);
|
||||
/*
|
||||
* If the same symbol appears twice in a choice block, the list
|
||||
* node would be added twice, leading to a broken linked list.
|
||||
* list_empty() ensures that this symbol has not yet added.
|
||||
*/
|
||||
if (list_empty(¤t_entry->sym->choice_link))
|
||||
list_add_tail(¤t_entry->sym->choice_link,
|
||||
¤t_choice->choice_members);
|
||||
}
|
||||
|
||||
printd(DEBUG_PARSE, "%s:%d:endconfig\n", cur_filename, cur_lineno);
|
||||
|
||||
@@ -1166,7 +1166,7 @@ void ConfigInfoView::clicked(const QUrl &url)
|
||||
{
|
||||
QByteArray str = url.toEncoded();
|
||||
const std::size_t count = str.size();
|
||||
char *data = new char[count + 1];
|
||||
char *data = new char[count + 2]; // '$' + '\0'
|
||||
struct symbol **result;
|
||||
struct menu *m = NULL;
|
||||
|
||||
@@ -1505,6 +1505,8 @@ ConfigMainWindow::ConfigMainWindow(void)
|
||||
connect(helpText, &ConfigInfoView::menuSelected,
|
||||
this, &ConfigMainWindow::setMenuLink);
|
||||
|
||||
conf_read(NULL);
|
||||
|
||||
QString listMode = configSettings->value("/listMode", "symbol").toString();
|
||||
if (listMode == "single")
|
||||
showSingleView();
|
||||
@@ -1906,8 +1908,6 @@ int main(int ac, char** av)
|
||||
configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit()));
|
||||
configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings()));
|
||||
|
||||
conf_read(NULL);
|
||||
|
||||
v->show();
|
||||
configApp->exec();
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ install_linux_image () {
|
||||
|
||||
mkdir -p "${pdir}/DEBIAN"
|
||||
cat <<-EOF > "${pdir}/DEBIAN/${script}"
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
22
scripts/rustc-llvm-version.sh
Executable file
22
scripts/rustc-llvm-version.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# Usage: $ ./rustc-llvm-version.sh rustc
|
||||
#
|
||||
# Print the LLVM version that the Rust compiler uses in a 6 digit form.
|
||||
|
||||
# Convert the version string x.y.z to a canonical up-to-6-digits form.
|
||||
get_canonical_version()
|
||||
{
|
||||
IFS=.
|
||||
set -- $1
|
||||
echo $((10000 * $1 + 100 * $2 + $3))
|
||||
}
|
||||
|
||||
if output=$("$@" --version --verbose 2>/dev/null | grep LLVM); then
|
||||
set -- $output
|
||||
get_canonical_version $3
|
||||
else
|
||||
echo 0
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user