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:	Sun, 12 Jan 2014 14:56:00 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Alex Thorlton <athorlton@....com>
Cc:	linux-mm@...ck.org, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.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>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] mm: thp: Add per-mm_struct flag to control THP

On 01/11, Alex Thorlton wrote:
>
> On Sat, Jan 11, 2014 at 04:53:37PM +0100, Oleg Nesterov wrote:
>
> > I simply can't understand, this all looks like overkill. Can't you simply add
> >
> > 	#idfef CONFIG_TRANSPARENT_HUGEPAGE
> > 	case GET:
> > 		error = test_bit(MMF_THP_DISABLE);
> > 		break;
> > 	case PUT:
> > 		if (arg2)
> > 			set_bit();
> > 		else
> > 			clear_bit();
> > 		break;
> > 	#endif
> >
> > into sys_prctl() ?	
>
> That's probably a better solution.  I wasn't sure whether or not it was
> better to have two functions to handle this, or to have one function
> handle both.  If you think it's better to just handle both with one,
> that's easy enough to change.

Personally I think sys_prctl() can handle this itself, without a helper.
But of course I won't argue, this is up to you.

My only point is, the kernel is already huge ;) Imho it makes sense to
try to lessen the code size, when the logic is simple.

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