Merge branch 'linus' into locking/kcsan, to pick up fixes

Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar
2020-03-21 09:35:44 +01:00
906 changed files with 8781 additions and 4423 deletions
+3 -5
View File
@@ -767,8 +767,7 @@ config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
bool
config CC_HAS_INT128
def_bool y
depends on !$(cc-option,-D__SIZEOF_INT128__=0)
def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
#
# For architectures that know their GCC __int128 support is sound
@@ -1226,13 +1225,12 @@ endif
config BOOT_CONFIG
bool "Boot config support"
depends on BLK_DEV_INITRD
default y
select BLK_DEV_INITRD
help
Extra boot config allows system admin to pass a config file as
complemental extension of kernel cmdline when booting.
The boot config file must be attached at the end of initramfs
with checksum and size.
with checksum, size and magic word.
See <file:Documentation/admin-guide/bootconfig.rst> for details.
If unsure, say Y.
+22 -16
View File
@@ -269,7 +269,6 @@ static int __init xbc_snprint_cmdline(char *buf, size_t size,
{
struct xbc_node *knode, *vnode;
char *end = buf + size;
char c = '\"';
const char *val;
int ret;
@@ -280,25 +279,20 @@ static int __init xbc_snprint_cmdline(char *buf, size_t size,
return ret;
vnode = xbc_node_get_child(knode);
ret = snprintf(buf, rest(buf, end), "%s%c", xbc_namebuf,
vnode ? '=' : ' ');
if (ret < 0)
return ret;
buf += ret;
if (!vnode)
if (!vnode) {
ret = snprintf(buf, rest(buf, end), "%s ", xbc_namebuf);
if (ret < 0)
return ret;
buf += ret;
continue;
c = '\"';
}
xbc_array_for_each_value(vnode, val) {
ret = snprintf(buf, rest(buf, end), "%c%s", c, val);
ret = snprintf(buf, rest(buf, end), "%s=\"%s\" ",
xbc_namebuf, val);
if (ret < 0)
return ret;
buf += ret;
c = ',';
}
if (rest(buf, end) > 2)
strcpy(buf, "\" ");
buf += 2;
}
return buf - (end - size);
@@ -336,7 +330,7 @@ static char * __init xbc_make_cmdline(const char *key)
return new_cmdline;
}
u32 boot_config_checksum(unsigned char *p, u32 size)
static u32 boot_config_checksum(unsigned char *p, u32 size)
{
u32 ret = 0;
@@ -375,7 +369,11 @@ static void __init setup_boot_config(const char *cmdline)
if (!initrd_end)
goto not_found;
hdr = (u32 *)(initrd_end - 8);
data = (char *)initrd_end - BOOTCONFIG_MAGIC_LEN;
if (memcmp(data, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN))
goto not_found;
hdr = (u32 *)(data - 8);
size = hdr[0];
csum = hdr[1];
@@ -419,6 +417,14 @@ not_found:
}
#else
#define setup_boot_config(cmdline) do { } while (0)
static int __init warn_bootconfig(char *str)
{
pr_warn("WARNING: 'bootconfig' found on the kernel command line but CONFIG_BOOTCONFIG is not set.\n");
return 0;
}
early_param("bootconfig", warn_bootconfig);
#endif
/* Change NUL term back to "=", to make "param" the whole string. */