PR_GET_MDWE(2const)
π PR_GET_MDWE π
okay so bestie, welcome to the PR_GET_MDWE page from the Linux man-pages (that's the 2const section, we love a const page, it's giving reference material β¨). This is the one where you ask the kernel "hey queen, what's my Memory-Deny-Write-Execute protection mask looking like rn?" π
π NAME π
PR_GET_MDWE β get the Memory-Deny-Write-Execute protection mask for the calling process π¦
like, for the calling process, not somebody else's. it's about you. main character energy fr fr π
π LIBRARY π
Standard C library (libc, -lc) πΈ
β¨ SYNOPSIS β¨
#include <linux/prctl.h> /* Definition of PR_* constants */
#include <sys/prctl.h>
int prctl(PR_GET_MDWE, 0L, 0L, 0L, 0L);
no cap, look at those args β four little 0Ls just vibing there doing absolutely nothing π they're placeholders, we're not here for them, we're here for the mask.
π DESCRIPTION π
So what this does: it returns the Memory-Deny-Write-Execute protection mask of the calling process. That's it. That's the whole job. π«Ά
and if you wanna know what the actual bits in that mask mean?? girl, go read PR_SET_MDWE(2const), because that's where the protection mask bits get explained. This page is not the bits page. This page is the getter. iykyk π
π RETURN VALUE π
- On success β a nonnegative value comes back π (that's your mask, bestie)
- On error β
-1returns π anderrnogets set to tell you what went wrong
π STANDARDS π
Linux. that's it, that's the standard, periodt. π
β HISTORY β
Linux 6.3 π§ so it's a newer baby, be nice to it.
π SEE ALSO π
prctl(2)β the parent function, the whole reason we're herePR_SET_MDWE(2const)β the setter sibling, the one with the actual mask bits explained π₯
π psst β seriously, if you're confused about what the mask bits even mean, PR_SET_MDWE(2const) is right there. this page assumes you already know. no gatekeeping, just pointing you to the lore π
okay that's the whole page, you ate that, go protect some memory π β¨
with love from Linux man-pages 6.20, dated 2025-05-17 β mwah, kisses, bye bestie ππ¦
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms