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-next>] [day] [month] [year] [list]
Date:	Fri, 21 Sep 2007 15:14:52 -0400
From:	Slava Abramov <slava.abramov@....com>
To:	linux-kernel@...r.kernel.org
Subject: ptep_test_and_clear_young() i386 vs. x86_64 

Hi All!

Is there any special reason why ptep_test_and_clear_young()
implementation for x86_64 does not call pte_update()?

Compare the following:

include/asm-x86_64/pgtable.h:

static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, 
unsigned long addr, pte_t *ptep)
{
        if (!pte_young(*ptep))
               return 0;
        return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte);

}

include/asm-i386/pgtable.h:

#define ptep_test_and_clear_young(vma, addr, ptep) ({                   \
        int __ret = 0;                                                  \
        if (pte_young(*(ptep)))                                         \
                __ret = test_and_clear_bit(_PAGE_BIT_ACCESSED,          \
                                                &(ptep)->pte_low);       \
        if (__ret)                                                      \
                pte_update((vma)->vm_mm, addr, ptep);                   
     \
        __ret;                                                          \

})


Slava

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ