tty_io.c 8k write limit

Paul Fulghum (paulkf@microgate.com)
Fri, 13 Aug 1999 11:21:16 -0500


In the file drivers/char/tty_io.c, the higher level tty code has
a function do_tty_write which does nothing but break up writes
into maximum size of 2 pages before passing the write to the
line discipline.

The only comment for the code says:

/*
* Split writes up in sane blocksizes to avoid
* denial-of-service type attacks
*/

I have a driver and line discipline for synchronous HDLC applications
that interprets each individual write as a whole frame. This works fine
unless you want to send a frame larger than 2 pages.

My question is: is this write break up really needed? I'm not sure what
DOS attack is prevented with this code.

Would anyone object to either increasing the maximum size to 64K
(our device supports 64Kbyte frames)
*OR*
introducing a tty flag that would cause the write to be passed
in whole to the line discipline. The line discipline could set/clear this
flag when it is selected/deselected. This way the behavior is not changed
unless the line discipline requires it.

Paul Fulghum paulkf@microgate.com
Microgate Corporation www.microgate.com
9501 Capital of Texas Hwy
Austin, Texas 78759
(512)-345-7791

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/