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]
Date:	Mon, 24 Jan 2011 12:44:12 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Sergei Shtylyov <sshtylyov@...sta.com>
Cc:	Yoichi Yuasa <yuasa@...ux-mips.org>,
	linux-mips <linux-mips@...ux-mips.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix build error when CONFIG_SWAP is not set

On Mon, 24 Jan 2011 22:30:46 +0300
Sergei Shtylyov <sshtylyov@...sta.com> wrote:

> Hello.
> 
> Yoichi Yuasa wrote:
> 
> > In file included from
> > linux-2.6/arch/mips/include/asm/tlb.h:21,
> >                  from mm/pgtable-generic.c:9:
> > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > include/asm-generic/tlb.h:76: error: implicit declaration of function
> > 'release_pages'
> > include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > include/asm-generic/tlb.h:105: error: implicit declaration of function
> > 'page_cache_release'
> > make[1]: *** [mm/pgtable-generic.o] Error 1
> > 
> > Signed-off-by: Yoichi Yuasa <yuasa@...ux-mips.org>
> [...]
> 
> > diff --git a/include/linux/swap.h b/include/linux/swap.h
> > index 4d55932..92c1be6 100644
> > --- a/include/linux/swap.h
> > +++ b/include/linux/swap.h
> > @@ -8,6 +8,7 @@
> >  #include <linux/memcontrol.h>
> >  #include <linux/sched.h>
> >  #include <linux/node.h>
> > +#include <linux/pagemap.h>
> 
>     Hm, if the errors are in <asm-generic/tlb.h>, why add #include in 
> <linux/swap.h>?
> 

The build error is caused by macros which are defined in swap.h.

I worry about the effects of the patch - I don't know which of swap.h
and pagemap.h is the "innermost" header file.  There's potential for
new build errors due to strange inclusion graphs.

err, there's also this, in swap.h:

/* only sparc can not include linux/pagemap.h in this file
 * so leave page_cache_release and release_pages undeclared... */

It would be safer to convert free_page_and_swap_cache() and
free_pages_and_swap_cache() into out-of-line C functions.  Or to
explicitly include pagemap.h into the offending .c files.

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