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, 18 Feb 2014 15:49:03 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Russell King <rmk@....linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>,
	James Bottomley <James.Bottomley@...allels.com>,
	Linux SCSI List <linux-scsi@...r.kernel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, ARM SoC <arm@...nel.org>
Subject: Re: [GIT PULL] ARM fixes

On Mon, Feb 17, 2014 at 3:46 PM, Russell King <rmk@....linux.org.uk> wrote:
>
> One fix touches code outside of arch/arm, which is related to sorting
> out the DMA masks correctly.  There is a long standing issue with the
> conversion from PFNs to addresses where people assume that shifting an
> unsigned long left by PAGE_SHIFT results in a correct address.

You should probably have used PFN_PHYS(), which does this correctly.
Your explicit u64 isn't exactly wrong, but phys_addr_t is really the
right type for the result.

That said, it's admittedly a disgusting name, and I wonder if we
should introduce a nicer-named "pfn_to_phys()" that matches the other
"xyz_to_abc()" functions we have (including "pfn_to_virt()")

Looking at it, the Xen people then do this disgusting thing:
"__va(PFN_PHYS(pfn))" which is both ugly and pointless (__va() isn't
going to work for a phys_addr_t anyway). And <linux/mm.h> has this
gem:

  __va(PFN_PHYS(page_to_pfn(page)));

Ugh. The ugly - it burns. that really should be
"pfn_to_virt(page_to_pfn())", I think.  Adding a few mailing lists in
the hope that some sucker^Whumanitarian person would want to take a
look.

Anyway, I pulled your change to scsi_lib.c, since it's certainly no
worse than what we used to have, but James and company cc'd too.

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