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: <906b0150-ef7c-d2b9-783f-4e94c48fa367@redhat.com>
Date:   Thu, 1 Dec 2022 14:01:22 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Pavankumar Kondeti <quic_pkondeti@...cinc.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Suren Baghdasaryan <surenb@...gle.com>,
        Minchan Kim <minchan@...nel.org>,
        Charan Teja Kalla <quic_charante@...cinc.com>,
        Prakash Gupta <quic_guptap@...cinc.com>,
        Divyanand Rangu <quic_drangu@...cinc.com>
Subject: Re: [PATCH] mm/madvise: fix madvise_pageout for private file mappings

> +	 * If the VMA belongs to a private file mapping, there can be private
> +	 * dirty pages which can be paged out if even this process is neither
> +	 * owner nor write capable of the file. Cache the file access check
> +	 * here and use it later during page walk.
> +	 */
> +	can_pageout_file = can_do_file_pageout(vma);

Why not move that into madvise_pageout_page_range() ? Avoids passing 
this variable to that function.

In fact, why not even call that function directly instead of storing 
that in madvise_walk_private(). The function is extremely lightweight.

>   
>   	lru_add_drain();
>   	tlb_gather_mmu(&tlb, mm);
> -	madvise_pageout_page_range(&tlb, vma, start_addr, end_addr);
> +	madvise_pageout_page_range(&tlb, vma, start_addr, end_addr, can_pageout_file);
>   	tlb_finish_mmu(&tlb);
>   
>   	return 0;

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ