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-next>] [day] [month] [year] [list]
Message-ID: <CAHO5Pa0VCzR7oqNXkwELuAsNQnnvF8Xoo=CuCaM64-GzjDuoFA@mail.gmail.com>
Date:	Mon, 14 Apr 2014 12:15:01 +0200
From:	Michael Kerrisk <mtk.manpages@...il.com>
To:	Alex Thorlton <athorlton@....com>
Cc:	Linux Kernel <linux-kernel@...r.kernel.org>,
	Gerald Schaefer <gerald.schaefer@...ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Christian Borntraeger <borntraeger@...ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Paolo Bonzini <pbonzini@...hat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Oleg Nesterov <oleg@...hat.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	linux-mm <linux-mm@...ck.org>,
	Linux API <linux-api@...r.kernel.org>,
	linux-man@...r.kernel.org,
	Michael Kerrisk-manpages <mtk.manpages@...il.com>
Subject: Documenting prctl() PR_SET_THP_DISABLE and PR_GET_THP_DISABLE

Alex,

Your commit a0715cc22601e8830ace98366c0c2bd8da52af52 added the prctl()
PR_SET_THP_DISABLE and PR_GET_THP_DISABLE flags.

The text below attempts to document these flags for the prctl(3).
Could you (and anyone else who is willing) please review the text
below (one or two p[ieces of which are drawn from your commit message)
to verify that it accurately reflects reality and your intent, and
that I have not missed any significant details.

    DESCRIPTION
    ...
       PR_SET_THP_DISABLE (since Linux 3.15)
              Set the state of the "THP disable" flag for the  calling
              thread.   If  arg2 has a nonzero value, the flag is set,
              otherwise it is cleared.  Setting this flag  provides  a
              method  for disabling  transparent  huge  pages for jobs
              where the code cannot be modified, and  using  a  malloc
              hook  with madvise(2) is not an option (i.e., statically
              allocated data).  The setting of the "THP disable"  flag
              is  inherited by a child created via fork(2) and is pre‐
              served across execve(2).

       PR_GET_THP_DISABLE (since Linux 3.15)
              Return (via the function result) the current setting  of
              the "THP disable" flag for the calling thread: either 1,
              if the flag is set, or 0, if it is not.
    ...
    RETURN VALUE
       On       success,       PR_GET_DUMPABLE,       PR_GET_KEEPCAPS,
       PR_GET_NO_NEW_PRIVS,    PR_GET_THP_DISABLE,    PR_CAPBSET_READ,
       PR_GET_TIMING,       PR_GET_TIMERSLACK,      PR_GET_SECUREBITS,
       PR_MCE_KILL_GET, and (if it returns) PR_GET_SECCOMP return  the
       nonnegative  values  described  above.  All other option values
       return 0 on success.  On error, -1 is returned,  and  errno  is
       set appropriately.
    ...
    ERRORS
       EINVAL option is PR_SET_THP_DISABLE and arg3, arg4, or arg5  is
              nonzero.

       EINVAL option  is  PR_GET_THP_DISABLE  and arg2, arg3, arg4, or
              arg5 is nonzero.

Thanks,

Michael



-- 
Michael Kerrisk Linux man-pages maintainer;
http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface", http://blog.man7.org/
--
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