Re: [PATCH] mm/mprotect: Fix soft-dirty check in can_change_pte_writable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux