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: <CAHbLzkrvwXOhjbH9pMoJq_-r9nCbwW=HrTnkA3avP2C=7QaMNg@mail.gmail.com>
Date: Tue, 29 Oct 2024 09:08:22 -0700
From: Yang Shi <shy828301@...il.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, "Liam R . Howlett" <Liam.Howlett@...cle.com>, 
	Vlastimil Babka <vbabka@...e.cz>, Jann Horn <jannh@...gle.com>, linux-kernel@...r.kernel.org, 
	linux-mm@...ck.org, Linus Torvalds <torvalds@...ux-foundation.org>, 
	Peter Xu <peterx@...hat.com>, Catalin Marinas <catalin.marinas@....com>, 
	Will Deacon <will@...nel.org>, Mark Brown <broonie@...nel.org>, 
	"David S . Miller" <davem@...emloft.net>, Andreas Larsson <andreas@...sler.com>
Subject: Re: [PATCH hotfix 6.12 v3 4/5] mm: refactor arch_validate_flags() and
 arm64 MTE handling

On Tue, Oct 29, 2024 at 8:52 AM Lorenzo Stoakes
<lorenzo.stoakes@...cle.com> wrote:
>
> On Tue, Oct 29, 2024 at 08:43:04AM -0700, Yang Shi wrote:
>
> >
> > Sorry for chiming in late. This looks problematic IIUC. The patch 5/5
> > moved arch_validate_flags() before call_mmap() as the commit log said.
> > But shmem_file() does this check:
> > mapping->a_ops == &shmem_aops
> >
> > But mapping->a_ops is not initialized until shmem_mmap(), which is
> > called by call_mmap().
> >
> > So shmem_file() should always return false here. Did I miss something?
>
> Well firstly this is tested and works so you did miss something :)
>
> Bu shmem_mmap() is not setting mapping->a_ops, it's setting vma->vm_ops.
>
> __shmem_get_inode() and shmem_symlink() set mapping->a_ops.

My bad, stared at "_ops", but missed "vm" prefix. And shmem_mmap()
can't touch a_ops. Sorry for the disruption.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ