lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Jun 2019 20:23:11 +0530
From:   Pintu Agarwal <pintu.ping@...il.com>
To:     Shyam Saini <mayhs11saini@...il.com>
Cc:     Kernelnewbies <kernelnewbies@...nelnewbies.org>,
        open list <linux-kernel@...r.kernel.org>, pedro@...ves.net
Subject: Re: Pause a process execution from external program

On Thu, Jun 13, 2019 at 1:22 PM Shyam Saini <mayhs11saini@...il.com> wrote:
>
> Hi Pintu,
>
>
> > Hi All,
> > I was just wondering if this is possible in the Linux world.
> > My requirement is:
> > For some reason, I want to halt/pause the execution (for some
> > specified time) of a running process/thread (at some location),
> > without modified the source, may be by firing some events/signals from
> > an another external program, by specifying the address location or a
> > line number.
> >
> > Is this possible ?
> > May be by using some system call, or other mechanism using the process PID.
> > Assume that its a debugging system with all root privileges.
> >
> > Basically, its just like how "gdb" is able to set the break-point in a
> > program, and able to stop its execution exactly at that location.
> > I am wondering what mechanism "gdb" uses to do this?
>
> gdb uses ptrace system call, may you can explore ptrace?
>
oh thank you so much.
Yes, ptrace is going to be very helpful. I will explore more on this
and come back if required.

> > I tried to check here, but could find the exact place, where this is handled:
> > https://github.com/bminor/binutils-gdb/blob/master/gdb/breakpoint.c
>
> from command line we use ctrl-z to stop execution of a foreground
> process but you can program
> SIGTSTP signal handler in your application code to do the same.
>
> is that you want ?
>
This required source code modification in the target program, so I
don't want this.

> Thanks a lot,
> Shyam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ