printk: remove safe buffers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest6 patches 9 repliesIn review
- v36 patches 16 repliesSuperseded
- v25 patches 11 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 19 replies | Superseded |
Changes in v4 from the cover letter
- Remove safe context tracking in vprintk().
- Add safe context tracking for @console_owner usage since that is also a component of the printing code.
- Refactor syslog_print() so that it is easier to understand and follow the locking logic.
- Introduce printk_deferred_enter/exit functions to be used by code that needs to specify code block where all printk calls are to be deferred printing.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | lib/nmi_backtrace: explicitly serialize banner and regslib/ | +7 | 0 replies | |
| 2/6 | printk: track/limit recursionkernel/ | +83 | 0 replies | |
| 3/6 | printk: remove safe buffersarch/ arch/ include/ +6 more | +48 | 2 replies | |
| 4/6 | printk: remove NMI trackingarch/ arch/ include/ +5 more | +25 | 4 replies | |
| 5/6 | printk: convert @syslog_lock to mutexkernel/ | +20 | 1 reply | |
| 6/6 | printk: syslog: close window between wait and readkernel/ | +36 | 1 reply |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Petr Mladek |
|---|---|
| 1/6 | R-b |
| 2/6 | R-b |
| 3/6 | R-b |
| 4/6 | |
| 5/6 | R-b |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH printk v4 0/6] printk: remove safe buffers
Hi,
Here is v4 of a series to remove the safe buffers. v3 can be found here [0]. The safe buffers are no longer needed because messages can be stored directly into the log buffer from any context.
However, the safe buffers also provided a form of recursion protection. For that reason, explicit recursion protection is implemented for this series.
The safe buffers also implicitly provided serialization between multiple CPUs executing in NMI context. This was particularly necessary for the nmi_backtrace() output. This serializiation is now preserved by using the printk cpulock.
With the removal of the safe buffers, there is no need for extra NMI enter/exit tracking. So this is also removed (which includes removing the config option CONFIG_PRINTK_NMI).
And finally, there are a few places in the kernel that need to specify code blocks where all printk calls are to be deferred printing. Previously the NMI tracking API was being (mis)used for this purpose. This series introduces an official and explicit interface for such cases. (Note that all deferred printing will be removed anyway, once printing kthreads are introduced.)
Changes since v3:
- Remove safe context tracking in vprintk().
- Add safe context tracking for @console_owner usage since that is also a component of the printing code.
- Refactor syslog_print() so that it is easier to understand and follow the locking logic.
- Introduce printk_deferred_enter/exit functions to be used by code that needs to specify code block where all printk calls are to be deferred printing.
John Ogness
[0] https://lore.kernel.org/lkml/[email protected]
John Ogness (6):
lib/nmi_backtrace: explicitly serialize banner and regs
printk: track/limit recursion
printk: remove safe buffers
printk: remove NMI tracking
printk: convert @syslog_lock to mutex
printk: syslog: close window between wait and read
arch/arm/kernel/smp.c | 4 +- arch/powerpc/kernel/traps.c | 1 - arch/powerpc/kernel/watchdog.c | 5 - arch/powerpc/kexec/crash.c | 2 +- include/linux/hardirq.h | 2 - include/linux/printk.h | 41 ++-- init/Kconfig | 5 - kernel/kexec_core.c | 1 - kernel/panic.c | 3 - kernel/printk/internal.h | 25 --- kernel/printk/printk.c | 268 ++++++++++++++---------- kernel/printk/printk_safe.c | 364 +-------------------------------- kernel/trace/trace.c | 4 +- lib/nmi_backtrace.c | 13 +- 14 files changed, 194 insertions(+), 544 deletions(-)
base-commit: 70333dec446292cd896cd051d2ebd6808b328949
Signature · 7 lines
2.20.1 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec