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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 8 Sep 2006 20:33:40 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [patch 1/2] own header file for struct page.

> > This moves the definition of struct page from mm.h to its own header file
> > page.h.
> > This is a prereq to fix SetPageUptodate which is broken on s390:
> > 
> > #define SetPageUptodate(_page)
> >        do {
> >                struct page *__page = (_page);
> >                if (!test_and_set_bit(PG_uptodate, &__page->flags))
> >                        page_test_and_clear_dirty(_page);
> >        } while (0)
> > 
> > _page gets used twice in this macro which can cause subtle bugs. Using
> > __page for the page_test_and_clear_dirty call doesn't work since it
> > causes yet another problem with the page_test_and_clear_dirty macro as
> > well.
> > In order to get of all these problems caused by macros it seems to
> > be a good idea to get rid of them and convert them to static inline
> > functions. Because of header file include order it's necessary to have a
> > seperate header file for the struct page definition.
> > 
> 
> hmm.
> 
> > --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> > +++ linux-2.6/include/linux/page.h	2006-09-08 13:10:23.000000000 +0200
> 
> We have asm/page.h, and one would expect that a <linux/page.h> would be
> related to <asm/page.h> in the usual fashion.  But it isn't.
> 
> Can we think of a different filename? page-struct.h, maybe? pageframe.h?

Yes, of course.

> > +#ifndef CONFIG_DISCONTIGMEM
> > +/* The array of struct pages - for discontigmem use pgdat->lmem_map */
> > +extern struct page *mem_map;
> > +#endif
> 
> Am surprised to see this declaration in this file.

Hmm... first I thought I could add the same declaration to asm-s390/pgtable.h.
But then deciced against it, since I would just duplicate code.
Any better idea where to put it?
-
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