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: <2023061430-facedown-getting-d9f7@gregkh>
Date:   Wed, 14 Jun 2023 23:16:05 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Saurabh Sengar <ssengar@...ux.microsoft.com>
Cc:     kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
        decui@...rosoft.com, mikelley@...rosoft.com, corbet@....net,
        linux-kernel@...r.kernel.org, linux-hyperv@...r.kernel.org,
        linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 2/5] tools: hv: Add vmbus_bufring

On Wed, Jun 14, 2023 at 11:15:09AM -0700, Saurabh Sengar wrote:
> Common userspace interface for read/write from VMBus ringbuffer.
> This implementation is open for use by any userspace driver or
> application seeking direct control over VMBus ring buffers.
> A significant  part of this code is borrowed from DPDK.

"  "?

Anyway, this does not explain what this is at all.

And if you "borrowed" it from DPDK, that feels odd, are you sure you are
allowed to do so?

> Link: https://github.com/DPDK/dpdk/

Not what a Link: tag is for, sorry.

> 
> Signed-off-by: Saurabh Sengar <ssengar@...ux.microsoft.com>
> ---
> [V2]
> - simpler sysfs path, less parsing
> 
>  tools/hv/vmbus_bufring.c | 322 +++++++++++++++++++++++++++++++++++++++
>  tools/hv/vmbus_bufring.h | 158 +++++++++++++++++++
>  2 files changed, 480 insertions(+)
>  create mode 100644 tools/hv/vmbus_bufring.c
>  create mode 100644 tools/hv/vmbus_bufring.h

You add new files to the tools directory, yet say nothing about how to
use them or even how to build them.

Why is there a .h file for a single .c file?  That seems pointless,
right?

> diff --git a/tools/hv/vmbus_bufring.c b/tools/hv/vmbus_bufring.c
> new file mode 100644
> index 000000000000..d44a06d45b03
> --- /dev/null
> +++ b/tools/hv/vmbus_bufring.c
> @@ -0,0 +1,322 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Copyright (c) 2009-2012,2016,2023 Microsoft Corp.
> + * Copyright (c) 2012 NetApp Inc.
> + * Copyright (c) 2012 Citrix Inc.
> + * All rights reserved.

No copyright for the work you did?

> + */
> +
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <emmintrin.h>
> +#include <linux/limits.h>
> +#include <stdbool.h>
> +#include <stdint.h>
> +#include <stdio.h>
> +#include <string.h>
> +#include <sys/mman.h>
> +#include <sys/uio.h>
> +#include <unistd.h>
> +#include "vmbus_bufring.h"
> +
> +#define	rte_compiler_barrier()	({ asm volatile ("" : : : "memory"); })
> +
> +#define	rte_smp_rwmb()		({ asm volatile ("" : : : "memory"); })

These aren't in any common header file already?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ