Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch/m68k/m68k



Module Name:    src
Committed By:   tsutsui
Date:           Sun Sep 20 03:58:19 UTC 2026

Modified Files:
        src/sys/arch/m68k/m68k: reenter_syscall.s

Log Message:
m68k: remove invalid diagnostic check inside #ifdef DEBUG

This could happen on the following case:
```
 (libc / sigtramp -> trap #0)
 syscall(SYS_setcontext, frame)
  (p->p_md.md_syscall)()
   syscall_plain()
    sy_call(callp, ...)
     (*callp->sy_call)()
      sys_setcontext()
       setucontext()
        cpu_setmcontext()
         (saved mcontext format >= FMT4 && f_stackadj == 0)
         reenter_syscall(frame, sz)
          (relocate trapframe downward by sz and set f_stackadj = sz)

          syscall(SYS_setcontext, relocated frame)
           (p->p_md.md_syscall)()
            syscall_plain()
             sy_call(callp, ...)
              (*callp->sy_call)()
               sys_setcontext()
                setucontext()
                 cpu_setmcontext()
                  (f_stackadj == sz, so restore long exception frame,
                   then f_stackadj = 0)

               return EJUSTRETURN from 2nd sys_setcontext()
             return from sy_call()
            return from syscall_plain()

           userret()
            ==> PR/55990 triggering case:
                a pending signal is delivered at this user-return point
            mi_userret()
             lwp_userret()
              (LW_PENDSIG is set;
               issignal() returns a pending signal)
              postsig()
               kpsendsig()
                (*p->p_emul->e_sendsig)()
                 sendsig()
                  sendsig_siginfo()
                   cpu_getmcontext()
                    (save longframe to mcontext,
                     set f_format = 0, and
                     f_stackadj += sz)

           return from userret() in the 2nd syscall()
          return from the 2nd syscall()
         epilogue of reenter_syscall()
          ==> f_stackadj != 0 here;
              reenter_syscall.s rev 1.6 and prior did not handle this case,
              then caused PR/55990
```
so this f_stackadj == 0 check should have been removed in rev 1.7.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/m68k/reenter_syscall.s

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index