diff options
| -rw-r--r-- | lib-vsprintf-add-pap-padp-options.patch | 33 | ||||
| -rw-r--r-- | lib-vsprintf-additional-kernel-pointer-filtering-options.patch | 52 | ||||
| -rw-r--r-- | lib-vsprintf-default-kptr_restrict-to-the-maximum-value.patch | 2 | ||||
| -rw-r--r-- | lib-vsprintf-physical-address-kernel-pointer-filtering-options.patch | 14 | ||||
| -rw-r--r-- | lib-vsprintf-whitelist-stack-traces.patch | 4 | ||||
| -rw-r--r-- | pci_groups.patch | 2 | ||||
| -rw-r--r-- | series | 12 |
7 files changed, 72 insertions, 47 deletions
diff --git a/lib-vsprintf-add-pap-padp-options.patch b/lib-vsprintf-add-pap-padp-options.patch index 5c7a20e5cbb046..f33d647d199063 100644 --- a/lib-vsprintf-add-pap-padp-options.patch +++ b/lib-vsprintf-add-pap-padp-options.patch @@ -15,34 +15,37 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt -@@ -82,18 +82,20 @@ Struct Resources: +@@ -108,21 +108,23 @@ Physical addresses types ``phys_addr_t`` - Physical addresses types phys_addr_t: + :: - %pa[p] 0x01234567 or 0x0123456789abcdef + %pa[p][P] 0x01234567 or 0x0123456789abcdef - For printing a phys_addr_t type (and its derivatives, such as - resource_size_t) which can vary based on build options, regardless of -- the width of the CPU data path. Passed by reference. -+ the width of the CPU data path. Passed by reference. Use the trailing -+ 'P' if it needs to be always shown. + For printing a ``phys_addr_t`` type (and its derivatives, such as + ``resource_size_t``) which can vary based on build options, regardless of +-the width of the CPU data path. Passed by reference. ++the width of the CPU data path. Passed by reference. Use the trailing ++'P' if it needs to be always shown. - DMA addresses types dma_addr_t: + DMA addresses types ``dma_addr_t`` + ================================== + + :: - %pad 0x01234567 or 0x0123456789abcdef + %pad[P] 0x01234567 or 0x0123456789abcdef - For printing a dma_addr_t type which can vary based on build options, -- regardless of the width of the CPU data path. Passed by reference. -+ regardless of the width of the CPU data path. Passed by reference. Use -+ the trailing 'P' if it needs to be always shown. - - Raw buffer as an escaped string: + For printing a ``dma_addr_t`` type which can vary based on build options, +-regardless of the width of the CPU data path. Passed by reference. ++regardless of the width of the CPU data path. Passed by reference. Use ++the trailing 'P' if it needs to be always shown. + Raw buffer as an escaped string + =============================== --- a/lib/vsprintf.c +++ b/lib/vsprintf.c -@@ -1394,23 +1394,29 @@ static noinline_for_stack +@@ -1395,23 +1395,29 @@ static noinline_for_stack char *address_val(char *buf, char *end, const void *addr, const char *fmt) { unsigned long long num; diff --git a/lib-vsprintf-additional-kernel-pointer-filtering-options.patch b/lib-vsprintf-additional-kernel-pointer-filtering-options.patch index b35ed748cf6f11..0b6bbf6e2e4e52 100644 --- a/lib-vsprintf-additional-kernel-pointer-filtering-options.patch +++ b/lib-vsprintf-additional-kernel-pointer-filtering-options.patch @@ -19,23 +19,23 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Documentation/printk-formats.txt | 5 ++ Documentation/sysctl/kernel.txt | 3 + kernel/sysctl.c | 3 - - lib/vsprintf.c | 81 +++++++++++++++++++++++++-------------- - 4 files changed, 63 insertions(+), 29 deletions(-) + lib/vsprintf.c | 90 +++++++++++++++++++++++++-------------- + 4 files changed, 68 insertions(+), 33 deletions(-) --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt -@@ -64,6 +64,11 @@ Kernel Pointers: - users. The behaviour of %pK depends on the kptr_restrict sysctl - see - Documentation/sysctl/kernel.txt for more details. +@@ -84,6 +84,11 @@ For printing kernel pointers which shoul + users. The behaviour of ``%pK`` depends on the ``kptr_restrict sysctl`` - see + Documentation/sysctl/kernel.txt for more details. + %pP 0x01234567 or 0x0123456789abcdef + -+ For printing kernel pointers which should always be shown, even to -+ unprivileged users. ++For printing kernel pointers which should always be shown, even to ++unprivileged users. + - Struct Resources: + Struct Resources + ================ - %pr [mem 0x60000000-0x6fffffff flags 0x2200] or --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt @@ -392,6 +392,9 @@ values to unprivileged users is a concer @@ -58,7 +58,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> static int ten_thousand = 10000; #endif #ifdef CONFIG_PERF_EVENTS -@@ -830,7 +831,7 @@ static struct ctl_table kern_table[] = { +@@ -851,7 +852,7 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = proc_dointvec_minmax_sysadmin, .extra1 = &zero, @@ -69,7 +69,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> { --- a/lib/vsprintf.c +++ b/lib/vsprintf.c -@@ -395,6 +395,16 @@ struct printf_spec { +@@ -396,6 +396,16 @@ struct printf_spec { #define FIELD_WIDTH_MAX ((1 << 23) - 1) #define PRECISION_MAX ((1 << 15) - 1) @@ -86,8 +86,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> static noinline_for_stack char *number(char *buf, char *end, unsigned long long num, struct printf_spec spec) -@@ -1470,8 +1480,6 @@ char *flags_string(char *buf, char *end, - return format_flags(buf, end, flags, names); +@@ -1591,8 +1601,6 @@ char *device_node_string(char *buf, char + return widen_string(buf, buf - buf_start, end, spec); } -int kptr_restrict __read_mostly; @@ -95,7 +95,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> /* * Show a '%p' thing. A kernel extension is that the '%p' is followed * by an extra set of alphanumeric characters that are extended format -@@ -1543,6 +1551,7 @@ int kptr_restrict __read_mostly; +@@ -1664,6 +1672,7 @@ int kptr_restrict __read_mostly; * Do not use this feature without some mechanism to verify the * correctness of the format string and va_list arguments. * - 'K' For a kernel pointer that should be hidden from unprivileged users @@ -103,7 +103,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> * - 'NF' For a netdev_features_t * - 'h[CDN]' For a variable-length buffer, it prints it as a hex string with * a certain separator (' ' by default): -@@ -1572,6 +1581,9 @@ int kptr_restrict __read_mostly; +@@ -1703,6 +1712,9 @@ int kptr_restrict __read_mostly; * Note: The difference between 'S' and 'F' is that on ia64 and ppc64 * function pointers are really function descriptors, which contain a * pointer to the real address. @@ -113,7 +113,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> */ static noinline_for_stack char *pointer(const char *fmt, char *buf, char *end, void *ptr, -@@ -1579,7 +1591,7 @@ char *pointer(const char *fmt, char *buf +@@ -1710,7 +1722,7 @@ char *pointer(const char *fmt, char *buf { const int default_width = 2 * sizeof(void *); @@ -122,7 +122,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> /* * Print (null) with the same width as a pointer so it makes * tabular output look nice. -@@ -1660,10 +1672,43 @@ char *pointer(const char *fmt, char *buf +@@ -1791,10 +1803,48 @@ char *pointer(const char *fmt, char *buf va_end(va); return buf; } @@ -145,6 +145,11 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + + case 'G': + return flags_string(buf, end, ptr, fmt); ++ case 'O': ++ switch (fmt[1]) { ++ case 'F': ++ return device_node_string(buf, end, ptr, spec, fmt + 1); ++ } + case 'P': + /* + * an explicitly whitelisted kernel pointer should never be @@ -167,7 +172,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> break; case 1: { const struct cred *cred; -@@ -1682,7 +1727,7 @@ char *pointer(const char *fmt, char *buf +@@ -1813,7 +1863,7 @@ char *pointer(const char *fmt, char *buf * Only print the real pointer value if the current * process has CAP_SYSLOG and is running with the * same credentials it started with. This is because @@ -176,7 +181,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> * checks permission at read() time. We don't want to * leak pointer values if a binary opens a file using * %pK and then elevates privileges before reading it. -@@ -1694,33 +1739,13 @@ char *pointer(const char *fmt, char *buf +@@ -1825,38 +1875,14 @@ char *pointer(const char *fmt, char *buf ptr = NULL; break; } @@ -189,7 +194,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> break; } break; -- + - case 'N': - return netdev_bits(buf, end, ptr, fmt); - case 'a': @@ -209,10 +214,15 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - - case 'G': - return flags_string(buf, end, ptr, fmt); +- case 'O': +- switch (fmt[1]) { +- case 'F': +- return device_node_string(buf, end, ptr, spec, fmt + 1); +- } } spec.flags |= SMALL; if (spec.field_width == -1) { -@@ -1729,7 +1754,7 @@ char *pointer(const char *fmt, char *buf +@@ -1865,7 +1891,7 @@ char *pointer(const char *fmt, char *buf } spec.base = 16; diff --git a/lib-vsprintf-default-kptr_restrict-to-the-maximum-value.patch b/lib-vsprintf-default-kptr_restrict-to-the-maximum-value.patch index ccf50b0e069912..807f3b0a85a3bd 100644 --- a/lib-vsprintf-default-kptr_restrict-to-the-maximum-value.patch +++ b/lib-vsprintf-default-kptr_restrict-to-the-maximum-value.patch @@ -15,7 +15,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- a/lib/vsprintf.c +++ b/lib/vsprintf.c -@@ -395,7 +395,7 @@ struct printf_spec { +@@ -396,7 +396,7 @@ struct printf_spec { #define FIELD_WIDTH_MAX ((1 << 23) - 1) #define PRECISION_MAX ((1 << 15) - 1) diff --git a/lib-vsprintf-physical-address-kernel-pointer-filtering-options.patch b/lib-vsprintf-physical-address-kernel-pointer-filtering-options.patch index 721325f8affb7c..87c3f0546b1097 100644 --- a/lib-vsprintf-physical-address-kernel-pointer-filtering-options.patch +++ b/lib-vsprintf-physical-address-kernel-pointer-filtering-options.patch @@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> static int ten_thousand = 10000; #endif #ifdef CONFIG_PERF_EVENTS -@@ -831,7 +830,7 @@ static struct ctl_table kern_table[] = { +@@ -852,7 +851,7 @@ static struct ctl_table kern_table[] = { .mode = 0644, .proc_handler = proc_dointvec_minmax_sysadmin, .extra1 = &zero, @@ -52,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> { --- a/lib/vsprintf.c +++ b/lib/vsprintf.c -@@ -405,6 +405,22 @@ static inline int kptr_restrict_always_c +@@ -406,6 +406,22 @@ static inline int kptr_restrict_always_c return kptr_restrict >= 3; } @@ -75,7 +75,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> static noinline_for_stack char *number(char *buf, char *end, unsigned long long num, struct printf_spec spec) -@@ -757,6 +773,7 @@ char *resource_string(char *buf, char *e +@@ -758,6 +774,7 @@ char *resource_string(char *buf, char *e char *p = sym, *pend = sym + sizeof(sym); int decode = (fmt[0] == 'R') ? 1 : 0; @@ -83,7 +83,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> const struct printf_spec *specp; *p++ = '['; -@@ -784,10 +801,11 @@ char *resource_string(char *buf, char *e +@@ -785,10 +802,11 @@ char *resource_string(char *buf, char *e p = string(p, pend, "size ", str_spec); p = number(p, pend, resource_size(res), *specp); } else { @@ -97,7 +97,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> } } if (decode) { -@@ -1390,7 +1408,9 @@ char *address_val(char *buf, char *end, +@@ -1391,7 +1409,9 @@ char *address_val(char *buf, char *end, break; } @@ -108,7 +108,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> } static noinline_for_stack -@@ -1584,6 +1604,12 @@ char *flags_string(char *buf, char *end, +@@ -1715,6 +1735,12 @@ char *device_node_string(char *buf, char * * Note: That for kptr_restrict set to 3, %p and %pK have the same * meaning. @@ -121,7 +121,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> */ static noinline_for_stack char *pointer(const char *fmt, char *buf, char *end, void *ptr, -@@ -1741,6 +1767,7 @@ char *pointer(const char *fmt, char *buf +@@ -1877,6 +1903,7 @@ char *pointer(const char *fmt, char *buf } case 2: /* restrict only %pK */ case 3: /* restrict all non-extensioned %p and %pK */ diff --git a/lib-vsprintf-whitelist-stack-traces.patch b/lib-vsprintf-whitelist-stack-traces.patch index 190fdb76d2c033..144168097097e7 100644 --- a/lib-vsprintf-whitelist-stack-traces.patch +++ b/lib-vsprintf-whitelist-stack-traces.patch @@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c -@@ -146,7 +146,7 @@ static void dump_backtrace(struct pt_reg +@@ -146,7 +146,7 @@ void dump_backtrace(struct pt_regs *regs unsigned long irq_stack_ptr; int skip; @@ -48,7 +48,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> #endif /*_LINUX_KALLSYMS_H*/ --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c -@@ -3165,7 +3165,7 @@ void show_regs_print_info(const char *lo +@@ -3148,7 +3148,7 @@ void show_regs_print_info(const char *lo { dump_stack_print_info(log_lvl); diff --git a/pci_groups.patch b/pci_groups.patch index 856a9d26b29bad..e1fea044991a37 100644 --- a/pci_groups.patch +++ b/pci_groups.patch @@ -111,7 +111,7 @@ } --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c -@@ -1305,6 +1305,7 @@ int __pci_register_driver(struct pci_dri +@@ -1307,6 +1307,7 @@ int __pci_register_driver(struct pci_dri drv->driver.bus = &pci_bus_type; drv->driver.owner = owner; drv->driver.mod_name = mod_name; @@ -1,4 +1,16 @@ # +u01.patch +u02.patch +u03.patch +u04.patch +u05.patch +u06.patch +u07.patch +u08.patch +u09.patch + + + lib-vsprintf-additional-kernel-pointer-filtering-options.patch lib-vsprintf-whitelist-stack-traces.patch lib-vsprintf-physical-address-kernel-pointer-filtering-options.patch |
