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-next>] [day] [month] [year] [list]
Date:	Tue, 09 Dec 2008 10:05:02 +0000
From:	"Jan Beulich" <jbeulich@...ell.com>
To:	<mingo@...e.hu>, "Andi Kleen" <andi@...stfloor.org>,
	<tglx@...utronix.de>, <hpa@...or.com>
Cc:	<linux-kernel@...r.kernel.org>
Subject: x86-64: __pa_symbol() vs. __pa()

Can any of you recall the reason for the comment accompanying the
__pa_symbol() definition:

/* __pa_symbol should be used for C visible symbols.
   This seems to be the official gcc blessed way to do such arithmetic. */

To me this rather sounds like a compiler problem, and if it indeed
exists then at least a few incorrect use have slipped in recently:
- arch/x86/mm/ioremap.c passes bm_pte to __pa()
- arch/x86/mm/pageattr.c passes _text and __{start,end}_rodata
  to __pa()
- arch/x86/mm/pgtable.c and arch/x86/xen/smp.c pass
  swapper_pg_dir to __pa()
- arch/x86/xen/enlighten passes level3_user_vsyscall to __pa()
This is only the set where x86-64 (which prior to the merge had
above comment already) is affected, i386 would have a few more.

What would be particularly problematic is the potential indirect use
of __pa(), e.g. through Xen's virt_to_{machine,bus}() as well as
the use in common code (e.g. kernel/kexec.c).

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