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]
Message-ID: <3a4a9443.b108.19b08ec247c.Coremail.r4o5m6e8o@163.com>
Date: Wed, 10 Dec 2025 23:40:52 +0800 (CST)
From: r4o5m6e8o  <r4o5m6e8o@....com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: "Jason Wang" <jasowang@...hat.com>,
	"Xuan Zhuo" <xuanzhuo@...ux.alibaba.com>,
	Eugenio Pérez <eperezma@...hat.com>,
	virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org,
	"Yuedong Wang" <wyd20130109@....com>
Subject: Re:Re: [PATCH v2 2/2] tools: virtio: Fix no definition of
 dma_map_page_attrs





Yes, it's fix all build errors for tools/virtio, 
Thanks.











At 2025-12-10 16:00:40, "Michael S. Tsirkin" <mst@...hat.com> wrote:
>On Sun, Dec 07, 2025 at 10:28:07PM +0800, Yufeng Wang wrote:
>> Fix tools/virtio compiler error, port over the definition
>> of dma_map_page_attrs, dma_unmap_page_attrs, dev_WARN_ONCE
>> 
>> v2: remove do {} while (0).
>> 
>> Fixes: 447beec8065b ("virtio_ring: switch to use dma_{map|unmap}_page()")
>> Signed-off-by: Yufeng Wang <r4o5m6e8o@....com>
>> Tested-by: Yuedong Wang <wyd20130109@....com>
>
>Can you pls check whether
>https://lore.kernel.org/all/cover.1764873799.git.mst@redhat.com/
>addresses the issues for you?
>
>Thanks!
>
>
>> ---
>>  tools/virtio/linux/dma-mapping.h | 3 +++
>>  tools/virtio/linux/kernel.h      | 1 +
>>  2 files changed, 4 insertions(+)
>> 
>> diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h
>> index 095958461788..de251a1f0c37 100644
>> --- a/tools/virtio/linux/dma-mapping.h
>> +++ b/tools/virtio/linux/dma-mapping.h
>> @@ -22,6 +22,7 @@ enum dma_data_direction {
>>  #define dma_free_coherent(d, s, p, h) kfree(p)
>>  
>>  #define dma_map_page(d, p, o, s, dir) (page_to_phys(p) + (o))
>> +#define dma_map_page_attrs(d, p, o, s, dir, a) (page_to_phys(p) + (o))
>>  
>>  #define dma_map_single(d, p, s, dir) (virt_to_phys(p))
>>  #define dma_map_single_attrs(d, p, s, dir, a) (virt_to_phys(p))
>> @@ -29,6 +30,8 @@ enum dma_data_direction {
>>  
>>  #define dma_unmap_single(d, a, s, r) do { (void)(d); (void)(a); (void)(s); (void)(r); } while (0)
>>  #define dma_unmap_page(d, a, s, r) do { (void)(d); (void)(a); (void)(s); (void)(r); } while (0)
>> +#define dma_unmap_page_attrs(d, a, s, r, t) \
>> +	do { (void)(d); (void)(a); (void)(s); (void)(r); (void)(t); } while (0)
>>  
>>  #define sg_dma_address(sg) (0)
>>  #define sg_dma_len(sg) (0)
>> diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h
>> index 6702008f7f5c..460df937ba9d 100644
>> --- a/tools/virtio/linux/kernel.h
>> +++ b/tools/virtio/linux/kernel.h
>> @@ -134,6 +134,7 @@ static inline void *krealloc_array(void *p, size_t new_n, size_t new_size, gfp_t
>>  #define dev_err(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
>>  #define dev_warn(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
>>  #define dev_warn_once(dev, format, ...) fprintf (stderr, format, ## __VA_ARGS__)
>> +#define dev_WARN_ONCE(dev, condition, format, ...) fprintf(stderr, format, ## __VA_ARGS__)
>>  
>>  #define min(x, y) ({				\
>>  	typeof(x) _min1 = (x);			\
>> -- 
>> 2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ