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]
Message-Id: <478CAE60.76E4.0078.0@novell.com>
Date:	Tue, 15 Jan 2008 12:00:16 +0000
From:	"Jan Beulich" <jbeulich@...ell.com>
To:	"Andi Kleen" <ak@...e.de>
Cc:	<mingo@...e.hu>, <tglx@...utronix.de>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [26/31] CPA: Fix reference counting when changing
	already changed pages

>>> Andi Kleen <ak@...e.de> 15.01.08 11:04 >>>
>On Tuesday 15 January 2008 10:05:44 Jan Beulich wrote:
>> >+	ref_prot = canon_pgprot(ref_prot);
>> >+	prot = canon_pgprot(prot);
>> >+
>> > 	if (pgprot_val(prot) != pgprot_val(ref_prot)) { 
>> >...
>> > 	} else if (level == 4) {
>> >...
>> > 	} else {
>> > 		/*
>> > 		 * When you're here you either set the same page to PAGE_KERNEL
>> 
>> Doesn't this change require modifying the BUG() here into a BUG_ON() so
>> that it doesn't trigger if pgprot_val(prot) == pgprot_val(ref_prot) and
>> level != 4?
>
>I addressed this in the comment
>
>+               /*
>+                * When you're here you either set the same page to PAGE_KERNEL
>+                * two times in a row or the page table reference counting is
>+                * broken again. To catch the later bug for now (sorry)
>+                */
>
>Do you think it's important to handle?  The function already has too many
>special cases and setting something several times in a row to PAGE_KERNEL
>is usually a bug in the caller anyways (or a cpa bug)

It definitely is when making ref_prot variable (as discussed in an earlier
reply regarding a different patch), but I think it's even inconsistent given
the possible presence/absence of _PAGE_NX.

Jan

--
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