* [PATCH] update-linux-headers: strip endianness-aware __counted_by
@ 2026-11-07 17:54 Francesco Valla
2026-11-10 10:30 ` Cornelia Huck
0 siblings, 1 reply; 3+ messages in thread
From: Francesco Valla @ 2026-11-07 17:54 UTC (permalink / raw)
To: qemu-devel
Cc: Francesco Valla, Paolo Bonzini, Michael S. Tsirkin, Cornelia Huck
Deal with the endianness-aware __counted_by_be() and __counted_by_le()
annotations in Linux headers just like with __counted_by(): stripping
them.
Signed-off-by: Francesco Valla <francesco@valla.it>
---
| 2 ++
1 file changed, 2 insertions(+)
--git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index 3c3a0e9394d2..d3f843356507 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -92,6 +92,8 @@ cp_portable() {
-e "$arch_cmd" \
-e 's/__bitwise//' \
-e 's/__counted_by(\w*)//' \
+ -e 's/__counted_by_be(\w*)//' \
+ -e 's/__counted_by_le(\w*)//' \
-e 's/__attribute__((packed))/QEMU_PACKED/' \
-e 's/__inline__/inline/' \
-e 's/__BITS_PER_LONG/HOST_LONG_BITS/' \
--
2.56.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] update-linux-headers: strip endianness-aware __counted_by
2026-11-07 17:54 [PATCH] update-linux-headers: strip endianness-aware __counted_by Francesco Valla
@ 2026-11-10 10:30 ` Cornelia Huck
2026-11-10 12:40 ` Francesco Valla
0 siblings, 1 reply; 3+ messages in thread
From: Cornelia Huck @ 2026-11-10 10:30 UTC (permalink / raw)
To: Francesco Valla, qemu-devel
Cc: Francesco Valla, Paolo Bonzini, Michael S. Tsirkin
On Sat, Nov 07 2026, Francesco Valla <francesco@valla.it> wrote:
> Deal with the endianness-aware __counted_by_be() and __counted_by_le()
> annotations in Linux headers just like with __counted_by(): stripping
> them.
>
> Signed-off-by: Francesco Valla <francesco@valla.it>
> ---
> scripts/update-linux-headers.sh | 2 ++
> 1 file changed, 2 insertions(+)
For virtio-can, I guess?
>
> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
> index 3c3a0e9394d2..d3f843356507 100755
> --- a/scripts/update-linux-headers.sh
> +++ b/scripts/update-linux-headers.sh
> @@ -92,6 +92,8 @@ cp_portable() {
> -e "$arch_cmd" \
> -e 's/__bitwise//' \
> -e 's/__counted_by(\w*)//' \
> + -e 's/__counted_by_be(\w*)//' \
> + -e 's/__counted_by_le(\w*)//' \
> -e 's/__attribute__((packed))/QEMU_PACKED/' \
> -e 's/__inline__/inline/' \
> -e 's/__BITS_PER_LONG/HOST_LONG_BITS/' \
Not sure if we would want to kill all the __counted_by* birds with one
stone, but let's not overthink this.
Acked-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] update-linux-headers: strip endianness-aware __counted_by
2026-11-10 10:30 ` Cornelia Huck
@ 2026-11-10 12:40 ` Francesco Valla
0 siblings, 0 replies; 3+ messages in thread
From: Francesco Valla @ 2026-11-10 12:40 UTC (permalink / raw)
To: Cornelia Huck; +Cc: qemu-devel, Paolo Bonzini, Michael S. Tsirkin
10 Nov 2026 11:31:04 Cornelia Huck <cohuck@redhat.com>:
> On Sat, Nov 07 2026, Francesco Valla <francesco@valla.it> wrote:
>
>> Deal with the endianness-aware __counted_by_be() and __counted_by_le()
>> annotations in Linux headers just like with __counted_by(): stripping
>> them.
>>
>> Signed-off-by: Francesco Valla <francesco@valla.it>
>> ---
>> scripts/update-linux-headers.sh | 2 ++
>> 1 file changed, 2 insertions(+)
>
> For virtio-can, I guess?
>
Correct. That's the usecase that needs this at the moment.
>>
>> diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
>> index 3c3a0e9394d2..d3f843356507 100755
>> --- a/scripts/update-linux-headers.sh
>> +++ b/scripts/update-linux-headers.sh
>> @@ -92,6 +92,8 @@ cp_portable() {
>> -e "$arch_cmd" \
>> -e 's/__bitwise//' \
>> -e 's/__counted_by(\w*)//' \
>> + -e 's/__counted_by_be(\w*)//' \
>> + -e 's/__counted_by_le(\w*)//' \
>> -e 's/__attribute__((packed))/QEMU_PACKED/' \
>> -e 's/__inline__/inline/' \
>> -e 's/__BITS_PER_LONG/HOST_LONG_BITS/' \
>
> Not sure if we would want to kill all the __counted_by* birds with one
> stone, but let's not overthink this.
>
> Acked-by: Cornelia Huck <cohuck@redhat.com>
Thank you
Regards,
Francesco
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-10 12:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07 17:54 [PATCH] update-linux-headers: strip endianness-aware __counted_by Francesco Valla
2026-11-10 10:30 ` Cornelia Huck
2026-11-10 12:40 ` Francesco Valla
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.