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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwUi8Zg_WGtOdJcvpQa9yLH0fOU0pfOKGoAgtnJdOqrSg@mail.gmail.com>
Date:	Tue, 24 Jul 2012 13:11:49 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Josh Boyer <jwboyer@...hat.com>
Cc:	Jeff Law <law@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] posix_types.h: make __NFDBITS match glibc definition

On Tue, Jul 24, 2012 at 12:59 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> And I suspect (but it must be before even the old bitkeeper tree) that
> we *used* to implement __FD_ISSET() long ago. We removed it, and
> nobody used it, so nobody even noticed that we removed it - but left
> some now unused stuff behind.

Nope, I found it. It was in the arch-specific header files, and then
moved to asm-generic, and then removed entirely by commit 8b3d1cda4f5f
("posix_types: Remove fd_set macros"). Fairly recently, in fact
(February).

But even before they were removed, they were inside #ifdef __KERNEL__
protection, so it wasn't available to user code.

And to be *really* crazy, it turns out that by the time we removed
those __FD_ISSET() etc macros, they didn't even use the helper macros
any more. So instead of using

 #define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))

(like the original arch-specific ones had done), we had already
implicitly stopped using those macros inside the kernel when we moved
to the generic version (that did all this by hand in inline
functions).

So the only users of __FDELT/__FDMASK seem to have gone away many
moons ago. I really don't think that any sane user space could be
using those left-over helpers.

Of course, the magic word there is "sane". I'm sure there are insane
users somewhere. But I don't think we should care.

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