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] [day] [month] [year] [list]
Date:   Tue, 20 Mar 2018 10:29:51 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>, linux-kernel@...r.kernel.org
Cc:     virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH] ptr_ring: fix build



On 2018年03月20日 08:41, Michael S. Tsirkin wrote:
> Fixes after recent use of kvmalloc
>
> Signed-off-by: Michael S. Tsirkin <mst@...hat.com>
> ---
>   tools/virtio/ringtest/ptr_ring.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tools/virtio/ringtest/ptr_ring.c b/tools/virtio/ringtest/ptr_ring.c
> index 477899c..2d566fb 100644
> --- a/tools/virtio/ringtest/ptr_ring.c
> +++ b/tools/virtio/ringtest/ptr_ring.c
> @@ -17,6 +17,8 @@
>   #define likely(x)    (__builtin_expect(!!(x), 1))
>   #define ALIGN(x, a) (((x) + (a) - 1) / (a) * (a))
>   #define SIZE_MAX        (~(size_t)0)
> +#define KMALLOC_MAX_SIZE SIZE_MAX
> +#define BUG_ON(x) assert(x)
>   
>   typedef pthread_spinlock_t  spinlock_t;
>   
> @@ -57,6 +59,9 @@ static void kfree(void *p)
>   		free(p);
>   }
>   
> +#define kvmalloc_array kmalloc_array
> +#define kvfree kfree
> +
>   static void spin_lock_init(spinlock_t *lock)
>   {
>   	int r = pthread_spin_init(lock, 0);

Acked-by: Jason Wang <jasowang@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ