Skip to contentSkip to conversation

Broken kunmap calls in rc4-mm1.

DISCUSSION Nigel Cunningham 6 participants 8 messages Nov 11, 2004 – Nov 12, 2004

lore
Share & tools
lore
#0 lore raw

Hi Andrew et al.

That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM additions, so I want for a walk through the -mm4 patch, and found plenty of instances of people making the same mistake I did... using the struct page * in the call to kunmap, rather than the virtual address.

I guess the best way to handle it is find/notify the respective authors of patches in the tree? The problems are in:

Reiser4 (lots)
CacheFS (lots)
afs
binfmt_elf
libata_core

(I'm hoping some of the above people will see this message and save me some effort :>)

Regards,

Nigel

Signature · 7 lines
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly.		-- Romans 5:6
#1 lore raw
Quoted 5 lines · Nigel Cunningham

That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM additions, so I want for a walk through the -mm4 patch, and found plenty of instances of people making the same mistake I did... using the struct page * in the call to kunmap, rather than the virtual address. I guess the best way to handle it is find/notify the respective authors

Quoted 8 lines

of patches in the tree? The problems are in:
Reiser4 (lots)
CacheFS (lots)
afs
binfmt_elf
libata_core
(I'm hoping some of the above people will see this message and save me some effort :>)

That only applies to kunmap_atomic(); kunmap()'s argument should be a page.

-- wli

#2 lore raw

Hi.

Quoted 15 lines · William Lee Irwin III
Quoted 5 lines · Nigel Cunningham

That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM additions, so I want for a walk through the -mm4 patch, and found plenty of instances of people making the same mistake I did... using the struct page * in the call to kunmap, rather than the virtual address. I guess the best way to handle it is find/notify the respective authors

Quoted 8 lines

of patches in the tree? The problems are in:
Reiser4 (lots)
CacheFS (lots)
afs
binfmt_elf
libata_core
(I'm hoping some of the above people will see this message and save me some effort :>)

Quoted 1 line

That only applies to kunmap_atomic(); kunmap()'s argument should be a page.

Ah. My bad. That cuts it down by quite a few. I should have stuck to looking for kmap_atomic :>

Humble apologies to those wrongly maligned!

Remaining culprits are....

Reiser4:
- do_readpage_tail
-reiser4_status_init
-reiser4_status_write

Nigel

Signature · 7 lines
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly.		-- Romans 5:6
#3 lore raw
Quoted 7 lines · Nigel Cunningham

Remaining culprits are....

Reiser4:
- do_readpage_tail
-reiser4_status_init
-reiser4_status_write

obuggerit. Look, a simple helper is to redefine kmap_atomic() and kunmap_atomic() to work on char*'s. This will spit warnings if someone feeds in a page*. Which would be a lot more useful if we didn't have all those infernal __iomem warnings scrolling off the screen but ho hum.

I'll cook something up.

#4 lore raw
Quoted 9 lines · Andrew Morton
Quoted 7 lines · Nigel Cunningham

Remaining culprits are....

Reiser4:
- do_readpage_tail
-reiser4_status_init
-reiser4_status_write

Quoted 4 lines

obuggerit. Look, a simple helper is to redefine kmap_atomic() and kunmap_atomic() to work on char*'s. This will spit warnings if someone feeds in a page*. Which would be a lot more useful if we didn't have all those infernal __iomem warnings scrolling off the screen but ho hum.

I tried something like this, but got stuck on people passing a structure in which is valid (aio_setup_ring(), for instance). We can always cast those of course, but it's not so pretty.

Signature · 1 line
Jens Axboe
#5 lore raw
Quoted 11 lines · Jens Axboe
Quoted 9 lines · Andrew Morton
Quoted 7 lines · Nigel Cunningham

Remaining culprits are....

Reiser4:
- do_readpage_tail
-reiser4_status_init
-reiser4_status_write

Quoted 8 lines
Quoted 4 lines

obuggerit. Look, a simple helper is to redefine kmap_atomic() and kunmap_atomic() to work on char*'s. This will spit warnings if someone feeds in a page*. Which would be a lot more useful if we didn't have all those infernal __iomem warnings scrolling off the screen but ho hum.

I tried something like this, but got stuck on people passing a structure in which is valid (aio_setup_ring(), for instance). We can always cast those of course, but it's not so pretty.

yup, that's what I did. It's not too bad, apart from cachefs which has gone kmap nutso.

#6 lore raw
In reply to William Lee Irwin III

Hi!

Quoted 14 lines
Quoted 5 lines

That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM additions, so I want for a walk through the -mm4 patch, and found plenty of instances of people making the same mistake I did... using the struct page * in the call to kunmap, rather than the virtual address. I guess the best way to handle it is find/notify the respective authors

Quoted 8 lines

of patches in the tree? The problems are in:
Reiser4 (lots)
CacheFS (lots)
afs
binfmt_elf
libata_core
(I'm hoping some of the above people will see this message and save me some effort :>)

Quoted 1 line

That only applies to kunmap_atomic(); kunmap()'s argument should be a page.

Is it just me or is having two very similar functions (kunmap/kunmap_atomic) pretty counter-intuitive? Perhaps kunmap should be renamed to kunmap_page() or something?

Pavel

Signature · 2 lines
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
#7 lore raw
In reply to Nigel Cunningham
Quoted 7 lines · * Nigel Cunningham ([email protected]) wrote:

Hi Andrew et al.

That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM additions, so I want for a walk through the -mm4 patch, and found plenty of instances of people making the same mistake I did... using the struct page * in the call to kunmap, rather than the virtual address.

Quoted 8 lines

I guess the best way to handle it is find/notify the respective authors of patches in the tree? The problems are in:

Reiser4 (lots)
CacheFS (lots)
afs
binfmt_elf
libata_core

I think you are confusing with kunmap_atomic?

thanks
-chris

Signature · 1 line
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net