public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Jiri Slaby <jirislaby@kernel.org>, Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	John Ogness <john.ogness@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: use printk_safe context at tty_msg()
Date: Tue, 6 Apr 2021 15:42:37 +0200	[thread overview]
Message-ID: <YGxlTYinSceb6cyL@kroah.com> (raw)
In-Reply-To: <4898f140-d7ed-14d3-e24f-8f51fc6bc003@i-love.sakura.ne.jp>

On Tue, Apr 06, 2021 at 08:16:43PM +0900, Tetsuo Handa wrote:
> On 2021/04/06 16:10, Greg Kroah-Hartman wrote:
> > On Tue, Apr 06, 2021 at 02:31:43PM +0900, Tetsuo Handa wrote:
> >> On 2021/04/06 13:51, Jiri Slaby wrote:
> >>> On 03. 04. 21, 6:14, Tetsuo Handa wrote:
> >>>> --- a/include/linux/tty.h
> >>>> +++ b/include/linux/tty.h
> >>>> @@ -14,6 +14,7 @@
> >>>>   #include <uapi/linux/tty.h>
> >>>>   #include <linux/rwsem.h>
> >>>>   #include <linux/llist.h>
> >>>> +#include <../../kernel/printk/internal.h>
> >>>
> >>> Including printk's internal header in linux/tty.h doesn't look correct to me.
> >>>
> >>
> >> This is because this patch wants __printk_safe_enter()/__printk_safe_exit()
> >> without #ifdef'ing CONFIG_PRINTK.
> > 
> > Then those functions need to be "properly" exported, not placed only in
> > an "internal.h" file that obviously should not be included from anywhere
> > like this.
> > 
> >> Peter and Sergey, what should we do?
> >> Can we move printk_safe_enter_irqsave()/printk_safe_exit_irqrestore() to include/linux/printk.h ?
> > 
> > Are you sure that is the only way to resolve this?
> 
> Publishing printk_safe_enter_irqsave() etc. was once proposed at
> https://lkml.kernel.org/r/20181016050428.17966-3-sergey.senozhatsky@gmail.com and
> Peter Zijlstra did not like such change. But we reconfirmed that "tty_port lock must
> switch to printk_safe" at https://lkml.kernel.org/r/20190219013254.GA20023@jagdpanzerIV .
> 
> Two years has elapsed since a completely new printk implementation which would not
> use printk_safe context was proposed, but printk_safe context is still remaining.
> Therefore, we might need to tolerate, with a warning that printk_safe_enter_irqsave()
> etc. are not intended for general use, use of printk_safe context for tty_msg() and
> tty_buffer_alloc().

The printk work is still ongoing, perhaps work with those developers on
this?

thanks,

greg k-h

  reply	other threads:[~2021-04-06 13:42 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03  4:14 [PATCH] tty: use printk_safe context at tty_msg() Tetsuo Handa
2021-04-03  6:52 ` kernel test robot
2021-04-03 10:11   ` [PATCH] printk: Make multiple inclusion of kernel/printk/internal.h safe Tetsuo Handa
2021-04-06  4:51 ` [PATCH] tty: use printk_safe context at tty_msg() Jiri Slaby
2021-04-06  5:31   ` Tetsuo Handa
2021-04-06  7:10     ` Greg Kroah-Hartman
2021-04-06 11:16       ` Tetsuo Handa
2021-04-06 13:42         ` Greg Kroah-Hartman [this message]
2021-04-06 15:10 ` Petr Mladek
2021-04-06 16:22   ` Tetsuo Handa
2021-04-06 19:10     ` Greg Kroah-Hartman
2021-04-07  9:20       ` Petr Mladek
2021-04-07 13:26     ` [PATCH v2] tty: use printk_deferred() " Tetsuo Handa
2021-04-07 13:48       ` Greg Kroah-Hartman
2021-04-07 14:24         ` Tetsuo Handa
2021-04-12 10:39           ` How to handle concurrent access to /dev/ttyprintk ? Tetsuo Handa
2021-04-12 10:44             ` Greg Kroah-Hartman
2021-04-12 11:25               ` Tetsuo Handa
2021-04-12 12:04                 ` Greg Kroah-Hartman
2021-04-14  0:45                   ` Tetsuo Handa
2021-04-14 11:11                     ` Tetsuo Handa
2021-04-14 16:15                       ` Samo Pogačnik
2021-04-15  0:22                         ` [PATCH] ttyprintk: Add TTY hangup callback Tetsuo Handa
2021-04-18 11:16                           ` Samo Pogačnik
2021-04-22 10:02                             ` Greg Kroah-Hartman
2021-04-23  4:22                             ` Jiri Slaby
2021-04-23  9:55                               ` Samo Pogačnik
2021-04-23 10:12                                 ` Tetsuo Handa
2021-04-23 19:47                                   ` Samo Pogačnik
2021-04-24  1:16                                     ` Tetsuo Handa
2021-04-24  9:57                                       ` Samo Pogačnik
2021-04-26 10:00                                         ` Petr Mladek
2021-04-26 16:42                                           ` Samo Pogačnik
2021-04-27 10:08                                             ` Petr Mladek
2021-04-27 11:31                                               ` Samo Pogačnik
2021-04-23 10:28                                 ` Jiri Slaby
2021-04-23 12:23                                   ` [PATCH] ttyprintk: Add TTY port shutdown callback Samo Pogačnik
2021-04-12 12:41             ` How to handle concurrent access to /dev/ttyprintk ? Samo Pogačnik
2021-04-13  9:41               ` Petr Mladek
2021-04-13 11:10                 ` Samo Pogačnik
2021-04-13 14:32                   ` Petr Mladek
2021-04-13 15:22                     ` Samo Pogačnik
2021-04-14 17:36                       ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YGxlTYinSceb6cyL@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox