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]
Message-ID: <YyQm4dBVyvefVcAd@mit.edu>
Date:   Fri, 16 Sep 2022 03:33:53 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     наб <nabijaczleweli@...ijaczleweli.xyz>
Cc:     Federico Vaga <federico.vaga@...a.pv.it>,
        Alex Shi <alexs@...nel.org>,
        Yanteng Si <siyanteng@...ngson.cn>,
        Hu Haowen <src.res@...il.cn>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        linux-doc-tw-discuss@...ts.sourceforge.net
Subject: Re: [PATCH 1/5] tty: remove TTY_MAGIC

On Fri, Sep 16, 2022 at 03:54:59AM +0200, наб wrote:
> According to Greg, in the context of magic numbers as defined in
> magic-number.rst, "the tty layer should not need this and I'll gladly
> take patches"
> 
> Ref: https://lore.kernel.org/linux-doc/YyMlovoskUcHLEb7@kroah.com/

Well, I would disagree with Greg K-H on this --- but I haven't been
tty maintainer in well over a decade.  Assuming code is Bug-Free(tm),
sure, it's not necessary.  But there is any kind of memory bug (e.g.,
a corrupted pointer, a use-after free, some other structure
corruption), this catches the problem earlier rather than later, and
it's a light-weight to do a quick sanity check.

It has certainly caught problems in the past, and I still use this
programming technique in programs that I do maintain, such as
e2fsprogs.

But it's not a big deal either way,

						- Ted

P.S. BTW, I didn't make up this technique; it's a program pattern
first used in Multics.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ