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:	Mon, 10 Jan 2011 16:26:28 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Haavard Skinnemoen <hskinnemoen@...el.com>,
	Linux-MM <linux-mm@...ck.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Nick Piggin <npiggin@...nel.dk>,
	Xen-devel <xen-devel@...ts.xensource.com>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH 2/9] mm: add apply_to_page_range_batch()

. snip..
>  static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
>  				     unsigned long addr, unsigned long end,
> -				     pte_fn_t fn, void *data)
> +				     pte_batch_fn_t fn, void *data)
>  {
>  	pte_t *pte;
>  	int err;
> -	pgtable_t token;
>  	spinlock_t *uninitialized_var(ptl);
>  
>  	pte = (mm == &init_mm) ?
> @@ -1940,25 +1939,17 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
>  	BUG_ON(pmd_huge(*pmd));
>  
>  	arch_enter_lazy_mmu_mode();
> -
> -	token = pmd_pgtable(*pmd);
> -
> -	do {
> -		err = fn(pte++, addr, data);
> -		if (err)
> -			break;
> -	} while (addr += PAGE_SIZE, addr != end);
> -
> +	err = fn(pte, (end - addr) / PAGE_SIZE, addr, data);
>  	arch_leave_lazy_mmu_mode();
>  
>  	if (mm != &init_mm)
> -		pte_unmap_unlock(pte-1, ptl);
> +		pte_unmap_unlock(pte, ptl);

That looks like a bug fix as well? Did this hit us before the change or was
it masked by the fact that the code never go to here?

>  	return err;
>  }
--
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