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:   Wed, 20 Jul 2022 18:02:56 -0400
From:   Peter Xu <peterx@...hat.com>
To:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     David Hildenbrand <david@...hat.com>,
        Nadav Amit <nadav.amit@...il.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm/mprotect: Fix soft-dirty check in
 can_change_pte_writable()

On Wed, Jul 20, 2022 at 05:53:19PM -0400, Peter Xu wrote:
> void clear_refs_write(void)
> {
>     int fd = open("/proc/self/clear_refs", O_RDWR);
> 
>     assert(fd >= 0);
>     write(fd, "4", 2);
>     close(fd);
> }
> 

Oops, git dropped some of the lines starting with "#"..  Let me retry, sorry.

>         bool dirty = pagemap_read_vaddr(fd, page) & PM_SOFT_DIRTY;      \
>         if (dirty != expect) {                                          \
>             printf("ERROR: %s, soft-dirty=%d (expect: %d)\n", str, dirty, expect); \
>             exit(-1);                                                   \
>         }                                                               \
> } while (0)

-- 
Peter Xu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ