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: <620a27cc-7a5f-473f-8937-5221d257c066@sirena.org.uk>
Date: Fri, 5 Sep 2025 19:02:05 +0100
From: Mark Brown <broonie@...nel.org>
To: Zi Yan <ziy@...dia.com>
Cc: Usama Arif <usamaarif642@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>, david@...hat.com,
	linux-mm@...ck.org, linux-fsdevel@...r.kernel.org, corbet@....net,
	rppt@...nel.org, surenb@...gle.com, mhocko@...e.com,
	hannes@...xchg.org, baohua@...nel.org, shakeel.butt@...ux.dev,
	riel@...riel.com, laoar.shao@...il.com, dev.jain@....com,
	baolin.wang@...ux.alibaba.com, npache@...hat.com,
	lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com,
	ryan.roberts@....com, vbabka@...e.cz, jannh@...gle.com,
	Arnd Bergmann <arnd@...db.de>, sj@...nel.org,
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
	kernel-team@...a.com, Aishwarya.TCV@....com
Subject: Re: [PATCH v5 6/7] selftests: prctl: introduce tests for disabling
 THPs completely

On Fri, Sep 05, 2025 at 01:55:53PM -0400, Zi Yan wrote:
> On 5 Sep 2025, at 13:43, Mark Brown wrote:

> > but the header there is getting ignored AFAICT.  Probably the problem is
> > fairly obvious and I'm just being slow - I'm not quite 100% at the
> > minute.

> prctl_thp_disable.c uses “#include <sys/mman.h>” but asm-generic/mman-common.h
> is included in asm/mman.h. And sys/mman.h gets MADV_COLLAPSE from
> bits/mman-linux.h. Maybe that is why?

Ah, of course - if glibc is reproducing the kernel definitions rather
than including the kernel headers to get them then that'd do it.
Probably the test needs to locally define the new MADV_COLLAPSE for
glibc compatibility, IME trying to directly include the kernel headers
when glibc doesn't normally use them tends to blow up on you sooner or
later.

I knew it'd be something simple, thanks.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ