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]
Message-ID: <Y+veLBmkWIfOpWzL@ubun2204.myguest.virtualbox.org>
Date:   Wed, 15 Feb 2023 00:47:00 +0530
From:   Deepak R Varma <drv@...lo.com>
To:     Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, willy@...radead.org,
        Saurabh Singh Sengar <ssengar@...rosoft.com>,
        Praveen Kumar <kumarpraveen@...ux.microsoft.com>
Subject: Re: Query on mm/folio-compat: pagecache_get_page

On Tue, Feb 14, 2023 at 10:35:33AM -0800, Sidhartha Kumar wrote:
> On 2/14/23 10:23 AM, Deepak R Varma wrote:
> > Hello,
> > Could someone comment if it is safe to access the page member variable as
> > written on line #100 when folio is NULL as returned from the
> 
> It is safe to access the page member variable when folio is NULL because the
> offset of page within struct folio is 0.[1]

Wow. This is so well thought. Thank you Sidhartha.

./drv

> 
> 
> [1] https://lore.kernel.org/lkml/Y7h4jsv6jl0XSIsk@casper.infradead.org/T/
> 
> Thanks,
> Sidhartha Kumar
> 
> > __filemap_get_folio() function call? Is this kind of intentional page-fault
> > trigger for the system to handle a new/fresh page allocation?
> > 
> > 	  2         folio = __filemap_get_folio(mapping, index, fgp_flags, gfp);
> > 	  1         if (!folio || xa_is_value(folio))
> > 	100                 return &folio->page;
> > 	  1         return folio_file_page(folio, index);
> > 
> > The code is part of commit ID c5255b421fd04
> > 
> > Thank you,
> > ./drv
> > 
> > 
> > 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ