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: <CALCETrWzYByzKLoPYne5BvLk4BXrwWTAFZqcr4XKtPFEQfdvRA@mail.gmail.com>
Date:	Tue, 3 May 2016 09:27:51 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Josh Triplett <josh@...htriplett.org>,
	Al Viro <viro@...iv.linux.org.uk>, Stas Sergeev <stsp@...t.ru>,
	Vladimir Davydov <vdavydov@...allels.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>, Tejun Heo <tj@...nel.org>,
	Aleksa Sarai <cyphar@...har.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jason Low <jason.low2@...com>,
	Heinrich Schuchardt <xypron.glpk@....de>,
	Andy Lutomirski <luto@...capital.net>,
	Oleg Nesterov <oleg@...hat.com>,
	"Amanieu d'Antras" <amanieu@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Sasha Levin <sasha.levin@...cle.com>,
	Shuah Khan <shuahkh@....samsung.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Pavel Emelyanov <xemul@...allels.com>,
	Richard Weinberger <richard@....at>,
	Brian Gerst <brgerst@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Paul Moore <pmoore@...hat.com>, Borislav Petkov <bp@...en8.de>
Cc:	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:core/signals] signals/sigaltstack: Implement SS_AUTODISARM flag

On Tue, May 3, 2016 at 12:50 AM, tip-bot for Stas Sergeev
<tipbot@...or.com> wrote:
> Commit-ID:  2a74213838104a41588d86fd5e8d344972891ace
> Gitweb:     http://git.kernel.org/tip/2a74213838104a41588d86fd5e8d344972891ace
> Author:     Stas Sergeev <stsp@...t.ru>
> AuthorDate: Thu, 14 Apr 2016 23:20:04 +0300
> Committer:  Ingo Molnar <mingo@...nel.org>
> CommitDate: Tue, 3 May 2016 08:37:59 +0200
>
> signals/sigaltstack: Implement SS_AUTODISARM flag
>
> This patch implements the SS_AUTODISARM flag that can be OR-ed with
> SS_ONSTACK when forming ss_flags.
>
> When this flag is set, sigaltstack will be disabled when entering
> the signal handler; more precisely, after saving sas to uc_stack.
> When leaving the signal handler, the sigaltstack is restored by
> uc_stack.
>
> When this flag is used, it is safe to switch from sighandler with
> swapcontext(). Without this flag, the subsequent signal will corrupt
> the state of the switched-away sighandler.
>
> To detect the support of this functionality, one can do:
>
>   err = sigaltstack(SS_DISABLE | SS_AUTODISARM);
>   if (err && errno == EINVAL)
>         unsupported();

One of my review comments from last time got lost, I think.  I'll send
a followup patch.

> +/* bit-flags */
> +#define SS_AUTODISARM  (1 << 4)        /* disable sas during sighandling */

Before this gets enshrined as ABI, could we perhaps change this to (1
<< 31)?  I don't see why we should pick a bit in the middle of the
field as our first flag bit.

--Andy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ