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: <47624253.7060507@goop.org>
Date:	Fri, 14 Dec 2007 00:44:03 -0800
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Jan Beulich <jbeulich@...ell.com>
CC:	Ingo Molnar <mingo@...e.hu>,
	Glauber de Oliveira Costa <glommer@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] x86: clean up asm-x86/page*.h

Jan Beulich wrote:
>> --- a/arch/x86/mm/fault_64.c
>> +++ b/arch/x86/mm/fault_64.c
>> @@ -158,22 +158,22 @@ void dump_pagetable(unsigned long addres
>> 	pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); 
>> 	pgd += pgd_index(address);
>> 	if (bad_address(pgd)) goto bad;
>> -	printk("PGD %lx ", pgd_val(*pgd));
>> +	printk("PGD %lx ", (unsigned long)pgd_val(*pgd));
>>     
>
> Casts like this here and elsewhere look rather odd (in fact I think using
> casts should really be limited to places where you either can't do it
> differently or the code would become badly readable or much uglier
> without them). I would therefore favor simply using the right formatting
> specifier here.

I would agree, but pgd_val() is defined as returning a pgdval_t, which
is typedefed to be unsigned long.  I'll have another look, but I don't
think there's an appropriate format for this.

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