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: <1244244749.31984.16.camel@pasglop>
Date:	Sat, 06 Jun 2009 09:32:29 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Subrata Modak <subrata@...ux.vnet.ibm.com>
Cc:	Paul Mackerras <paulus@...ba.org>, Greg KH <greg@...ah.com>,
	Sachin P Sant <sachinp@...ux.vnet.ibm.com>,
	Linux-Kernel <linux-kernel@...r.kernel.org>,
	Linux-Next <linux-next@...r.kernel.org>,
	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Linuxppc-dev <Linuxppc-dev@...abs.org>,
	Michael Ellerman <michael@...erman.id.au>
Subject: Re: [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig
 [drivers/staging/comedi/drivers.o]


> I tried this. But, with some catch. ‘PAGE_KERNEL_NOCACHE’ seems to be the
> choice for majority of architectures like frv, m32r, sh, x86, etc, as Geert
> mentions below. However, i believe POWERPC defines it as ‘PAGE_KERNEL_NC‘
> found at arch/powerpc/include/asm/pte-common.h.
> 
> Paul/Banjamin,
> Can you please confirm this ?

Read my reply to Greg. Why the heck are you trying to map memory
non-cacheable in the first place ?

Cheers
Ben.

> The below patch fixes the build error.
> 
> Signed-off-by: Subrata Modak <subrata@...ux.vnet.ibm.com>
> ---
> 
> --- linux-2.6.30-rc8/drivers/staging/comedi/drivers.c.orig	2009-06-05 12:46:35.000000000 -0500
> +++ linux-2.6.30-rc8/drivers/staging/comedi/drivers.c	2009-06-05 13:03:31.000000000 -0500
> @@ -43,9 +43,13 @@
>  #include <linux/vmalloc.h>
>  #include <linux/cdev.h>
>  #include <linux/dma-mapping.h>
> -
>  #include <asm/io.h>
>  #include <asm/system.h>
> +#ifdef __powerpc64__
> +#include <asm/pte-common.h>
> +#else
> +#include <asm/pgtable.h>
> +#endif
>  
>  static int postconfig(struct comedi_device *dev);
>  static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s,
> @@ -492,8 +496,13 @@ int comedi_buf_alloc(struct comedi_devic
>  		}
>  		if (i == n_pages) {
>  			async->prealloc_buf =
> +#ifdef __powerpc64__
> +				vmap(pages, n_pages, VM_MAP,
> +				PAGE_KERNEL_NC);
> +#else
>  				vmap(pages, n_pages, VM_MAP,
>  				PAGE_KERNEL_NOCACHE);
> +#endif
>  		}
>  		if (pages) {
>  			vfree(pages);
> 
> ---
> Regards--
> Subrata
> 
> > PAGE_KERNEL_NOCACHE is defined on a few architectures only, namely
> > frv, m32r, mn10300, sh, and x86[*]. On all others, it will fail.
> > 
> > [*] Interestingly, sparc refers to it in one of its include files,
> > without providing a
> >     definition, Probably that code is unused.
> > 
> > Gr{oetje,eeting}s,
> > 
> > 						Geert
> > 
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
> > 

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