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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Feb 2010 08:43:30 +1100
From:	Simon Horman <horms@...ge.net.au>
To:	Tilman Schmidt <tilman@...p.cc>
Cc:	Karsten Keil <isdn@...ux-pingi.de>,
	David Miller <davem@...emloft.net>,
	Hansjoerg Lipp <hjlipp@....de>,
	Karsten Keil <keil@...systems.de>,
	isdn4linux@...tserv.isdn4linux.de,
	i4ldeveloper@...tserv.isdn4linux.de, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] bas_gigaset: collapse CR/LF at end of AT response

On Tue, Feb 23, 2010 at 02:19:19PM +0100, Tilman Schmidt wrote:
> Simon Horman schrieb:
> > I am confused about what the value of MAX_RESP_SIZE means.
> > Is it a hw restriction?
> 
> It's an arbitrary limitation in the driver. The hardware specification
> says nothing about the possible length of AT responses from the device,
> so we had to draw a line somewhere. 512 bytes have so far proved to be
> amply sufficient.
> 
> In practice, the limit is only hit with the M10x devices (which transmit
> commands and data over the same channel) when the state machine gets out
> of sync and tries to interpret received payload data as AT responses.

Ok, understood. Thanks for the clarification.

> > It seems that up to MAX_RESP_SIZE of string-data is permitted if the line
> > is terminated by CR. But only MAX_RESP_SIZE -1  bytes if the line is
> > terminated by LF or CR LF.
> 
> Note that when storing the CR in cs->respdata[0] for possible collapsing
> with a subsequent LF, the cbytes counter is left at 0, so the CR gets
> overwritten by the first character of the next response if there's no
> intervening LF.

Yes, I had to look at that for quite a while :-)

--
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