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: <0c67010a-7d5f-567c-a300-0c75f1c47cb9@redhat.com>
Date:   Mon, 18 Jul 2022 15:03:05 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Miaohe Lin <linmiaohe@...wei.com>, akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: remove unneeded PageAnon check in
 restore_exclusive_pte()

On 16.07.22 10:18, Miaohe Lin wrote:
> When code reaches here, the page must be !PageAnon. There's no need to
> check PageAnon again. Remove it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>  mm/memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memory.c b/mm/memory.c
> index f671b2dce1fe..d98f89cee3e9 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -753,7 +753,7 @@ static void restore_exclusive_pte(struct vm_area_struct *vma,
>  		 * Currently device exclusive access only supports anonymous
>  		 * memory so the entry shouldn't point to a filebacked page.
>  		 */
> -		WARN_ON_ONCE(!PageAnon(page));
> +		WARN_ON_ONCE(1);
>  
>  	set_pte_at(vma->vm_mm, address, ptep, pte);
>  

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ