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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 Dec 2018 12:35:03 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Luis Claudio R. Goncalves" <lclaudio@...g.org>, ldv@...linux.org,
        esyr@...hat.com, Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 1/8] perf: Allow to block process in syscall tracepoints

On Wed,  5 Dec 2018 17:05:02 +0100
Jiri Olsa <jolsa@...nel.org> wrote:

> diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
> index 3b2490b81918..e55cf9169a03 100644
> --- a/arch/x86/entry/common.c
> +++ b/arch/x86/entry/common.c
> @@ -60,6 +60,32 @@ static void do_audit_syscall_entry(struct pt_regs *regs, u32 arch)
>  	}
>  }
>  
> +static void trace_block_syscall(struct pt_regs *regs, bool enter)
> +{
> +	current->perf_blocked = true;
> +
> +	do {
> +		schedule_timeout(100 * HZ);
> +		current->perf_blocked_cnt = 0;
> +
> +		if (enter) {
> +			/* perf syscalls:* enter */
> +			perf_trace_syscall_enter(regs);
> +
> +			/* perf raw_syscalls:* enter */
> +			perf_trace_sys_enter(&event_sys_enter, regs, regs->orig_ax);
> +		} else {
> +			/* perf syscalls:* enter */
> +			perf_trace_syscall_exit(regs);
> +
> +			/* perf raw_syscalls:* enter */
> +			perf_trace_sys_exit(&event_sys_exit, regs, regs->ax);
> +		}
> +	} while (current->perf_blocked_cnt);

I was thinking, if the process reading the perf buffer dies, how do we
tell this task to continue on?

-- Steve

> +
> +	current->perf_blocked = false;
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ