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: <55522774.5030400@linux.vnet.ibm.com>
Date:	Tue, 12 May 2015 21:46:52 +0530
From:	Hemant Kumar <hemant@...ux.vnet.ibm.com>
To:	Scott Wood <scottwood@...escale.com>
CC:	linux-kernel@...r.kernel.org, maddy@...ux.vnet.ibm.com,
	srikar@...ux.vnet.ibm.com, mpe@...erman.id.au, agraf@...e.de,
	kvm-ppc@...r.kernel.org, paulus@...ba.org,
	warrier@...ux.vnet.ibm.com, linuxppc-dev@...ts.ozlabs.org,
	acme@...nel.org, mingo@...hat.com, peterz@...radead.org
Subject: Re: [PATCH v3 3/3] kvm/powerpc: Export HCALL reason codes


On 05/12/2015 03:44 AM, Scott Wood wrote:
> On Fri, 2015-05-08 at 06:23 +0530, Hemant Kumar wrote:
>> For perf to analyze the KVM events like hcalls, we need the
>> hypervisor calls and their codes to be exported through uapi.
>>
>> This patch moves most of the pSeries hcall codes from
>> arch/powerpc/include/asm/hvcall.h to
>> arch/powerpc/include/uapi/asm/hcall_codes.h.
>> It also moves the mapping <hcall_code-to-hcall_reason> from
>> arch/powerpc/kvm/trace_hv.h to
>> arch/powerpc/include/uapi/asm/trace_hcall.h.
>>
>> Signed-off-by: Hemant Kumar <hemant@...ux.vnet.ibm.com>
>> ---
>>   arch/powerpc/include/asm/hvcall.h           | 120 +--------------------------
>>   arch/powerpc/include/uapi/asm/hcall_codes.h | 123 ++++++++++++++++++++++++++++
>>   arch/powerpc/include/uapi/asm/trace_hcall.h | 122 +++++++++++++++++++++++++++
>>   arch/powerpc/kvm/trace_hv.h                 | 117 +-------------------------
> When moving to uapi please add proper namespacing to indicate that this
> is pseries specific.
>

Sure, will add that.

>> diff --git a/arch/powerpc/include/uapi/asm/trace_hcall.h b/arch/powerpc/include/uapi/asm/trace_hcall.h
>> new file mode 100644
>> index 0000000..00eac01
>> --- /dev/null
>> +++ b/arch/powerpc/include/uapi/asm/trace_hcall.h
>> @@ -0,0 +1,122 @@
>> +#ifndef _KVM_TRACE_HCALL_MAP_H
>> +#define _KVM_TRACE_HCALL_MAP_H
>> +
>> +#include "hcall_codes.h"
>> +
>> +#define kvm_trace_symbol_hcall\
>> +	{H_REMOVE,"H_REMOVE"},					\
>> +	{H_ENTER,"H_ENTER"},					\
>> +	{H_READ,"H_READ"},					\
>> +	{H_CLEAR_MOD,"H_CLEAR_MOD"},				\
> This is a rather odd way of exposing an array to userspace...
>

Didn't get you here. Can you please elaborate?

I see some other files like arch/x86/include/uapi/asm/vmx.h exposing the 
reasons in a similar way.

Thanks for the review.

-- 
Hemant Kumar

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