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: <20140123164735.GB7097@redhat.com>
Date:	Thu, 23 Jan 2014 17:47:35 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Alex Thorlton <athorlton@....com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Rik van Riel <riel@...hat.com>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andy Lutomirski <luto@...capital.net>,
	Al Viro <viro@...iv.linux.org.uk>,
	Kees Cook <keescook@...omium.org>,
	Andrea Arcangeli <aarcange@...hat.com>
Subject: Re: [PATCH 0/2] mm->def_flags cleanups (Was: Change khugepaged to
	respect MMF_THP_DISABLE flag)

On 01/22, Alex Thorlton wrote:
>
> On Wed, Jan 22, 2014 at 08:43:27PM +0100, Oleg Nesterov wrote:
> > On 01/22, Oleg Nesterov wrote:
> > >
> > > On 01/22, Alex Thorlton wrote:
> > > > > +	case PR_SET_THP_DISABLE:
> > > > > +	case PR_GET_THP_DISABLE:
> > > > > +		down_write(&me->mm->mmap_sem);
> > > > > +		if (option == PR_SET_THP_DISABLE) {
> > > > > +			if (arg2)
> > > > > +				me->mm->def_flags |= VM_NOHUGEPAGE;
> > > > > +			else
> > > > > +				me->mm->def_flags &= ~VM_NOHUGEPAGE;
> > > > > +		} else {
> > > > > +			error = !!(me->mm->flags && VM_NOHUGEPAGE);
> > > >
> > > > Should be:
> > > >
> > > > error = !!(me->mm->def_flags && VM_NOHUGEPAGE);
> > >
> > > No, we need to return 1 if this bit is set ;)
> >
> > Damn, you are right of course, we need "&". I didn't notice "&&"
> > in the patch I sent and misunderstood your "&&" above ;) Sorry.
>
> Actually, I didn't catch that either!  Looking at it, though, we
> definitely do want bitwise AND here, not logical.
>
> However, what I was originally referring to is:  Shouldn't we be
> checking mm->***def_flags*** for the VM_NOHUGEPAGE bit, as opposed
> to mm->flags?  i.e. I think we want this:
>
> error = !!(me->mm->def_flags & VM_NOHUGEPAGE);

Damn, of course you are right. I misunderstood you twice.

But so far I'm afraid this idea can't work anyway, although lets wait
for reply from s390 maintainers.

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