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: <20140711082039.GB31646@krava.redhat.com>
Date:	Fri, 11 Jul 2014 10:20:39 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, peterz@...radead.org, mingo@...e.hu,
	ak@...ux.intel.com, acme@...hat.com, namhyung@...nel.org
Subject: Re: [PATCH 3/4] perf tools: add core support for sampling intr
 machine state regs

On Wed, Jul 09, 2014 at 12:15:58AM +0200, Stephane Eranian wrote:
> Add the infrastructure to setup, collect and report the interrupt
> machine state regs which can be captured by the kernel.
> 
> Signed-off-by: Stephane Eranian <eranian@...gle.com>
> ---

SNIP

> +static const char *regs_abi[]= {
> + [PERF_SAMPLE_REGS_ABI_NONE] = "none",
> + [PERF_SAMPLE_REGS_ABI_32] = "32-bit",
> + [PERF_SAMPLE_REGS_ABI_64] = "64-bit",
> +};
> +
> +static inline const char *regs_dump_abi(struct regs_dump *d)
> +{
> +	if (d->abi > PERF_SAMPLE_REGS_ABI_64)
> +		return "???";
> +	return regs_abi[d->abi];
> +}
> +
> +static void regs_intr__printf(struct perf_sample *sample, u64 mask)
> +{
> +	struct regs_dump *intr_regs = &sample->intr_regs;
> +
> +	if (intr_regs->regs) {
> +		printf("... intr regs: mask 0x%" PRIx64 " ABI: %s\n", mask, regs_dump_abi(intr_regs));
> +		regs_dump__printf(mask, intr_regs->regs);
> +	}
> +}

could you please unify/share this with regs_user__printf,
so we could get same output for registers dump

jirka
--
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