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: <20150721133457.GC8902@lst.de>
Date:	Tue, 21 Jul 2015 15:34:57 +0200
From:	Christoph Hellwig <hch@....de>
To:	Dan Williams <dan.j.williams@...el.com>
Cc:	tglx@...utronix.de, mingo@...nel.org, hpa@...or.com,
	linux-arch@...r.kernel.org, tony.luck@...el.com,
	linux@....linux.org.uk, arnd@...db.de, benh@...nel.crashing.org,
	mcgrof@...e.com, x86@...nel.org, linux-kernel@...r.kernel.org,
	ralf@...ux-mips.org, geert@...ux-m68k.org, toshi.kani@...com,
	ross.zwisler@...ux.intel.com,
	kbuild test robot <fengguang.wu@...el.com>, hch@....de,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 05/10] arch: unify ioremap prototypes and macro aliases

On Sun, Jul 19, 2015 at 08:18:00PM -0400, Dan Williams wrote:
> Some archs define the first parameter to ioremap() as unsigned long,
> while the balance define it as resource_size_t, similar confusion exists
> for the type of the 'size' parameter.  Unify on (resource_size_t,
> unsigned long) to enable passing ioremap function pointers.  Also, some
> archs use function-like macros for defining ioremap aliases, but
> asm-generic/io.h expects object-like macros, unify on the latter.
> 
> Move all handling of ioremap aliasing (i.e. ioremap_wt => ioremap) to
> include/linux/io.h.  Add a check to lib/devres.c to warn at compile time
> if an arch violates type expectations.

I don't think devres really has aything to do with this code.

> Kill ARCH_HAS_IOREMAP_WC and ARCH_HAS_IOREMAP_WT in favor of just
> testing for ioremap_wc, and ioremap_wt being defined.  This arrangement
> allows drivers to know when ioremap_<foo> are being re-directed to plain
> ioremap.  A later patch uses this arrangement to implement support for
> strict mappings.
> 
> Acked-by: Christoph Hellwig <hch@....de>

I only ACKed this as a band-aid to get the pmem code in.  Now that
we got that in with a less invasive hack I don't see any reasons to
do this over doing the proper common prototypes and per-arch runtime checks
of flags variant.
--
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