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]
Date:   Thu, 20 Jan 2022 10:25:52 -0800
From:   Wei Xu <weixugc@...gle.com>
To:     Pasha Tatashin <pasha.tatashin@...een.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux MM <linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Rientjes <rientjes@...gle.com>,
        Paul Turner <pjt@...gle.com>, Greg Thelen <gthelen@...gle.com>,
        mingo@...hat.com, will@...nel.org, rppt@...nel.org,
        Dave Hansen <dave.hansen@...ux.intel.com>, hpa@...or.com,
        aneesh.kumar@...ux.ibm.com, jirislaby@...nel.org,
        songmuchun@...edance.com, qydwhotmail@...il.com,
        Hugh Dickins <hughd@...gle.com>, Zi Yan <ziy@...dia.com>,
        anshuman.khandual@....com
Subject: Re: [PATCH 3/3] mm/page_table_check: use unsigned long for page counters

On Wed, Jan 19, 2022 at 8:25 PM Pasha Tatashin
<pasha.tatashin@...een.com> wrote:
>
> For the consistency, use "unsigned long" for all page counters.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@...een.com>
> ---
>  mm/page_table_check.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/mm/page_table_check.c b/mm/page_table_check.c
> index 2341ac382cd5..22dd285ab8d5 100644
> --- a/mm/page_table_check.c
> +++ b/mm/page_table_check.c
> @@ -86,8 +86,8 @@ static void page_table_check_clear(struct mm_struct *mm, unsigned long addr,
>  {
>         struct page_ext *page_ext;
>         struct page *page;
> +       unsigned long i;
>         bool anon;
> -       int i;
>
>         if (!pfn_valid(pfn))
>                 return;
> @@ -121,8 +121,8 @@ static void page_table_check_set(struct mm_struct *mm, unsigned long addr,
>  {
>         struct page_ext *page_ext;
>         struct page *page;
> +       unsigned long i;
>         bool anon;
> -       int i;
>
>         if (!pfn_valid(pfn))
>                 return;
> @@ -186,10 +186,10 @@ static void pmd_clear_level(struct mm_struct *mm, unsigned long addr,
>  void __page_table_check_zero(struct page *page, unsigned int order)
>  {
>         struct page_ext *page_ext = lookup_page_ext(page);
> -       int i;
> +       unsigned long i;
>
>         BUG_ON(!page_ext);
> -       for (i = 0; i < (1 << order); i++) {
> +       for (i = 0; i < (1ul << order); i++) {
>                 struct page_table_check *ptc = get_page_table_check(page_ext);
>
>                 BUG_ON(atomic_read(&ptc->anon_map_count));
> --
> 2.34.1.703.g22d0c6ccf7-goog
>

Reviewed-by: Wei Xu <weixugc@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ