Linux 2.4.19pre1-ac1
Subsystems (2)
Hi Florin, hi Alan,
Quoted 2 lines
With 19-pre1-ac1 on a reiserfs partition I cannot patch a kernel. Patch fails with "Invalid cross-device link" or "Out of disk space".
I can reproduce this too on ext2, so this does not seem to be FS related.
However, I do not get this error messages, the patch runs just fine, but corrupts all files it touches, leaving them to be all a bit less than 1MiB of size, and all exactly the same size.
There is no filesystem corruption however, e2fsck runs just fine without any error. Just the files are all damaged. I looked inside them, and it seems huge parts of other files from the patch have been "attached" to them.
Quoted 1 line
18-rc2-ac1 works fine on the same partition.
ACK, for me too; as well as 2.4.18-rc2-ac2 for me. The breakage starts with 2.4.18-ac1 here. Plain 2.4.18 from Marcelo works fine as well.
Greetings,
Andreas
Quoted 6 lines
I can reproduce this too on ext2, so this does not seem to be FS related.
However, I do not get this error messages, the patch runs just fine, but corrupts all files it touches, leaving them to be all a bit less than 1MiB of size, and all exactly the same size.
Quoted 8 lines
There is no filesystem corruption however, e2fsck runs just fine without any error. Just the files are all damaged. I looked inside them, and it seems huge parts of other files from the patch have been "attached" to them.
Quoted 1 line
18-rc2-ac1 works fine on the same partition.
ACK, for me too; as well as 2.4.18-rc2-ac2 for me. The breakage starts with 2.4.18-ac1 here. Plain 2.4.18 from Marcelo works fine as well.
What compiler firstly, and what I/O subsystem. Are you using highmem, did you build from a clean tree ?
I also think your report is unrelated to the reiserfs one. 2.4.18 proper and -ac have a small reiserfs fix which is a viable candidate for reiserfs funnies while what you report is somewhat different
The actual differences between 2.4.18-rc2-ac2 and 2.4.18-ac2 that are not in 2.4.18 are:
Maybe a candidate
shared memory filesystem fixes (also used for sys5 shm
and anonymous shared maps)
[copy mm/shmem.c from the working -ac to the current -ac
and retest]
Small pnpbios update (only relevant if building with PNPBIOS)
[Build without PNPbios and retest]
Wildly improbable
Correct NULL check in the sd scsi code
open fix for ps2 driver
Hw specific (check your hardware and config and you can rule these out I guess)
JFS specific fixes
A sparc64 specific compile fix
An off by one fix for loop that only affects using a specific
option with maxloop=256
Patches that only impact users of nbd
An AMD ELan specific driver for watchdog - no affect on others Locking fixes for the softdog driver
A serverworks specific ide=nodma fix
LS220 experimental code (which shouldnt be enabled or matter) Tiny tweaks to the margi DVD card driver
Ifdef of two lines specific to promise sx6000 raid
3c359 token ring driver (doesnt touch generic code) olypmic token ring specific locking change
netrom specific fixes
Alan
Hi Alan and folks,
Quoted 2 lines
What compiler firstly, and what I/O subsystem. Are you using highmem, did you build from a clean tree ?
gcc 2.95.2, I/O subsystem is PIIX4 IDE here. No problems with "pure" reading and writing however, so it really seems to be connected to something special done by patch. Build was fresh from a clean tree.
Quoted 3 lines
I also think your report is unrelated to the reiserfs one. 2.4.18 proper and -ac have a small reiserfs fix which is a viable candidate for reiserfs funnies while what you report is somewhat different
Perhaps - but strange both are only triggered by "patch"? Or maybe the reiserfs errors are later consequences of the same problem.
Quoted 5 lines
Maybe a candidate
shared memory filesystem fixes (also used for sys5 shm
and anonymous shared maps)
[copymm/shmem.cfrom the working -ac to the current -ac
and retest]
Will try this now, sounds possible - but does patch really use shared memory? I will try to narrow it down a bit. There also were some changes to mm/memory.c between 2.4.18-rc2-ac2 and 2.4.18-ac1. Also a possibility?
Quoted 2 lines
Small pnpbios update (only relevant if building with PNPBIOS)
[Build without PNPbios and retest]
Have bios enabled in all kernels, will try without. But there were no PNPBIOS changes between the working 2.4.18-rc2-ac2 and the failing 2.4.18-ac1, so I would rule this out.
Quoted 3 lines
Wildly improbable
Correct NULL check in the sd scsi code
open fix for ps2 driver
Not using sd driver or ps2 at all.
Quoted 7 lines
Hw specific (check your hardware and config and you can rule these out I guess) JFS specific fixes
A sparc64 specific compile fix
An off by one fix for loop that only affects using a specific
option with maxloop=256
Patches that only impact users of nbd
An AMD ELan specific driver for watchdog - no affect on others
Quoted 8 lines
Locking fixes for the softdog driver
A serverworks specific ide=nodma fix
LS220 experimental code (which shouldnt be enabled or matter) Tiny tweaks to the margi DVD card driver
Ifdef of two lines specific to promise sx6000 raid 3c359 token ring driver (doesnt touch generic code) olypmic token ring specific locking change
netrom specific fixes
Use nothing at all of them, just compiled most things as modules, which are not loaded.
Greetings,
Andreas
Quoted 3 lines
Will try this now, sounds possible - but does patch really use shared memory? I will try to narrow it down a bit. There also were some changes to
mm/memory.cbetween 2.4.18-rc2-ac2 and 2.4.18-ac1. Also a possibility?
Could be - as far as I can tell they are also in vanilla 2.4.18 (the ptrace ones)
Alan
Hi Alan!
Quoted 6 lines
Quoted 3 lines
Will try this now, sounds possible - but does patch really use shared memory? I will try to narrow it down a bit. There also were some changes to
mm/memory.cbetween 2.4.18-rc2-ac2 and 2.4.18-ac1. Also a possibility?Could be - as far as I can tell they are also in vanilla 2.4.18 (the ptrace ones)
The changes I see here between them do not seem to be related to ptrace. But I think I already found one possible glitch by manual inspection there. Both kernels are compiling just now so I can test later.
mm/memory.c Thu Feb 28 00:54:09 2002 renamed from mm/memory.c Thu Feb 28 01:01:51 2002 +0 -1
@@ -180,7 +180,7 @@ pgd_t * src_pgd, * dst_pgd; unsigned long address = vma->vm_start; unsigned long end = vma->vm_end; - unsigned long cow = (vma->vm_flags & (VM_SHARED | VM_WRITE)) ==
VM_WRITE;
+ unsigned long cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) ==VM_MAYWRITE;
src_pgd = pgd_offset(src, address)-1;
dst_pgd = pgd_offset(dst, address)-1;
@@ -250,7 +250,7 @@
goto cont_copy_pte_range;
/* If it's a COW mapping, write protect it
both in the parent and the child */
- if (cow) {
+ if (cow && pte_write(pte)) {
ptep_set_wrprotect(src_pte);
pte = *src_pte;
}@@ -460,21 +460,24 @@
int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned
long start,
int len, int write, int force, struct page **pages, structvm_area_struct **vmas)
{
- int i = 0; + int i; + unsigned int flags; + + /* + * Require read or write permissions. + * If 'force' is set, we only require the "MAY" flags. + */ + flags = write ? (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD); + flags &= force ? (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE); + i = 0;
do {
struct vm_area_struct * vma;
vma = find_extend_vma(mm, start);- if ( !vma ||
- (pages && vma->vm_flags & VM_IO) ||
- (!force &&
- ((write && (!(vma->vm_flags & VM_WRITE))) ||
- (!write && (!(vma->vm_flags & VM_READ))) ) )) {
- if (i) return i;
- return -EFAULT;
- }
+ if ( !vma || (pages && vma->vm_flags & VM_IO) || !(flags &vma->vm_flags) )
+ return i ? : -EFAULT;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- This looks somewhat bogus, shouldn't it be "return i ? i : -EFAULT;" instead?
Greetings,
Andreas
From: Andreas Franck <[email protected]>
Date: Thu, 28 Feb 2002 01:27:32 +0100
+ return i ? : -EFAULT;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- This looks somewhat bogus, shouldn't it be "return i ? i : -EFAULT;" instead?
They are equivalent, "x ? : foo" is a shorthand for "x ? x : foo"
Quoted 5 lines
+ if ( !vma || (pages &&
vma->vm_flags&VM_IO) || !(flags &vma->vm_flags) )
+ return i ? :-EFAULT;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ <- This looks somewhat bogus, shouldn't it be "return i ? i :-EFAULT;" instead?
Its the same thing - its an ugly Gcc extension.
One other person who reported the problem reports 2.4.18-ac2 is ok, in which case it might be the slight mismerge in ac1 tho I'm puzzled why. Certainly my testing here is behaving so far
Quoted 2 lines · Alan Cox
What compiler firstly, and what I/O subsystem. Are you using highmem, did you build from a clean tree ?
florin@bee:~$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 (Debian prerelease)
00:05.1 IDE interface: Intel Corp. 82371AB PIIX4 IDE (rev 01)
No highmem (256Mb)
Clean tree 2.4.17 -> 2.4.18 -> 2.4.19-pre1 -> 2.4.19-pre1-ac1
Problem gone in 2.4.19-pre1-ac2, patched from clean tree, built on 2.4.18-rc2-ac1. Weird...
It looks like something is hosed in the 2.4.19-pre1-ac1 patchset.
florin
Signature · 3 lines
"If it's not broken, let's fix it till it is." 41A9 2BDE 8E11 F1C5 87A6 03EE 34B3 E075 3B90 DFE4