login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
4
Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Mikael Pettersson <mikpe@...>
To: <kamezawa.hiroyu@...>, <shiwh@...>
Cc: <linux-kernel@...>, <mikpe@...>
Subject:
Re: [PATCH 1/3] signal(i386): alternative signal stack wraparound occurs
Date: Thursday, October 4, 2007 - 9:08 am
On Thu, 4 Oct 2007 21:47:30 +0900, KAMEZAWA Hiroyuki wrote:
quoted text
> On Thu, 04 Oct 2007 21:33:12 +0900 > Shi Weihua <shiwh@cn.fujitsu.com> wrote: > > > KAMEZAWA Hiroyuki wrote:: > > > On Thu, 04 Oct 2007 20:56:14 +0900 > > > Shi Weihua <shiwh@cn.fujitsu.com> wrote: > > > > > >> stack.ss_sp = addr + pagesize; > > >> stack.ss_flags = 0; > > >> stack.ss_size = pagesize; > > > Here is bad. > > > stack,ss_sp = addr; > > > stack.ss_flags = 0; > > > stack.ss_size = pagesize * 2; > > [What the test code want to do] > > addr+pagesize*2 - addr+pagesize -> sigaltstack > > addr+pagesize - addr -> protected region > > The code want to catch overflow when esp enter the protected region. > > > You have to protect the top of *registered* sigaltstack. > The reason of wraparound is %esp will be set to the bottom of sigaltstack > if it is not on sigaltstack area when signaled. > What you have to do is protect the top of registerd sigaltstack. > If %esp is in the range of registerd sigaltstack at SEGV, wraparound > will stop.
Exactly right. You mprotect or munmap the end of the altstack, not the area beyond it. /Mikael -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [thread] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Re: [PATCH 1/3] signal(i386): alternative signal stack wrapa...
, Mikael Pettersson
, (Thu Oct 4, 9:08 am)
Re: [PATCH 1/3] signal(i386): alternative signal stack wrapa...
, Shi Weihua
, (Thu Oct 4, 8:55 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ian Campbell
Re: [PATCH] x86: Construct 32 bit boot time page tables in native format.
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Justin Piszcz
Linux Software RAID 5 Performance Optimizations: 2.6.19.1: (211MB/s read & 195...
Alan
Re: [RFC] Heads up on sys_fallocate()
netbsd-tech-kern
:
Matthias Scheler
Re: HEADS UP: timecounters (branch simonb-timecounters) merged into -current
David Laight
long usernames
Quentin Garnier
Re: Understanding foo_open, foo_read, etc.
Jared D. McNeill
Breaking binary compatibility for /dev/joy
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
David Miller
[GIT]: Networking
Natalie Protasevich
[BUG] New Kernel Bugs
Colocation donated by:
Who's online
There are currently
1 user
and
853 guests
online.
Online users
strcmp
Syndicate