Re: [PATCH] Fix out-by-one error in traps.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Thursday, August 30, 2007 - 9:44 pm

On Fri, 31 Aug 2007, Rusty Russell wrote:

Hmm.. This *really* cannot happen with a normal kernel - it implies that 
the stack has crossed into an invalid page. 

Why is that allowed with lguest? What kind of code could validly *ever* 
come in here and cause problems?

I'm getting the nervous feeling that lguest is really doing things that 
shouldn't be done, or is using normal kernel functions in ways that they 
should not be used. 

In other words, yes, we load off "ebp+4", but I really don't see it being 
a valid situation wher ebp itself isn't also a valid stack frame. The 
stack is not sized for "off-by-one" errors - we're supposed to always have 
plenty of stack space free, and if you care about "off-by-one", you're not 
just living on the edge, you're way beyond it!

IOW, please explain why/how lguest ever triggers a case where this would 
possibly matter!

		Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.23-rc3-mm1, Andrew Morton, (Wed Aug 22, 2:06 am)
[BUG] fs/xfs/xfs_bmap_btree.c:2312: error: 'b' undeclared ..., Michal Piotrowski, (Wed Aug 22, 3:11 am)
Re: [BUG] fs/xfs/xfs_bmap_btree.c:2312: error: 'b' undecla ..., Michal Piotrowski, (Wed Aug 22, 3:27 am)
[BUG] 2.6.23-rc3-mm1 - kernel BUG at net/core/skbuff.c:95!, Kamalesh Babulal, (Wed Aug 22, 6:02 am)
Re: 2.6.23-rc3-mm1, Gabriel C, (Wed Aug 22, 6:33 am)
Re: 2.6.23-rc3-mm1, Michal Piotrowski, (Wed Aug 22, 7:19 am)
Re: 2.6.23-rc3-mm1, Andrew Morton, (Wed Aug 22, 9:09 am)
Re: 2.6.23-rc3-mm1, Andrew Morton, (Wed Aug 22, 9:17 am)
Re: 2.6.23-rc3-mm1: fix b43 compilation, Rafael J. Wysocki, (Wed Aug 22, 9:33 am)
Re: 2.6.23-rc3-mm1, Gabriel C, (Wed Aug 22, 10:01 am)
Re: net/ipv4/fib_trie.c - compile error (Re: 2.6.23-rc3-mm1), Paul E. McKenney, (Wed Aug 22, 10:03 am)
Re: 2.6.23-rc3-mm1, Mel Gorman, (Wed Aug 22, 10:17 am)
Re: 2.6.23-rc3-mm1, Torsten Kaiser, (Wed Aug 22, 10:24 am)
Re: 2.6.23-rc3-mm1: locking boot-time self-test failure, Mariusz Kozlowski, (Wed Aug 22, 10:26 am)
Re: 2.6.23-rc3-mm1: WARNING: during resume from suspend on ..., Rafael J. Wysocki, (Wed Aug 22, 10:30 am)
Re: 2.6.23-rc3-mm1, Randy Dunlap, (Wed Aug 22, 11:03 am)
Re: 2.6.23-rc3-mm1, Andrew Morton, (Wed Aug 22, 11:10 am)
Re: 2.6.23-rc3-mm1, Andrew Morton, (Wed Aug 22, 11:14 am)
Re: 2.6.23-rc3-mm1, Andrew Morton, (Wed Aug 22, 11:32 am)
Re: 2.6.23-rc3-mm1: kgdb build failure on powerpc, Mariusz Kozlowski, (Wed Aug 22, 12:04 pm)
Re: 2.6.23-rc3-mm1: net/wireless/rt2x00mac.c build failure, Mariusz Kozlowski, (Wed Aug 22, 12:16 pm)
Re: 2.6.23-rc3-mm1, Randy Dunlap, (Wed Aug 22, 12:17 pm)
Re: 2.6.23-rc3-mm1: net/wireless/rt2x00mac.c build failure, Ivo van Doorn, (Wed Aug 22, 12:31 pm)
Re: 2.6.23-rc3-mm1, Andi Kleen, (Wed Aug 22, 12:38 pm)
Re: 2.6.23-rc3-mm1: kgdb build failure on powerpc, Andrew Morton, (Wed Aug 22, 12:47 pm)
Re: 2.6.23-rc3-mm1: net/wireless/rt2x00mac.c build failure, Mariusz Kozlowski, (Wed Aug 22, 12:54 pm)
Re: 2.6.23-rc3-mm1: net/wireless/rt2x00mac.c build failure, John W. Linville, (Wed Aug 22, 12:58 pm)
Re: 2.6.23-rc3-mm1: net/wireless/rt2x00mac.c build failure, Rafael J. Wysocki, (Wed Aug 22, 1:22 pm)
Re: 2.6.23-rc3-mm1: inlining failures in sound/pci/hda/hda ..., Mariusz Kozlowski, (Wed Aug 22, 1:23 pm)
[-mm patch] enforce noreplace-smp in alternative_instructi ..., Frederik Deweerdt, (Wed Aug 22, 1:25 pm)
Re: 2.6.23-rc3-mm1, Andi Kleen, (Wed Aug 22, 1:53 pm)
Re: 2.6.23-rc3-mm1: inlining failures in sound/pci/hda/hda ..., Mariusz Kozlowski, (Wed Aug 22, 2:18 pm)
Re: 2.6.23-rc3-mm1: locking boot-time self-test failure, Frederik Deweerdt, (Wed Aug 22, 2:27 pm)
Re: 2.6.23-rc3-mm1: fix b43 compilation, Michael Buesch, (Wed Aug 22, 2:56 pm)
Re: 2.6.23-rc3-mm1: fix b43 compilation, John W. Linville, (Wed Aug 22, 7:56 pm)
Re: 2.6.23-rc3-mm1: fix b43 compilation, Andrew Morton, (Thu Aug 23, 12:07 am)
Re: 2.6.23-rc3-mm1, Mel Gorman, (Thu Aug 23, 4:39 am)
Re: 2.6.23-rc3-mm1, Andy Whitcroft, (Thu Aug 23, 5:03 am)
Re: 2.6.23-rc3-mm1, Andi Kleen, (Thu Aug 23, 5:07 am)
Re: 2.6.23-rc3-mm1, Andi Kleen, (Thu Aug 23, 5:22 am)
Re: 2.6.23-rc3-mm1, Sam Ravnborg, (Thu Aug 23, 5:28 am)
Re: 2.6.23-rc3-mm1, Andy Whitcroft, (Thu Aug 23, 5:34 am)
2.6.23-rc3-mm1 - irda goes belly up, Valdis.Kletnieks, (Thu Aug 23, 6:33 am)
Re: 2.6.23-rc3-mm1, Sam Ravnborg, (Thu Aug 23, 7:24 am)
Re: 2.6.23-rc3-mm1, Mel Gorman, (Thu Aug 23, 9:25 am)
Re: 2.6.23-rc3-mm1 - irda goes belly up, Alexey Dobriyan, (Thu Aug 23, 10:37 am)
Re: 2.6.23-rc3-mm1 - irda goes belly up, Valdis.Kletnieks, (Thu Aug 23, 11:45 am)
Re: 2.6.23-rc3-mm1 - irda goes belly up, Andrew Morton, (Thu Aug 23, 2:16 pm)
Re: [-mm patch] enforce noreplace-smp in alternative_instr ..., Jeremy Fitzhardinge, (Thu Aug 23, 4:16 pm)
Re: 2.6.23-rc3-mm1 - irda goes belly up, Eric W. Biederman, (Thu Aug 23, 8:11 pm)
Re: 2.6.23-rc3-mm1 - irda goes belly up, Eric W. Biederman, (Thu Aug 23, 8:46 pm)
[PATCH 1/2] sysctl: Properly register the irda binary sysc ..., Eric W. Biederman, (Thu Aug 23, 8:53 pm)
[PATCH 2/2] sysctl: For irda update sysctl_checks list of ..., Eric W. Biederman, (Thu Aug 23, 8:55 pm)
Re: [-mm patch] enforce noreplace-smp in alternative_instr ..., Frederik Deweerdt, (Thu Aug 23, 11:04 pm)
Re: [-mm patch] enforce noreplace-smp in alternative_instr ..., Frederik Deweerdt, (Thu Aug 23, 11:06 pm)
Re: [-mm patch] enforce noreplace-smp in alternative_instr ..., Jeremy Fitzhardinge, (Thu Aug 23, 11:46 pm)
Re: [-mm patch] enforce noreplace-smp in alternative_instr ..., Frederik Deweerdt, (Fri Aug 24, 1:22 am)
Re: 2.6.23-rc3-mm1 - memory layout change? - lost support ..., Arjan van de Ven, (Fri Aug 24, 9:17 am)
Re: 2.6.23-rc3-mm1, Tilman Schmidt, (Fri Aug 24, 4:27 pm)
Re: 2.6.23-rc3-mm1, Andrew Morton, (Fri Aug 24, 5:07 pm)
RE: 2.6.23-rc3-mm1, Pallipadi, Venkatesh, (Fri Aug 24, 5:13 pm)
Re: 2.6.23-rc3-mm1, Dave Jones, (Fri Aug 24, 5:14 pm)
Re: 2.6.23-rc3-mm1, john stultz, (Fri Aug 24, 5:21 pm)
RE: 2.6.23-rc3-mm1, Pallipadi, Venkatesh, (Fri Aug 24, 5:38 pm)
Re: 2.6.23-rc3-mm1, Tilman Schmidt, (Fri Aug 24, 5:47 pm)
Re: 2.6.23-rc3-mm1, Andrew Morton, (Fri Aug 24, 8:30 pm)
Re: 2.6.23-rc3-mm1, Dave Jones, (Fri Aug 24, 9:28 pm)
Re: 2.6.23-rc3-mm1, Paul Rolland, (Sat Aug 25, 12:55 am)
Re: [PATCH 1/2] sysctl: Properly register the irda binary ..., Valdis.Kletnieks, (Sat Aug 25, 1:29 am)
Re: [-mm patch] enforce noreplace-smp in alternative_instr ..., Frederik Deweerdt, (Sat Aug 25, 5:23 am)
Re: [PATCH 1/2] sysctl: Properly register the irda binary ..., Eric W. Biederman, (Sat Aug 25, 5:57 am)
Re: [PATCH 1/2] sysctl: Properly register the irda binary ..., Valdis.Kletnieks, (Sat Aug 25, 7:07 am)
Re: [PATCH 1/2] sysctl: Properly register the irda binary ..., Eric W. Biederman, (Sat Aug 25, 10:59 am)
[PATCH] sysctl: Update sysctl_check to handle compiled out ..., Eric W. Biederman, (Sat Aug 25, 11:03 am)
Re: [-mm patch] enforce noreplace-smp in alternative_instr ..., Frederik Deweerdt, (Sat Aug 25, 2:14 pm)
Re: 2.6.23-rc3-mm1, Tilman Schmidt, (Sat Aug 25, 3:39 pm)
Re: 2.6.23-rc3-mm1, Tilman Schmidt, (Sat Aug 25, 4:26 pm)
Re: 2.6.23-rc3-mm1, Tilman Schmidt, (Sat Aug 25, 4:37 pm)
Re: 2.6.23-rc3-mm1, Randy Dunlap, (Sat Aug 25, 4:57 pm)
X freezes kernel during exit [Re: 2.6.23-rc3-mm1], Jiri Slaby, (Sun Aug 26, 6:04 am)
Re: net/ipv4/fib_trie.c - compile error (Re: 2.6.23-rc3-mm1), Jarek Poplawski, (Sun Aug 26, 11:36 pm)
Re: 2.6.23-rc3-mm1, Tilman Schmidt, (Mon Aug 27, 6:35 am)
Re: net/ipv4/fib_trie.c - compile error (Re: 2.6.23-rc3-mm1), Paul E. McKenney, (Mon Aug 27, 9:23 am)
[-mm patch] remove parport_device_num(), Adrian Bunk, (Mon Aug 27, 2:27 pm)
[-mm patch] make do_restart_poll() static, Adrian Bunk, (Mon Aug 27, 2:27 pm)
[-mm patch] unexport snd_ctl_elem_{read,write}, Adrian Bunk, (Mon Aug 27, 2:27 pm)
[-mm patch] unexport sys_{open,read}, Adrian Bunk, (Mon Aug 27, 2:27 pm)
[-mm patch] make types.h usable for non-gcc C parsers, Adrian Bunk, (Mon Aug 27, 2:27 pm)
2.6.23-rc3-mm1: m32r defconfig compile error, Adrian Bunk, (Mon Aug 27, 2:27 pm)
[-mm patch] remove unwind exports, Adrian Bunk, (Mon Aug 27, 2:27 pm)
[-mm patch] unexport noautodma, Adrian Bunk, (Mon Aug 27, 2:28 pm)
[-mm patch] mousedev.c:mixdev_open_devices() bugfix, Adrian Bunk, (Mon Aug 27, 2:28 pm)
[-mm patch] ivtv-fb.c bugfix, Adrian Bunk, (Mon Aug 27, 2:29 pm)
[-mm patch] iwl-base.c bugfixes, Adrian Bunk, (Mon Aug 27, 2:29 pm)
Re: [-mm patch] make types.h usable for non-gcc C parsers, Mike Frysinger, (Mon Aug 27, 2:34 pm)
Re: [-mm patch] make types.h usable for non-gcc C parsers, Mike Frysinger, (Mon Aug 27, 2:42 pm)
Re: [-mm patch] iwl-base.c bugfixes, Tomas Winkler, (Mon Aug 27, 3:34 pm)
Re: [-mm patch] unexport sys_{open,read}, Arjan van de Ven, (Mon Aug 27, 3:53 pm)
Re: [-mm patch] unexport sys_{open,read}, Adrian Bunk, (Mon Aug 27, 4:17 pm)
Re: 2.6.23-rc3-mm1: m32r defconfig compile error, Hirokazu Takata, (Mon Aug 27, 8:50 pm)
Re: [v4l-dvb-maintainer] [-mm patch] ivtv-fb.c bugfix, Hans Verkuil, (Mon Aug 27, 11:30 pm)
Re: [-mm patch] make types.h usable for non-gcc C parsers, Andrew Morton, (Tue Aug 28, 12:37 am)
oops at sr_block_release [Re: 2.6.23-rc3-mm1], Jiri Slaby, (Tue Aug 28, 4:32 am)
Re: oops at sr_block_release [Re: 2.6.23-rc3-mm1], Satyam Sharma, (Tue Aug 28, 8:08 am)
Re: oops at sr_block_release [Re: 2.6.23-rc3-mm1], Jiri Slaby, (Tue Aug 28, 8:21 am)
Re: [-mm patch] make types.h usable for non-gcc C parsers, Sam Ravnborg, (Tue Aug 28, 10:06 am)
Re: [-mm patch] make types.h usable for non-gcc C parsers, Mike Frysinger, (Tue Aug 28, 10:42 am)
Re: [-mm patch] make types.h usable for non-gcc C parsers, Sam Ravnborg, (Tue Aug 28, 11:37 am)
Re: [PATCH 1/2] sysctl: Properly register the irda binary ..., Valdis.Kletnieks, (Tue Aug 28, 11:40 am)
Re: [PATCH] sysctl: Update sysctl_check to handle compiled ..., Valdis.Kletnieks, (Tue Aug 28, 11:44 am)
Re: [PATCH 1/2] sysctl: Properly register the irda binary ..., Eric W. Biederman, (Tue Aug 28, 2:06 pm)
Re: oops at sr_block_release [Re: 2.6.23-rc3-mm1], Andrew Morton, (Tue Aug 28, 7:58 pm)
Re: 2.6.23-rc3-mm1, Valdis.Kletnieks, (Wed Aug 29, 7:04 am)
Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc, Valdis.Kletnieks, (Wed Aug 29, 10:37 am)
Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on ..., Pete/Piet Delaney, (Wed Aug 29, 4:43 pm)
Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on ..., Pete/Piet Delaney, (Wed Aug 29, 5:05 pm)
Re: [Kgdb-bugreport] 2.6.23-rc3-mm1: kgdb build failure on ..., Pete/Piet Delaney, (Wed Aug 29, 6:19 pm)
Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc, Valdis.Kletnieks, (Thu Aug 30, 7:08 am)
[PATCH] Fix out-by-one error in traps.c, Rusty Russell, (Thu Aug 30, 3:14 pm)
Re: [PATCH] Fix out-by-one error in traps.c, Linus Torvalds, (Thu Aug 30, 9:44 pm)
Re: [PATCH] Fix out-by-one error in traps.c, Rusty Russell, (Thu Aug 30, 11:03 pm)
Re: [PATCH] Fix out-by-one error in traps.c, Linus Torvalds, (Fri Aug 31, 12:51 am)
Re: [PATCH] Fix out-by-one error in traps.c, Rusty Russell, (Fri Aug 31, 10:37 am)
Re: [PATCH] Fix out-by-one error in traps.c, Linus Torvalds, (Fri Aug 31, 11:24 am)
Re: [PATCH] Fix out-by-one error in traps.c, Rusty Russell, (Tue Sep 4, 11:18 am)
Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc, Valdis.Kletnieks, (Sat Sep 8, 5:24 pm)
Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc, Valdis.Kletnieks, (Sat Sep 8, 8:20 pm)
Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1], Andrew Morton, (Sun Sep 9, 5:47 am)
Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc, Valdis.Kletnieks, (Mon Sep 10, 12:07 pm)
Re: X freezes kernel during exit [Re: 2.6.23-rc3-mm1], Dave Airlie, (Tue Sep 11, 8:18 am)