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]
Message-ID: <20171204144140.xdpm6vmtdek4fjzb@hirez.programming.kicks-ass.net>
Date:   Mon, 4 Dec 2017 15:41:40 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Song Liu <songliubraving@...com>
Cc:     rostedt@...dmis.org, mingo@...hat.com, davem@...emloft.net,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        daniel@...earbox.net, kernel-team@...com
Subject: Re: [PATCH v3 3/6] perf: implement pmu perf_kprobe

On Thu, Nov 30, 2017 at 03:50:20PM -0800, Song Liu wrote:

> +static struct pmu perf_kprobe = {

> +};

> +static inline bool perf_event_is_tracing(struct perf_event *event)
> +{
> +	return event->attr.type == PERF_TYPE_TRACEPOINT ||
> +		strncmp(event->pmu->name, "kprobe", 6) == 0;

Why a strcmp here? Wouldn't something like:

	event->pmu == &perf_kprobe

work much simpler?

> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ