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]
Message-ID: <20140324180740.GA3679@redhat.com>
Date:	Mon, 24 Mar 2014 19:07:40 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	David Woodhouse <dwmw2@...radead.org>,
	Richard Weinberger <richard@....at>, Tejun Heo <tj@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/11] signals: kill sigfindinword()

Hi Geert,

On 03/24, Geert Uytterhoeven wrote:
>
> Hi Oleg,
>
> On Sun, Mar 23, 2014 at 8:37 PM, Oleg Nesterov <oleg@...hat.com> wrote:
> > It has no users and it doesn't look useful. I do not know why/when it
> > was introduced, I can't even find any user in the git history.
>
> 2.1.68pre1 for i386, 2.1.87pre1 for m68k (which used to follow i386 very
> closely ;-), but never used in mainline code.
>
> > Signed-off-by: Oleg Nesterov <oleg@...hat.com>
>
> Acked-by: Geert Uytterhoeven <geert@...ux-m68k.org>

Thanks ;)

Do you think __HAVE_ARCH_SIG_* actually make sense? Only __i386__ and m68k
define _BITOPS, and nobody defines _SETOPS. Does this asm really helps to
generate a better code?

It seems to me it would be better to always use the generic code, although
perhaps we should cleanup it and even convert to use bitops/bitmask. The
home-grown bitmask implementation in signal.h looks a bit ugly.

At least we should move the definition of sigset_t into linux/signal.h,
this should be simple. It must be the same on every arch anyway, at least
has_pending_signals() assumes that sigset_t == long[_NSIG_WORDS].

And I can't understand why do we need rt_sigmask()... I think we can just
do

	- #define sigmask(sig)	(1UL << ((sig) - 1))
	+ #define sigmask(sig)  (1ULL << ((sig) - 1))

This should not change the code generation, gcc is smart enough, sig is
always constant...

Looks like, this code needs a lot of boring cleanups.

Oleg.

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