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]
Date:	Mon, 20 Sep 2010 17:58:59 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
	Tejun Heo <tj@...nel.org>, Avi Kivity <avi@...hat.com>
Subject: Re: [RFC][PATCH 0/2] PF_flags cleaups

On Mon, 2010-09-20 at 08:40 -0700, Linus Torvalds wrote:
> On Mon, Sep 20, 2010 at 8:13 AM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> > Because we recently ran out of PF_flags, try and clean up.
> >
> > Patches are on top of -tip, which already includes the PF_ALIGNWARN
> > removal.
> 
> Looks ok by me conceptually, but I _really_ hate the naming of that
> second patch and the pointless churn.
> 

> and look how much straightforward it would have been had you just kept
> the same simple semantics with just a new field:
> 
> -       new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);
> +       new_type &= ~(TT_SUPERPRIV | TT_WQ_WORKER);
> 
> and nobody could possibly have any objections to a straightforward
> "move the task type flags into a separate field" patch.

Sure, can do. Like said, my initial approach was to compress these type
bits into fewer bits by converting all these individual bits (PF_KSWAPD,
PF_WQ_WORKER, etc) into a linear range which spans less bits.

But indeed, if we're OK with adding a new field (which is I think the
biggest question, and your reply seems imply you don't mind at all),
then keeping the old structure and moving them over to a new field will
generate a much saner patch.

(I only left the helper functions in in case people would object to
adding another field and we'd need to really compress bits again).

One point though, I noticed we actually expose p->flags to userspace,
which basically makes PF_flags an ABI, do we care?
--
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