NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-m68k/55990: kernel stack leak in m68k cpu_setmcontext() and reenter_syscall()
The following reply was made to PR port-m68k/55990; it has been noted by GNATS.
From: John Klos <john%ziaspace.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: port-m68k-maintainer%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost, tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-m68k/55990: kernel stack leak in m68k cpu_setmcontext()
and reenter_syscall()
Date: Mon, 22 Feb 2021 02:22:05 +0000 (UTC)
> > It looks m68k/reenter_syscall.s adjusts stack pointer to prepare
> > "moved stack frame by stkadj bytes" but doesn't restore %sp
> > after syscall() is returned?
> > (I'm not sure how reenter_syscall() was designed though)
>
> After misc observations, these stack leaks seem caused by:
> 1) heavy setcontext(2) calls from pthread applications (i.e. Xorg server)
> 2) heavy address errors (i.e. page faults) on lower RAM (<24MB) environment
With this patch, I've been able to run a mac68k system with 10 megabytes
of memory for many hours fully multiuser, whereas in the past it would
freeze after just minutes or tens of minutes.
John Klos
Home |
Main Index |
Thread Index |
Old Index