warnings from backtrace

Gary E. Miller gem at rellim.com
Fri Jun 2 18:52:39 UTC 2017


Yo Hal!

On Fri, 02 Jun 2017 03:54:20 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> > Which also commented oout stuff needed in the SIGALRM handler,
> > which created the double trap.   
> 
> How much does the handler need?

What do you mean 'need'?

>  Is there a pile of stuff needed
> before we get to catchTrap?

Zero stuff.  We never call catchTrap(), the seccomp code calls
catchTrap().

> The first thing that catchTrap does is
> call msyslog and we already know that works since it prints the
> seccomp-worked message.

Yup.  Sort of, I have seen weirdness in that area.  mysyslog()
will behave differently inside a trap.  Many syscalls, and lib calls,
are not legal in a trap.


> Trapping on recvfrom works.
> 
>  2 Jun 03:27:58 ntpd[25506]: ERROR: SIGSYS: got a trap.
>  2 Jun 03:27:58 ntpd[25506]: ERROR: SIGSYS/seccomp bad syscall
> 45/0xc000003e 2 Jun 03:27:58 ntpd[25506]: 0.0.0.0 c01d 0d kern kernel
> time sync disabled
> 
> The 45 is recvfrom.  I don't know what the second number is good for.

The second number is si_arch.  Some libc can make two different types
of syscalls.  For example i386 and x64 syscalls are very different.
So a type 45 in i386 may be different than a type 45 in x86.

More details in the syscall and signal man pages.

> I tried a bit, commenting out some of the syscalls in the DNS ifdef.  
> Sometimes it works, sometimes it doesn't.  I didn't find a pattern.
> It's not a simple it needs "this one".

Yup, not simple.

Just a WAG: maybe some failed syscalls are in non-reentrant code
that the backtrace/mysyslog need?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170602/7736721c/attachment.bin>


More information about the devel mailing list