2 Creation of a CHANGES file
4 A entry starts with the date followed by a newline and then
5 the content follows. Usualy, the first line after the date
6 is some short description and then a loger follows.
7 To terminate the entry, intert two newlines at the end.
9 So this entry serves as an exampe. Hope this is simple enougth :-)
13 New debugging implemented
15 Debug code removed from mem.c and trap.c and rewrote in
16 acid. See the DEBUGGING section in the HOWTO file for further
21 Fontconfig crash fixed, Debug code fixes
23 libfontconfig mapped some config files with len == 0, this
24 was not handled correctly so it crashed.
26 the umem() acid function didnt check for zero segment
27 pointers so it showd invalid data for the mostly unused
34 more checking in memory manager
35 sys_[gs]etpgrp implemented for pid != current->pid
36 renamed emu.c to main.c
37 set UID/GID/EUID/EGID in AUXVEC on exec()
42 Making prof(1) work (at least dont let it crash)
46 Peplaced read() calls to pread() to prevent profiling related crash.
47 The problem was that convertseg() detaches the DATA segment reattaches
48 a new one and used read() to get the contents back. read() was a
49 profiled function and the profiler finds its structures cleared to
50 zero and crashes. We now use pread() that is a unprofiled assembly
53 Still, child processes and kprocs are not currently profiled.
57 AF_UNIX client sockets implemented
59 Its a little bit of a hack. We do the AF_UNIX handling like APE
60 does so we can interact with the ported Xservers Xbr and equis.
64 Work arround for mozilla GPFAULT bug
66 If a process is notified that he has pending signals with the
67 "sig" message and if the note interrupts the execution of a
68 INT 0x80 instruction, a syscall in the handler causes mystic
69 crashes i dont understand.
71 The work arround detects the condition and delays the
72 handling of the signals returning back to userspace.
74 I could reproduce the condition and this hack seems
75 to work. I should write some testcase to analyze this
76 condition further. Maybe its some kernel bug.
80 Minjor file related fixes/cleanups
82 - Implemented in miscdev.c for writable /dev/zero
83 - sys_umask() now returns the previous umask
84 - default umask set to 022
85 - sys_umask() sys_cwd() moved from proc.c to file.c
89 linuxemu.rc script updated
91 - resolve relative rootpath
92 - generate /etc files for hostname and resolv.conf if not readable
93 - removed enviroment user->USER home->HOME conversion in main.c
97 Better work arround for mozilla GPFAULT bug
99 The problem arises because of the handling of notes in Plan9 kernel.
101 It happens if linux code does a syscall while here are usernotes (like
102 the "sig" ones) queued in the process note[] array. Then the trap()
103 function in the kernel will enqueue the trap in the queue and the user
104 note gets handled first.
106 Now, after we have done a syscall in the note handler of the user
107 signal, notify() gets called in the kernel that detects the next note
108 to be a trap and thinks the note handler itself caused it and kills
111 I suggested a patch that makes sure traps get enqued on the head of
112 the note[] array so that they get handled before a user note but its
113 not decided to be applied yet so here is the work arround.
115 The work arround avoids posting notes to a process that could possibly
116 cause a trap in the future before the usernote gets handled. (this
117 excluded all linux code because it can issure a syscall anytime) The
118 only time it is save to post notes is if we are in linuxemu syscall
121 This is mostly the case anyway when notes are used to interrupt
122 blocking syscalls (waking a process sleeping in a sigsuspend for
125 Linuxcode that would spin in a endless loop will not be interrupted by
126 notes/signals anymore.
132 Masking more fp-errors in trap.c. (To get some dos game running in
135 prboom and zsnes was bumpy sometimes because our select() didnt set
136 the struct timeval *tvp to the time the select call did not slept.
138 I stat function pointer was removed from the Ufile struct and all the *dev.c
139 files. I have no need to return custom stats from the devices right now
140 (except for /dev/zero (mode & 0222)) so i move the only case where its
141 needed into the hackish dir2statmode function in p9dev.c. Here is also
142 an fd field added to the generic Ufile scruct because most of all devices
143 use plan9 filedescriptors at some point and we use it in fstat(). Saves some
144 casting and fstat can use the fd (when its available) to make a dirstat() and
145 convert to linux format.
147 For the postnote stuff mentiond in the last changes entry, here is a global
148 flag in main.c (notehack = 1) to enable/disable the work arround.
152 atime/mtime, AT_CLKTCK
159 the AT_CLKTCK entry in exec is set to _tos->cyclefreq
164 faster death proc detection
166 Using linuxemu from terminal caused huge network load
167 because we did a lookup of /proc/# on every timer round.
169 now we keep open filedescriptors for /proc/#/args and
170 /proc/#/note in the proc structure and only check for
171 dead procs every second.
177 OSS sound implemented, its only tested with some SDL
178 apps (zsnes, prboom).
180 The output frequency is hardcoded at 44100 Hz and 2
181 channels stereo at the moment.
185 dsp, stat, mkfile, -d, dns, fs
187 dspdev detects output frequency now and implement more
190 here is an universal Ustat and Udirent structs to separate
191 the linux formats from driver code.
193 big chnage in all devices, added indirection layer fs.c that
194 has some kind of mapping from path -> device and forwards
195 filesystem calls to device drivers. now drivers can return
196 correct stat information.
198 this is needed for implementing /dev/pts later.
200 removed the /etc/(hosts resolve.conf) generation code from
201 linuxemu.rc because they dont work in some cases and
202 cause maintence nightmares.
204 use the -d switch for turning on trace to stderr. so we dont
205 need to always change the if(0) from trace.c and recompile.
207 force compiler flags in mkfile, the -T from new mkone breaks
208 build on current distribution.
214 - off by one error basepath()
215 - chmod used access which resolves always to link target
217 - the note hack broke sigprocmask, and sometimes failed
218 to interrupt a sleepproc(). this is now handled in
219 interruptproc(). (this makes drawterm work on linuxemu)
220 - write() to pty was not synchronized/not blocking that
221 caused some apps to spin in write() or others to drop
226 grow filedescriptor table in dup2
228 - if the new fd supplied is out if range, dont return error but
229 grow the fdtab so it fits in. (this make configure work)
236 - included <ureg.h> in some modules. this fixed the type
237 signature errors of 8l when compiling with -T flag.
239 - fixed bug in exec()
240 exec needs to run outside the the note context, because it
241 is deleting memory segments and that can cause the removal
242 of the stack segment as well. we have to set current->syscall
243 to nil to avoid getting a note posted that could interrupt us in
244 the middle of some malloc() or something.
246 - sys_pipe() FD_CLOEXEC
247 sys_pipe() create the filedescriptors with FD_CLOEXEC bit
248 set as open() does. this is wrong and caused gimp plugins
251 - new signal handling code
252 signal.c has changed a bit. now CLONE_THREAD procs
253 share a signal queue and proc() uses wantsignal() to
254 figure out what process to interrupt.
256 - restartable syscalls
257 re process SA_RESTART flag now and are able to restart syscalls
258 that got interrupted by such signals. sleepproc() returns -ERESTART
259 by default now. sys_poll() and sys_sleep() will return -EINTR in
262 - fs reorganized, [sg]etxattr added, p9cwd added as an optimization
265 - ptydev emits SIGINTR to process group, added tty to Uproc.
267 - added fddev (/dev/fd)
269 - exitproc() now emits SIGCHLD.
271 - mem.c: addrok() now takes a prot flags parameter so we can test
272 for expected memory protection too.
274 - profme(): profiling support for child processes added
276 - initialization completly moved in main()
278 - fchmod, fchown, ftruncate moved to file.c
282 just code dressing...
284 renamed some files, added typedef for Ureg, abstracted syscall specific
285 code in linuxcall.c, more tracing...
289 Fixed the opera fork() no more threads bug
291 There was a problem of dns resolver zombie processes created by
292 operseemed that used up all the process table due to incomplete
293 implementation of clone(). Linux specified a exit signal in the lower
294 byte of the clone- flags parameter to tell if the process should hang
295 arround as zombie so that the parent can wait for it. If no signal is
296 specified here, then the process should exit without becoming a
297 zombie. Here is also the case that the parent ignores the SIGCHLD
298 signal or has SA_NOCHLDWAIT flags on the SIGCHLD set. In that case
299 the child should also purge itself. I implemented reparenting,
300 because i suspected the bug there but this was not the case.
302 Here is a new uprocs() acid function that dumps the proctab.
308 Added anonymous area merging to reduce the area count and removed
309 redundant clearmem calls. Changed Uwaitq lock from QLock to normal
310 spinlock. Removed some trace() calls.
312 The biggest change is that linuxemu.rc now is able to start equis. This
313 simplyfies writing wrapper scripts to start a browser or other X11 apps.
317 Simplyfied area merging in memory manager
319 Areas are doubly linked now so its easier to get the previous area for
324 Fixed man-bug. (Restarting syscalls)
326 Restarting syscalls failed if the singal that was send to the interrupted
327 process was blocked. This is fixed now.
331 fixed awd-bug (use builtin cd), make errors more verbose in exec.c
336 fix pipeseek, added pread64, pwrite64 syscalls.
338 forgot to return -ESPIPE on seekpipe.
339 implemented pread64/pwrite64 (needed by git).
345 - incred bufproc read and queuesize to 4K/64K (fixes links2 -g hang)
346 - reuse buffers in bufproc
347 - cleanup timer stuff, introduce 5ms min sleep time, avoid interrupt note
348 - fix sys_select() to always modify tv
349 - fix format mismatch in nextsignal
350 - dont combine in sys_readv/sys_writev
351 - fix open in devdsp.c
353 - dont reset segment registers for signal handlers
354 - possibly more that i forgot... use history(1)
360 keeping track of how many samples (time) has been submitted
361 to /dev/audio already and wait when the buffer grows over some
362 treshold. this removes the audio delay from games :)
368 put documentation in doc subdirectory.
372 mremap, segbrk shrinking, pagesize, doc
374 rewrote mremap implementation to correctly clear area for shrinking.
375 handles more error cases and checks for overlap. this fixes the gimp
378 removed segment shrinking with segbrk as this feature may be removed
379 in newer kernel versions as it introduced a bug where it is possible to
380 unmap pages while the kernel touches them and cause a panic.
382 removed the ROUNDPAGE() macro from dat.h. heres a pagealign()
383 function in mem.c now and the global variable pagesize that is initialized
386 some documentation cleanups.
392 do some linear interpolation in audio resampling to get better sound quality.
393 avoid copy when no resampling is required. reflect queue full in
394 GETOSPACE ioctl. cleanup code to avoid vlong calculations.
400 fixed uninitialized values in stat wich caused -EOVERFLOW on linux
401 kernel build. removed wakeableproc() (changes in signal.c, ptydev.c,
402 bufproc.c, poll.c). fixed sigsuspend race. simpler waitq code (uses
403 lesser memory too). fixed waitpid race. added /dev/dsp0 to dspdev
404 (makes mikmod work). fixed rfork/notify crash.
408 mplayer, bb, audacity play cursor, bugs
410 refactored timers, alarm and deadproccheck into one timerproc and
411 removed timer.c. every Uproc has a timeout field now that is the
412 time in nanoseconds when the timeout expires. on expiration, the
413 timerproc sets the value to zero and does a wakeup on the
414 timed out process. a process sets/resets its timeout with
415 settimeout(delta). the remaining time in ms can be queried with
418 fixed missing protection flags in setupstack.
420 more acurate GETOSPACE (mplayer, bb) and new GETOPTR
421 ioctl (needed for audacity play cursor) in dspdev.c.
423 handle kill note as SIGKILL in trap.c.
425 handle illegal instruction as SIGILL as pass/restore sigcontext
426 (needed for mplayer runtime SSE check).
428 sys_sigreturn now uses current->ureg->sp to find the restore
431 preallocate all Uprocs.
437 removed dev argument from fdgetfile()
439 return correct -ENOSOCK in socketcall()
441 fixed pread/pwrite, dev->read/dev-write now take a offset
444 fixed time diff overflow in dspdev
448 fuckup, O_TRUNC, restaring syscalls, rc, getdents
451 - seek didnt work for whence == 1 as the plan9 seek pointer was
452 never moved in read due to change to pread. this caused cp to
453 corrupt the output file when it skipped null blocks.
454 - basepath in fs.c was broken
455 - readv/writev didnt increment the file offset
457 what we have now is that file.c does all the offset tracking, and
458 devices provide a size() function that returns the actual file size.
460 added O_TRUNC for open.
462 signal restarting sometimes resulted in returning -ERESTART to
463 userspace. this could happen when another thread had stolen
464 our signal. we now restart the syscall in nextsignal() even if
465 here was no signal pending for us.
467 removed the exitsig function from linuxemu.rc as we can use
468 the -terminate option of the xserver to get it shutdown.
470 read the whole directory, then calculate file offset for directory
475 signal handling changes, acid, rc
479 sockets, basepath, alarm
481 fixed error in basepath (*ps vs ps) and implemented nonblocking connect,
482 server sockets, socketpair, sys_alarm
488 simplified locking by making process wakeup non blocking.
489 to not miss wakeups, the to be suspended proc should call wakeme(1)
490 before it goes to sleep.
492 timers for alarm/itimer have been moved to the per "process" signal
493 data. current->timeout is still local to the current "thread".
495 sys_kill() now makes sure we only send one signal per "process".
497 syscall restarting now can use the Urestart (current->restart)
498 structure to remember state. (implemented for nanosleep, poll and
501 changed default to non tracing.
503 pty now handles winsize changes. fixing current tty changing. (ssh bug,
506 added /dev/random and /dev/urandom to miscdev.
508 more ioctls for dspdev.
510 enforce non reentancy for traps.
516 we now use a separate segment for the BSS and dont intermix mmap and brk.
517 thanks jibanes for reporting!
523 implemented sys_futex() finally
525 changed tls to use the new /dev/gdt interface to change its
526 process segment descriptors
532 linuxemu.rc gone, documentation
534 removed linuxemu.rc and replaced it with linux.
536 usage: linux [-h] [-d...] [-u uid] [-g gid] [-startx] [-display :n] [-e emubin] [-r linuxroot] command [args ...]
538 linuxroot is now an optional parameter (-r). it will default to /sys/lib/linux.
540 dont hide /lib/tls anymore and bind devarch. if you dont want to
541 patch your kernel with the segdescr patch and use mroot[-linuxemu].tbz
542 you can rename /lib/tls to /lib/_tls_disabled_.
546 exit_group, exec, futex, waitpid, quoted arguments
548 properly implement exit_group and zap all threads. notify
553 implement FUTEX_REQUEUE and FUTEX_CMP_REQUEUE.
555 handle WALL, WCLONE and WNOHANG in waitpid.
557 preserve quoted arguments to linux.
561 select/poll and EBADF, execve malloc, set_thread_area, initproc, SIGSTOP/SIGCONT,
562 tty, getsid, getpeeraddr, /proc
564 select and poll never return -EBADF but ignore the offending
565 filedescriptor. this is wrong in the manpage! (this was needed
566 to survive the python configure script)
568 handle malloc errors in execve and dont panic when elf
569 loading fails but kill the process.
571 detect empty descriptors in set_thread_area so descriptors
574 move some of the initialization from main to initproc.
576 SIGSTOP/SIGCONT handling now works for thread groups. for this
577 we now have stopproc() and contproc() that are called from the
578 signal code when SIGSTOP or SIGCONT signal is received. each Uproc
579 now has a traceproc callback that is called when we enter or
580 exit the kernel. zapthreads() and stopproc() use this to get all threads
581 in the wanted state. for stopped procs, waiting happens in
582 the signal code so calling handlesignals() of a stopped proc will
583 block until it gets killed or continued.
586 traceproc, tracearg - called when entering or exiting the kernel
587 wstate - current wait state of this process. WEXITED, WSTOPPED, WCONTINUED.
588 wevent - like wstate, but reset by waitpid
589 comm - double null terminated string array. first entry is the full exe name
590 followd by the exeve arguments.
592 heres a new format %S for signal numbers.
594 the per thread tty is gone. the tty is now in the per process signal queue.
595 gettty() and settty() can be used to modify it. ptydev now allows opening
596 the slave tty multiple times. (fixes midnight commander error)
598 implemented sys_getsid().
600 fix AF_INET padding and byte order for getpeername socketcall.
602 implemented /proc (procdev). fddev is gone. /dev/tty handled by
603 ptydev now. this makes pkill, ps, top and inkscape work!
607 fixed pipe filedescriptor leak in AF_UNIX
609 we leaked the sock->other descriptor when failing to connect
610 a AF_UNIX socket. thanks yarikos for reporting!
614 rename to existing symlink target bug, profine -> profile
616 renaming a symlink to a existing symlink would cause the
617 file file to be renamed to .udir.L.udir.L....
619 fix profine/profile typo
622 change uname release to 3.2.1 to make debian 7.0 not complain