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] [day] [month] [year] [list]
Date:	Thu, 31 Jul 2008 17:11:15 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Eduardo Habkost <ehabkost@...hat.com>
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xen_alloc_ptpage: cast PFN_PHYS() argument to unsigned
	long


* Eduardo Habkost <ehabkost@...hat.com> wrote:

> Currently paravirt_ops alloc_p*() uses u32 for the pfn args. We should 
> change that later, but while the pfn parameter is still u32, we need 
> to cast the PFN_PHYS() argument at xen_alloc_ptpage() to unsigned 
> long, otherwise it will lose bits on the shift.
> 
> I think PFN_PHYS() should behave better when fed with smaller 
> integers, but a cast to unsigned long won't be enough for all cases on 
> 32-bit PAE, and a cast to u64 would be overkill for most users of 
> PFN_PHYS().
> 
> We could have two different flavors of PFN_PHYS: one for low pages 
> only (unsigned long) and another that works for any page (u64)), but 
> while we don't have it, we will need the cast to unsigned long on 
> xen_alloc_ptpage().
> 
> Signed-off-by: Eduardo Habkost <ehabkost@...hat.com>
> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>

applied to tip/x86/xen - thanks Eduardo.

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