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:	Fri, 17 Oct 2014 15:31:28 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	Peter Hurley <peter@...leysoftware.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
Subject: Re: [PATCH -next 05/10] tty: Document defunct ASYNC_* bits in uapi
 header

On 10/17/2014, 02:44 PM, Peter Hurley wrote:
> Hi Jiri,
> 
> On 10/17/2014 04:46 AM, Jiri Slaby wrote:
>> On 10/16/2014, 10:54 PM, Peter Hurley wrote:
>>> Note the serial_struct flags for which the kernel ignores and performs
>>> no action. The flags cannot be removed since they form part of the
>>> userspace interface via the TIOCSSERIAL/TIOCGSERIAL ioctls.
>>
>> Hello,
>>
>> would it make sense to mark them deprecated somehow? At build time
> 
> A build warning when the macro is expanded would be best, but my
> c-preprocessor-fu is terrible, so I have no idea how to make that work.

We can define a deprecated type like:

typedef __u32 __attribute__((deprecated)) depr_tty_t

and then do define:

#define ASYNCB_FLAG_1 (depr_tty_t)1
#define ASYNCB_FLAG_2 (depr_tty_t)2

Etc.

However, I do not know if it is desirable AND whether all compilers out
there used in userspace support that attribute.

>> or
>> at least warn in the serial core that "current->comm is using a
>> deprecated flag"_ratelimited()?
> 
> If we just print the message at TIOCSSERIAL if any of the deprecated
> bits are set, that would be ok. Probably the only issue would be that
> setserial could cause this message at will, so log flooding would be
> a concern.

That's why _ratelimited(). So something like the patch attached. But it
needs to be put to a separate function, out of the line.

/me currently builds a kernel to see who, if anybody, uses the flags on
a up-to-date system...

thanks,
-- 
js
suse labs

Download attachment "0001-tty-warn-on-deprecated-flags.patch" of type "application/mbox" (1757 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ