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: <20111017182345.GA14416@suse.de>
Date:	Mon, 17 Oct 2011 11:23:45 -0700
From:	Greg KH <gregkh@...e.de>
To:	"Hans J. Koch" <hjk@...sjkoch.de>
Cc:	Kumar Gala <galak@...nel.crashing.org>, linuxppc-dev@...abs.org,
	linux-kernel@...r.kernel.org, Kai Jiang <Kai.Jiang@...escale.com>
Subject: Re: [PATCH] uio: Support 36-bit physical addresses on 32-bit systems

On Mon, Oct 17, 2011 at 08:03:51PM +0200, Hans J. Koch wrote:
> On Mon, Oct 17, 2011 at 07:18:59PM +0200, Hans J. Koch wrote:
> > On Mon, Oct 17, 2011 at 11:00:55AM -0500, Kumar Gala wrote:
> > > 
> > > On Oct 14, 2011, at 1:31 PM, Hans J. Koch wrote:
> > > 
> > > > On Thu, Oct 13, 2011 at 10:50:58AM -0500, Kumar Gala wrote:
> > > >> From: Kai Jiang <Kai.Jiang@...escale.com>
> > > >> 
> > > >> To support >32-bit physical addresses for UIO_MEM_PHYS type we need to
> > > >> extend the width of 'addr' in struct uio_mem.  Numerous platforms like
> > > >> embedded PPC, ARM, and X86 have support for systems with larger physical
> > > >> address than logical.
> > > >> 
> > > >> Since 'addr' may contain a physical, logical, or virtual address the
> > > >> easiest solution is to just change the type to 'phys_addr_t' which
> > > >> should always be greater than or equal to the sizeof(void *) such that
> > > >> it can properly hold any of the address types.
> > > >> 
> > > >> For physical address we can support up to a 44-bit physical address on a
> > > >> typical 32-bit system as we utilize remap_pfn_range() for the mapping of
> > > >> the memory region and pfn's are represnted by shifting the address by
> > > >> the page size (typically 4k).
> > > >> 
> > > >> Signed-off-by: Kai Jiang <Kai.Jiang@...escale.com>
> > > >> Signed-off-by: Minghuan Lian <Minghuan.Lian@...escale.com>
> > > >> Signed-off-by: Kumar Gala <galak@...nel.crashing.org>
> > > > 
> > > > Signed-off-by: "Hans J. Koch" <hjk@...sjkoch.de>
> > > > 
> > > > That looks good to me. There's an unnecessary cast (see below), but I fixed that
> > > > on the way.
> > > > 
> > > > Greg, please pull this from branch uio-for-gregkh from
> > > > 
> > > > git://hansjkoch.de/git/linux-hjk
> > > > 
> > > > Thanks,
> > > > Hans
> > > 
> > > I think removing that cast is wrong:
> > > 
> > > drivers/uio/uio.c: In function 'uio_vma_fault':
> > > drivers/uio/uio.c:637:26: warning: cast to pointer from integer of different size
> > 
> > Hmm, on what platform did you see this? I tested on 32bit-x86 and didn't get
> > any warnings.
> 
> OK, you're right. I turned on CONFIG_HIGHMEM64G and got that warning. Damned x86...
> 
> Greg, can you fix it, or should I send the patch again?

Please send it again.
--
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