Weirdness I don't get, but maybe someone else will.

I have few testcases for exercising froggy, one of which, to exercise
report_signal, is:

    #define _GNU_SOURCE
    #define __USE_GNU
    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <signal.h>

    static void
    signal_action (int signo)
    {
      fprintf (stderr, "signal %d received by sigtest\n", signo);
    }

    main(int ac, char * av[])
    {
      signal (SIGUSR1, signal_action);
      signal (SIGUSR2, signal_action);

      while (1) {
        pause();
        fprintf(stderr, "looping\n");
      };

      exit (0);
    }

Here's the curious thing:  when I attach to this and fire off "kill -s
SIGUSR1 <pid>" to it, every pass through the loop gets:

    signal 10 received by sigtest
    [ 15264] got syscall exit  29, pause
    [ 15264] got syscall entry 4, write
    [ 15264] got syscall exit  4, write
    [ 15264] got syscall entry 119, sigreturn
    looping
    got unknown syscall exit -1
    [ 15264] got syscall entry 4, write
    [ 15264] got syscall exit  4, write
    [ 15264] got syscall entry 29, pause

See that "unknown syscall exit -1"?  It's from the f froggy-test code
that decodes syscalls, the same hunk of code that's dumping the "[
<pid>] got syscall entry..." stuff.  Anyone have a clue what that's all
about? 

It's real--if I stick

    if (-1 == regs->orig_ax) printk (KERN_ALERT "got a syscall -1\n");

into the report_syscall code, the msg gets dumped to the console.

-- 
Chris Moller

  I know that you believe you understand what you think I said, but
  I'm not sure you realize that what you heard is not what I meant.
      -- Robert McCloskey


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to