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] [day] [month] [year] [list]
Message-Id: <1202509179.17934.663.camel@cinder.waste.org>
Date:	Fri, 08 Feb 2008 16:19:39 -0600
From:	Matt Mackall <mpm@...enic.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	vapier@...too.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] stub out is_swap_pte for !MMU


On Fri, 2008-02-08 at 14:05 -0800, Andrew Morton wrote:
> On Fri, 08 Feb 2008 15:41:42 -0600
> Matt Mackall <mpm@...enic.com> wrote:
> 
> > Fix compile error on nommu for is_swap_pte
> > 
> > Does it ever make sense to ask "is this pte a swap entry?" on a machine
> > with no MMU? Presumably this also means it has no ptes too, right? In
> > which case, it's better to comment the whole function out. Then when
> > someone tries to ask the above meaningless question, they get a compile
> > error rather than a meaningless answer.
> > 
> > Signed-off-by: Matt Mackall <mpm@...enic.com>
> > 
> > diff -r 50a6e531a9f2 include/linux/swapops.h
> > --- a/include/linux/swapops.h	Mon Feb 04 20:23:02 2008 -0600
> > +++ b/include/linux/swapops.h	Fri Feb 08 15:38:01 2008 -0600
> > @@ -42,11 +42,13 @@
> >  	return entry.val & SWP_OFFSET_MASK(entry);
> >  }
> >  
> > +#ifdef CONFIG_MMU
> >  /* check whether a pte points to a swap entry */
> >  static inline int is_swap_pte(pte_t pte)
> >  {
> >  	return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
> >  }
> > +#endif
> >  
> 
> Seems contradictory.  Is there _really_ a compilation error at present? 
> The changelog seems to imply otherwise and no compiler error output is
> quoted and it all compiled OK for me on nommu superh.

Sorry, here's the compile error from the original thread (where the
original copy of the above patch was posted).

...
  CC      mm/vmscan.o
In file included from 
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/vmscan.c:44:
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h: In function 'is_swap_pte':
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_none'
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/swapops.h:48: error: implicit declaration of function 'pte_present'
make[2]: *** [mm/vmscan.o] Error 1

-- 
Mathematics is the supreme nostalgia of our time.

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