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]
Message-ID: <20120925162140.4ecf3d72@feng-i7>
Date:	Tue, 25 Sep 2012 16:21:40 +0800
From:	Feng Tang <feng.tang@...el.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	<acme@...hat.com>, <mingo@...e.hu>, <a.p.zijlstra@...llo.nl>,
	<andi@...stfloor.org>, <dsahern@...il.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 7/9] perf header: Add check_perf_magic() func

On Tue, 25 Sep 2012 11:07:15 +0900
Namhyung Kim <namhyung@...nel.org> wrote:

> On Mon, 24 Sep 2012 23:24:09 +0800, Feng Tang wrote:
> [snip]
> > +/* Return 0 if matched */
> > +int check_perf_magic(u64 magic)
> > +{
> > +	if (!memcmp(&magic, __perf_magic1, sizeof(magic))
> > +		|| magic == __perf_magic2
> > +		|| magic == __perf_magic2_sw)
> > +		return 0;
> > +
> > +	return -1;
> > +}
> 
> Just an idea.  How about returning version number instead of 0 so that
> it can be used elsewhere those check is needed and possibly wants to
> know the version number also?

Sounds ok to me, I can add that if nobody has objection.

Thanks,
Feng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ