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: <20161220092453.20d3a640@xeon-e3>
Date:   Tue, 20 Dec 2016 09:24:53 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Roman Kagan <rkagan@...tuozzo.com>
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>, kvm@...r.kernel.org,
        "Denis V . Lunev" <den@...nvz.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, devel@...uxdriverproject.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 02/15] hyperv: uapi-fy synic event flags definitions

On Tue, 20 Dec 2016 18:55:49 +0300
Roman Kagan <rkagan@...tuozzo.com> wrote:

> Move definitions related to the Hyper-V SynIC event flags to a header
> where they can be consumed by userspace.
> 
> While doing so, also clean up their use by switching to standard bitops
> and struct-based dereferencing.  The latter is also done for message
> pages.
> 
> Signed-off-by: Roman Kagan <rkagan@...tuozzo.com>
> ---
>  arch/x86/include/uapi/asm/hyperv.h | 13 +++++++++
>  drivers/hv/hyperv_vmbus.h          | 24 ++--------------
>  drivers/hv/channel_mgmt.c          | 10 +++----
>  drivers/hv/connection.c            | 47 ++++++++++---------------------
>  drivers/hv/vmbus_drv.c             | 57 ++++++++++++++------------------------
>  5 files changed, 54 insertions(+), 97 deletions(-)
> 
> diff --git a/arch/x86/include/uapi/asm/hyperv.h b/arch/x86/include/uapi/asm/hyperv.h
> index 6098ab5..af542a3 100644
> --- a/arch/x86/include/uapi/asm/hyperv.h
> +++ b/arch/x86/include/uapi/asm/hyperv.h
> @@ -363,4 +363,17 @@ struct hv_timer_message_payload {
>  #define HV_STIMER_AUTOENABLE		(1ULL << 3)
>  #define HV_STIMER_SINT(config)		(__u8)(((config) >> 16) & 0x0F)
>  
> +/* Define synthetic interrupt controller flag constants. */
> +#define HV_EVENT_FLAGS_COUNT		(256 * 8)
> +
> +/* Define the synthetic interrupt controller event flags format. */
> +struct hv_synic_event_flags {
> +	__u64 flags[HV_EVENT_FLAGS_COUNT / 64];
> +};
> +
> +/* Define the synthetic interrupt flags page layout. */
> +struct hv_synic_event_flags_page {
> +	struct hv_synic_event_flags sintevent_flags[HV_SYNIC_SINT_COUNT];
> +};
> +
>  #endif

How are these going to be exposed to user space?

They should really be unsigned long since there is no guarantee of atomic operation
on 64 bit values on 32 bit architectures.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ