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: <alpine.LSU.2.00.1203231416260.2235@eggly.anvils>
Date:	Fri, 23 Mar 2012 14:20:27 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Al Viro <viro@...iv.linux.org.uk>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH] swapon: check validity of swap_flags

On Fri, 23 Mar 2012, Andrew Morton wrote:
> On Fri, 23 Mar 2012 13:48:35 -0700 (PDT)
> Hugh Dickins <hughd@...gle.com> wrote:
> 
> > Most system calls taking flags first check that the flags passed in are
> > valid, and that helps userspace to detect when new flags are supported.
> > 
> > But swapon never did so: start checking now, to help if we ever want to
> > support more swap_flags in future.
> > 
> > It's difficult to get stray bits set in an int, and swapon is not widely
> > used, so this is most unlikely to break any userspace; but we can just
> > revert if it turns out to do so.
> 
> It would be safer to emit a nasty message then let the swapon proceed
> as before.

Safer, I suppose, but I really don't expect that case to arise (we'll
have been doing those lovely runtime discards without asking for a year
now if so).  And it does spoil the checking of supported flags.

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