<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/mm, branch linux-2.6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2006-11-14T17:09:27Z</updated>
<entry>
<title>[PATCH] hugetlb: prepare_hugepage_range check offset too</title>
<updated>2006-11-14T17:09:27Z</updated>
<author>
<name>Hugh Dickins</name>
</author>
<published>2006-11-14T10:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=68589bc353037f233fe510ad9ff432338c95db66'/>
<id>urn:sha1:68589bc353037f233fe510ad9ff432338c95db66</id>
<content type='text'>
(David:)

If hugetlbfs_file_mmap() returns a failure to do_mmap_pgoff() - for example,
because the given file offset is not hugepage aligned - then do_mmap_pgoff
will go to the unmap_and_free_vma backout path.

But at this stage the vma hasn't been marked as hugepage, and the backout path
will call unmap_region() on it.  That will eventually call down to the
non-hugepage version of unmap_page_range().  On ppc64, at least, that will
cause serious problems if there are any existing hugepage pagetable entries in
the vicinity - for example if there are any other hugepage mappings under the
same PUD.  unmap_page_range() will trigger a bad_pud() on the hugepage pud
entries.  I suspect this will also cause bad problems on ia64, though I don't
have a machine to test it on.

(Hugh:)

prepare_hugepage_range() should check file offset alignment when it checks
virtual address and length, to stop MAP_FIXED with a bad huge offset from
unmapping before it fails further down.  PowerPC should apply the same
prepare_hugepage_range alignment checks as ia64 and all the others do.

Then none of the alignment checks in hugetlbfs_file_mmap are required (nor
is the check for too small a mapping); but even so, move up setting of
VM_HUGETLB and add a comment to warn of what David Gibson discovered - if
hugetlbfs_file_mmap fails before setting it, do_mmap_pgoff's unmap_region
when unwinding from error will go the non-huge way, which may cause bad
behaviour on architectures (powerpc and ia64) which segregate their huge
mappings into a separate region of the address space.

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Acked-by: Adam Litke &lt;agl@us.ibm.com&gt;
Acked-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] Make high hugepage areas preempt safe</title>
<updated>2006-11-01T03:52:48Z</updated>
<author>
<name>Hugh Dickins</name>
</author>
<published>2006-10-31T18:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96268889ee369b36203b7a06e8aabb197270216e'/>
<id>urn:sha1:96268889ee369b36203b7a06e8aabb197270216e</id>
<content type='text'>
Checking source for other get_paca()-&gt;field preemption dangers found that
open_high_hpage_areas does a structure copy into its paca while preemption
is enabled: unsafe however gcc accomplishes it.  Just remove that copy:
it's done safely afterwards by on_each_cpu, as in open_low_hpage_areas.

Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Acked-by: David Gibson &lt;dwg@au1.ibm.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] mm: use symbolic names instead of indices for zone initialisation</title>
<updated>2006-10-11T18:14:14Z</updated>
<author>
<name>Mel Gorman</name>
</author>
<published>2006-10-11T08:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6391af174ad75f72e92043c1dd8302660a2fec58'/>
<id>urn:sha1:6391af174ad75f72e92043c1dd8302660a2fec58</id>
<content type='text'>
Arch-independent zone-sizing is using indices instead of symbolic names to
offset within an array related to zones (max_zone_pfns).  The unintended
impact is that ZONE_DMA and ZONE_NORMAL is initialised on powerpc instead
of ZONE_DMA and ZONE_HIGHMEM when CONFIG_HIGHMEM is set.  As a result, the
the machine fails to boot but will boot with CONFIG_HIGHMEM turned off.

The following patch properly initialises the max_zone_pfns[] array and uses
symbolic names instead of indices in each architecture using
arch-independent zone-sizing.  Two users have successfully booted their
powerpcs with it (one an ibook G4).  It has also been boot tested on x86,
x86_64, ppc64 and ia64.  Please merge for 2.6.19-rc2.

Credit to Benjamin Herrenschmidt for identifying the bug and rolling the
first fix.  Additional credit to Johannes Berg and Andreas Schwab for
reporting the problem and testing on powerpc.

Signed-off-by: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://oak/home/sfr/kernels/iseries/work</title>
<updated>2006-10-04T05:02:27Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2006-10-04T05:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c730f5b621afa33e9f4939da9078669162ebff4e'/>
<id>urn:sha1:c730f5b621afa33e9f4939da9078669162ebff4e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[POWERPC] implement BEGIN/END_FW_FTR_SECTION</title>
<updated>2006-10-03T06:50:21Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2006-09-25T08:19:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f639ee8c52c187d8c95db430ac6f485bffbe5af'/>
<id>urn:sha1:3f639ee8c52c187d8c95db430ac6f485bffbe5af</id>
<content type='text'>
and use it an all the obvious places in assembler code.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
</content>
</entry>
<entry>
<title>[PATCH] pidspace: is_init()</title>
<updated>2006-09-29T16:18:12Z</updated>
<author>
<name>Sukadev Bhattiprolu</name>
</author>
<published>2006-09-29T09:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f400e198b2ed26ce55b22a1412ded0896e7516ac'/>
<id>urn:sha1:f400e198b2ed26ce55b22a1412ded0896e7516ac</id>
<content type='text'>
This is an updated version of Eric Biederman's is_init() patch.
(http://lkml.org/lkml/2006/2/6/280).  It applies cleanly to 2.6.18-rc3 and
replaces a few more instances of -&gt;pid == 1 with is_init().

Further, is_init() checks pid and thus removes dependency on Eric's other
patches for now.

Eric's original description:

	There are a lot of places in the kernel where we test for init
	because we give it special properties.  Most  significantly init
	must not die.  This results in code all over the kernel test
	-&gt;pid == 1.

	Introduce is_init to capture this case.

	With multiple pid spaces for all of the cases affected we are
	looking for only the first process on the system, not some other
	process that has pid == 1.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Sukadev Bhattiprolu &lt;sukadev@us.ibm.com&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Cc: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Cc: &lt;lxc-devel@lists.sourceforge.net&gt;
Acked-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] make PROT_WRITE imply PROT_READ</title>
<updated>2006-09-29T16:18:05Z</updated>
<author>
<name>Jason Baron</name>
</author>
<published>2006-09-29T08:58:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df67b3daea602728b51325a4debaeeb912ee51d1'/>
<id>urn:sha1:df67b3daea602728b51325a4debaeeb912ee51d1</id>
<content type='text'>
Make PROT_WRITE imply PROT_READ for a number of architectures which don't
support write only in hardware.

While looking at this, I noticed that some architectures which do not
support write only mappings already take the exact same approach.  For
example, in arch/alpha/mm/fault.c:

"
        if (cause &lt; 0) {
                if (!(vma-&gt;vm_flags &amp; VM_EXEC))
                        goto bad_area;
        } else if (!cause) {
                /* Allow reads even for write-only mappings */
                if (!(vma-&gt;vm_flags &amp; (VM_READ | VM_WRITE)))
                        goto bad_area;
        } else {
                if (!(vma-&gt;vm_flags &amp; VM_WRITE))
                        goto bad_area;
        }
"

Thus, this patch brings other architectures which do not support write only
mappings in-line and consistent with the rest.  I've verified the patch on
ia64, x86_64 and x86.

Additional discussion:

Several architectures, including x86, can not support write-only mappings.
The pte for x86 reserves a single bit for protection and its two states are
read only or read/write.  Thus, write only is not supported in h/w.

Currently, if i 'mmap' a page write-only, the first read attempt on that page
creates a page fault and will SEGV.  That check is enforced in
arch/blah/mm/fault.c.  However, if i first write that page it will fault in
and the pte will be set to read/write.  Thus, any subsequent reads to the page
will succeed.  It is this inconsistency in behavior that this patch is
attempting to address.  Furthermore, if the page is swapped out, and then
brought back the first read will also cause a SEGV.  Thus, any arbitrary read
on a page can potentially result in a SEGV.

According to the SuSv3 spec, "if the application requests only PROT_WRITE, the
implementation may also allow read access." Also as mentioned, some
archtectures, such as alpha, shown above already take the approach that i am
suggesting.

The counter-argument to this raised by Arjan, is that the kernel is enforcing
the write only mapping the best it can given the h/w limitations.  This is
true, however Alan Cox, and myself would argue that the inconsitency in
behavior, that is applications can sometimes work/sometimes fails is highly
undesireable.  If you read through the thread, i think people, came to an
agreement on the last patch i posted, as nobody has objected to it...

Signed-off-by: Jason Baron &lt;jbaron@redhat.com&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Andi Kleen &lt;ak@muc.de&gt;
Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Kazumoto Kojima &lt;kkojima@rr.iij4u.or.jp&gt;
Cc: Ian Molton &lt;spyro@f2s.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Have Power use add_active_range() and free_area_init_nodes()</title>
<updated>2006-09-27T15:26:11Z</updated>
<author>
<name>Mel Gorman</name>
</author>
<published>2006-09-27T08:49:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c67c3cb4c99fb2ee63c8733943c353d745f45b84'/>
<id>urn:sha1:c67c3cb4c99fb2ee63c8733943c353d745f45b84</id>
<content type='text'>
Size zones and holes in an architecture independent manner for Power.

[judith@osdl.org: build fix]
Signed-off-by: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: Dave Hansen &lt;haveblue@us.ibm.com&gt;
Cc: Andy Whitcroft &lt;apw@shadowen.org&gt;
Cc: Andi Kleen &lt;ak@muc.de&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: "Keith Mannthey" &lt;kmannth@gmail.com&gt;
Cc: "Luck, Tony" &lt;tony.luck@intel.com&gt;
Cc: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Cc: Yasunori Goto &lt;y-goto@jp.fujitsu.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[POWERPC] fix ioremap for a combined kernel</title>
<updated>2006-09-25T03:36:31Z</updated>
<author>
<name>Stephen Rothwell</name>
</author>
<published>2006-09-25T03:36:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e203d686277d87f0a6c9521a3a099ca10ee808d'/>
<id>urn:sha1:5e203d686277d87f0a6c9521a3a099ca10ee808d</id>
<content type='text'>
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
</content>
</entry>
<entry>
<title>Merge branch 'merge'</title>
<updated>2006-08-25T04:56:07Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2006-08-25T04:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea0763a7e62f60f3e166327268a80f16ad806718'/>
<id>urn:sha1:ea0763a7e62f60f3e166327268a80f16ad806718</id>
<content type='text'>
</content>
</entry>
</feed>
