Re: [PATCH] lib: vsprintf: check for NULL device_node name in device_node_string()

2021-02-18 Thread Petr Mladek
On Wed 2021-02-17 15:50:00, Andy Shevchenko wrote: > On Wed, Feb 17, 2021 at 01:15:43PM +0100, Enrico Weigelt, metux IT consult > wrote: > > Under rare circumstances it may happen that a device node's name is NULL > > (most likely kernel bug in some other place). > > What circumstances? How can I

Re: [PATCH v1 1/3] string: Consolidate yesno() helpers under string.h hood

2021-02-17 Thread Petr Mladek
On Mon 2021-02-15 16:39:26, Andy Shevchenko wrote: > +Cc: Sakari and printk people > > On Mon, Feb 15, 2021 at 4:28 PM Christian König > wrote: > > Am 15.02.21 um 15:21 schrieb Andy Shevchenko: > > > We have already few similar implementation and a lot of code that can > > > benefit > > > of the

Re: [PATCH v3 1/4] lib: vsprintf: scanf: Negative number must have field width > 1

2020-12-21 Thread Petr Mladek
el/iwlegacy/3945-mac.c so that they are aware of this. > Signed-off-by: Richard Fitzgerald Reviewed-by: Petr Mladek Best Regards, Petr > --- > lib/vsprintf.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c > index

Re: [PATCH v3 bpf-next 4/8] printk: add type-printing %pT format specifier which uses BTF

2020-06-29 Thread Petr Mladek
On Fri 2020-06-26 12:37:19, Alan Maguire wrote: > > On Fri, 26 Jun 2020, Petr Mladek wrote: > > > On Tue 2020-06-23 13:07:07, Alan Maguire wrote: > > > > > > printk(KERN_INFO "%pT", BTF_PTR_TYPE(skb, struct sk_buff)); > > > &g

Re: [PATCH v3 bpf-next 4/8] printk: add type-printing %pT format specifier which uses BTF

2020-06-26 Thread Petr Mladek
On Tue 2020-06-23 13:07:07, Alan Maguire wrote: > printk supports multiple pointer object type specifiers (printing > netdev features etc). Extend this support using BTF to cover > arbitrary types. "%pT" specifies the typed format, and the pointer > argument is a "struct btf_ptr *" where struct b

Re: [PATCH v3 2/7] dynamic_debug: Group debug messages by level bitmask

2020-06-09 Thread Petr Mladek
On Tue 2020-06-09 13:45:59, Stanimir Varbanov wrote: > This will allow dynamic debug users and driver writers to group > debug messages by level bitmask. The level bitmask should be a > hex number. > > Done this functionality by extending dynamic debug metadata with > new level member and propaga

Re: [PATCH V2] dynamic_debug: Add an option to enable dynamic debug for modules only

2020-05-18 Thread Petr Mladek
On Sat 2020-05-16 11:55:04, Orson Zhai wrote: > On Fri, May 15, 2020 at 5:55 PM Petr Mladek wrote: > > > > On Thu 2020-04-23 00:02:48, Orson Zhai wrote: > > > On Wed, Apr 22, 2020 at 10:25 PM Leon Romanovsky wrote: > > > > > > > > On Wed, Ap

Re: [PATCH V2] dynamic_debug: Add an option to enable dynamic debug for modules only

2020-05-15 Thread Petr Mladek
On Thu 2020-04-23 00:02:48, Orson Zhai wrote: > On Wed, Apr 22, 2020 at 10:25 PM Leon Romanovsky wrote: > > > > On Wed, Apr 22, 2020 at 09:06:08PM +0800, Orson Zhai wrote: > > > On Tue, Apr 21, 2020 at 3:10 AM Leon Romanovsky wrote: > > > My motivation came from the concept of GKI (Generic Kernel

lock recursion - was: Re: [4.18 rc7] BUG: sleeping function called from invalid context at mm/slab.h:421

2018-08-08 Thread Petr Mladek
On Wed 2018-08-08 11:05:00, Vlastimil Babka wrote: > On 08/08/2018 11:01 AM, Vlastimil Babka wrote: > > fbcon_startup() calls kzalloc(sizeof(struct fbcon_ops), GFP_KERNEL) so > > it tells slab it can sleep. The problem must be higher in the stack, > > CCing printk people. > > Uh just noticed there

Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl

2017-11-20 Thread Petr Mladek
On Mon 2017-11-13 11:16:28, kaiwan.billimo...@gmail.com wrote: > On Mon, 2017-11-13 at 09:21 +1100, Tobin C. Harding wrote: > > On Fri, Nov 10, 2017 at 07:26:34PM +0530, kaiwan.billimo...@gmail.com > > > - it currently hard-codes a global 'PAGE_OFFSET_32BIT=0xc000' > > > , just > > > so I can

Re: [PATCH 4/7] scripts/leaking_addresses: add reporting

2017-11-08 Thread Petr Mladek
On Wed 2017-11-08 14:37:36, Tobin C. Harding wrote: > Currently script just dumps all results found. Potentially, this risks > loosing single results among multiple duplicate results. We need some > way of restricting duplicates to assist users of the script. It would > also be nice if we got a rep

Re: [PATCH 5/7] scripts/leaking_addresses: add emailing results

2017-11-08 Thread Petr Mladek
On Wed 2017-11-08 14:37:37, Tobin C. Harding wrote: > Developers may not have the time (or inclination) to investigate script > output. This information is, however, useful. If we add functionality to > the script to email results for further investigation. > > Add --send-report flag to email scan

Re: [PATCH v4] scripts: add leaking_addresses.pl

2017-11-07 Thread Petr Mladek
On Tue 2017-11-07 21:32:11, Tobin C. Harding wrote: > Currently we are leaking addresses from the kernel to user space. This > script is an attempt to find some of those leakages. Script parses > `dmesg` output and /proc and /sys files for hex strings that look like > kernel addresses. > > Only wo

Re: [PATCH 12/13] kthread: Convert callback to use from_timer()

2017-10-11 Thread Petr Mladek
On Wed 2017-10-04 16:27:06, Kees Cook wrote: > In preparation for unconditionally passing the struct timer_list pointer > to all timer callbacks, switch kthread to use from_timer() and pass the > timer pointer explicitly. > > Cc: Andrew Morton > Cc: Petr Mladek > Cc: Te

Re: [PATCH 11/13] timer: Remove expires argument from __TIMER_INITIALIZER()

2017-10-11 Thread Petr Mladek
linux/timer.h | 5 ++--- > include/linux/workqueue.h | 2 +- > 3 files changed, 4 insertions(+), 5 deletions(-) I was primary interested into the change in kthread.h. But the entire patch is simple and looks fine: Reviewed-by: Petr Mladek Best Regards, Petr

Re: [PATCH] printk: Warn about dropped messages also on extended consoles

2015-07-30 Thread Petr Mladek
On Thu 2015-07-30 09:39:01, Tejun Heo wrote: > Hello, > > On Thu, Jul 30, 2015 at 01:28:52PM +0200, Petr Mladek wrote: > > The commit #6fe29354befe4c ("printk: implement support for extended console > > drivers") added an extra buffer to format messages for extend

[PATCH] printk: Warn about dropped messages also on extended consoles

2015-07-30 Thread Petr Mladek
The commit #6fe29354befe4c ("printk: implement support for extended console drivers") added an extra buffer to format messages for extended consoles. We need to put there also the warning about dropped messages, so it appears on these consoles. Signed-off-by: Petr Mladek --- ker

Re: [PATCH v2 v4.2-rc1] printk: make extended printk support conditional on netconsole

2015-07-03 Thread Petr Mladek
; Verified 8k reduction in vmlinux bss when !CONFIG_NETCONSOLE. > > v2: Added a warning for cases where CON_EXTENDED is requested while > CONFIG_PRINTK_CON_EXTENDED is disabled as suggested by Petr. > > Cc: Petr Mladek > Signed-off-by: Tejun Heo > Reported-and-suggested-by

Re: [PATCH v4.2-rc1] printk: make extended printk support conditional on netconsole

2015-07-01 Thread Petr Mladek
On Mon 2015-06-29 19:31:40, Tejun Heo wrote: > 6fe29354befe ("printk: implement support for extended console > drivers") implemented extended printk support for extended netconsole. > The code added was miniscule but it added static 8k buffer > unconditionally unnecessarily bloating the kernel for

Re: [PATCH 1/7] printk: guard the amount written per line by devkmsg_read()

2015-05-15 Thread Petr Mladek
vkmsg formatting wider and accounting for the buffer > size properly isn't that complicated. > > This patch defines CONSOLE_EXT_LOG_MAX as 8192 and updates > devkmsg_read() so that it limits output accordingly. > > Signed-off-by: Tejun Heo Reviewed-by: Petr Mladek It is mor

Re: [PATCH 04/16] printk: implement support for extended console drivers

2015-04-28 Thread Petr Mladek
On Tue 2015-04-28 10:10:14, Tejun Heo wrote: > Hello, Petr. > > On Tue, Apr 28, 2015 at 11:42:44AM +0200, Petr Mladek wrote: > > Note that cont buffer is only a memory optimization. You could put > > every text snippet into the ring buffer and console immediately. > &g

Re: [PATCH 04/16] printk: implement support for extended console drivers

2015-04-28 Thread Petr Mladek
On Mon 2015-04-27 17:09:22, Tejun Heo wrote: > Hello, Petr. > > Sorry about the delay. np > On Mon, Apr 20, 2015 at 05:43:07PM +0200, Petr Mladek wrote: > > I was afraid that there might be a potential buffer overflow because > > the user-provided dict need not

Re: [PATCH 04/16] printk: implement support for extended console drivers

2015-04-21 Thread Petr Mladek
On Mon 2015-04-20 17:43:07, Petr Mladek wrote: > On Thu 2015-04-16 19:03:41, Tejun Heo wrote: > > printk log_buf keeps various metadata for each message including its > > sequence number and timestamp. The metadata is currently available > > only through /dev/kmsg and strip

Re: [PATCH 04/16] printk: implement support for extended console drivers

2015-04-20 Thread Petr Mladek
> > fragid=; > > * Extended message formatting for console drivers is enabled iff there ^^^ s/iff/if/ > are registered extended consoles. > > * Comment describing extended message formats updated to help &

Re: [PATCH 03/16] printk: move LOG_NOCONS skipping into call_console_drivers()

2015-04-20 Thread Petr Mladek
ntinuation lines aren't that common and also simplifies > console_unlock() a bit. > > Signed-off-by: Tejun Heo > Cc: Kay Sievers > Cc: Petr Mladek > --- > kernel/printk/printk.c | 46 -- > 1 file changed, 24 insertions(+), 22 de

Re: [PATCH 01/16] printk: guard the amount written per line by devkmsg_read()

2015-04-20 Thread Petr Mladek
On Mon 2015-04-20 14:11:36, Petr Mladek wrote: > On Thu 2015-04-16 19:03:38, Tejun Heo wrote: > > devkmsg_read() uses 8k buffer and assumes that the formatted output > > message won't overrun which seems safe given LOG_LINE_MAX, the current > > use of dict and the

Re: [PATCH 02/16] printk: factor out message formatting from devkmsg_read()

2015-04-20 Thread Petr Mladek
Tejun Heo Reviewed-by: Petr Mladek I like the split of the long function. Best Regards, Petr > Cc: Kay Sievers > Cc: Petr Mladek > --- > kernel/printk/printk.c | 157 > ++--- > 1 file changed, 85 insertions(+), 72 delet

Re: [PATCH 01/16] printk: guard the amount written per line by devkmsg_read()

2015-04-20 Thread Petr Mladek
vkmsg formatting wider and accounting for the buffer > size properly isn't that complicated. > > This patch defines CONSOLE_EXT_LOG_MAX as 8192 and updates > devkmsg_read() so that it limits output accordingly. > > Signed-off-by: Tejun Heo Reviewed-by: Petr Mladek It