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] [day] [month] [year] [list]
Date: Sat, 8 Jun 2024 10:22:57 +0000
From: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Shuah Khan <shuah@...nel.org>, linux-mm@...ck.org, gost.dev@...sung.com,
	David Hildenbrand <david@...hat.com>, willy@...radead.org,
	mcgrof@...nel.org, linux-kselftest@...r.kernel.org,
	linux-kernel@...r.kernel.org, Zi Yan <zi.yan@...t.com>,
	Pankaj Raghav <p.raghav@...sung.com>
Subject: Re: [PATCH v3] selftests/mm: use asm volatile to not optimize mmap
 read variable

On Fri, Jun 07, 2024 at 09:39:36PM -0700, Andrew Morton wrote:
> On Thu,  6 Jun 2024 20:36:19 +0000 "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com> wrote:
> 
> > From: Pankaj Raghav <p.raghav@...sung.com>
> > 
> > create_pagecache_thp_and_fd() in split_huge_page_test.c used the
> > variable dummy to perform mmap read.
> > 
> > However, this test was skipped even on XFS which has large folio
> > support. The issue was compiler (gcc 13.2.0) was optimizing out the
> > dummy variable, therefore, not creating huge page in the page cache.
> > 
> > Use asm volatile() trick to force the compiler not to optimize out
> > the loop where we read from the mmaped addr. This is similar to what is
> > being done in other tests (cow.c, etc)
> > 
> > As the variable is now used in the asm statement, remove the unused
> > attribute.
> > 
> 
> What are the runtime effects of this change?  An inappropriate test
> failure?  If so, shouldn't we fix 6.9.x kernels also?  And is
> fc4d182316bd ("mm: huge_memory: enable debugfs to split huge pages to
> any order") an appropriate Fixes: target?

I mentioned it here in the commit message:

However, this test was skipped even on XFS which has large folio
support.

So the test just skip these cases and does not fail. That is why I
didn't use the Fixes tag. Let me know if it needs one.

--
Pankaj

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ