linux/drivers/tty/hvc
Juergen Gross fe415186b4 xen/console: harden hvc_xen against event channel storms
The Xen console driver is still vulnerable for an attack via excessive
number of events sent by the backend. Fix that by using a lateeoi event
channel.

For the normal domU initial console this requires the introduction of
bind_evtchn_to_irq_lateeoi() as there is no xenbus device available
at the time the event channel is bound to the irq.

As the decision whether an interrupt was spurious or not requires to
test for bytes having been read from the backend, move sending the
event into the if statement, as sending an event without having found
any bytes to be read is making no sense at all.

This is part of XSA-391

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
V2:
- slightly adapt spurious irq detection (Jan Beulich)
V3:
- fix spurious irq detection (Jan Beulich)
2021-12-16 08:24:08 +01:00
..
hvc_console.c Revert "tty: hvc: pass DMA capable memory to put_chars()" 2021-10-26 08:48:09 +02:00
hvc_console.h Revert "tty: hvc: pass DMA capable memory to put_chars()" 2021-10-26 08:48:09 +02:00
hvc_dcc.c hvc: dcc: Add earlycon support 2019-10-11 08:38:07 +02:00
hvc_irq.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hvc_iucv.c TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
hvc_opal.c tty: hvc: hvc_opal: Staticify function invoked by reference 2020-11-06 10:54:05 +01:00
hvc_riscv_sbi.c tty: Don't force RISCV SBI console as preferred console 2019-05-16 20:42:11 -07:00
hvc_rtas.c tty: hvc: Remove redundant license text 2017-11-08 13:08:12 +01:00
hvc_udbg.c tty: hvc: make symbol 'hvc_udbg_dev' static 2021-04-10 10:41:40 +02:00
hvc_vio.c tty: hvc: udbg_hvc: retry putc on -EAGAIN 2021-05-23 20:51:36 +10:00
hvc_xen.c xen/console: harden hvc_xen against event channel storms 2021-12-16 08:24:08 +01:00
hvcs.c tty: drop put_tty_driver 2021-07-27 12:17:21 +02:00
hvsi_lib.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hvsi.c tty: stop using alloc_tty_driver 2021-07-27 12:17:20 +02:00
Kconfig tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n 2020-09-27 14:17:43 +02:00
Makefile TTY/Serial driver patches for 4.17-rc1 2018-04-04 18:43:49 -07:00