lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 9 Sep 2010 15:47:57 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	"Stephane Grosjean" <grosjean@...ase.com>
Cc:	<linux-kernel@...r.kernel.org>
Subject: Re: PROBLEM: tty_buffer_request_room() vs. ppp_sync_input(): a
 single  buffer may contains several frames

> My problem is that the "tty_buffer_request_room()" function may use the
> same buffer (the tail) if it finds enough place to store the incoming
> frame in.

Correct. The tty layer doesn't preserve record boundaries.

> Please let me know if I'm right and if this fix is the only way to pass
> synchronous frames to upper layers.

The tty buffer system is not intended for framed data. It doesn't handle
all sorts of cases of it and will split buffers and pack them as it sees
fit.

There is a limited provision for tty style handling of such interfaces
because some hardware is dual mode but it requires you don't use the tty
buffering helpers.

If your hardware is a straight sync board you probably want to look at
drivers/net/wan/hdlc*c which provides the interfaces so you can just
throw frames straight off a card into the network layer and appear as a
network stack. Unlike n_syncppp it also supports other protocols pretty
much for free (Cisco HDLC etc)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ