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: <YVKfJMpdHXrwYYRn@google.com>
Date:   Tue, 28 Sep 2021 13:50:44 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Tomasz Figa <tfiga@...omium.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>
Cc:     Marek Szyprowski <m.szyprowski@...sung.com>,
        Dafna Hirschfeld <dafna.hirschfeld@...labora.com>,
        Ricardo Ribalda <ribalda@...omium.org>,
        Christoph Hellwig <hch@....de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCHv6 7/8] videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT
 flag

On (21/09/09 20:24), Sergey Senozhatsky wrote:
[..]
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 9b7032abb2c7..f118fe7a9f58 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -959,7 +959,8 @@ struct v4l2_requestbuffers {
>  	__u32			type;		/* enum v4l2_buf_type */
>  	__u32			memory;		/* enum v4l2_memory */
>  	__u32			capabilities;
> -	__u32			reserved[1];
> +	__u8			flags;
> +	__u8			reserved[3];
>  };

[..]

>  struct v4l2_create_buffers {
> @@ -2515,7 +2519,8 @@ struct v4l2_create_buffers {
>  	__u32			memory;
>  	struct v4l2_format	format;
>  	__u32			capabilities;
> -	__u32			reserved[7];
> +	__u32			flags;
> +	__u32			reserved[6];
>  };

These UAPI changes break strace compilation (older versions). Up until
Feb 2021 strace had compile time asserts that check-ed sizeof() ->reserved
fields.

  static_assert failed due to requirement
   '(sizeof (((struct v4l2_create_buffers *)0)->reserved)) >= (sizeof (((struct_v4l2_create_buffers *)0)->reserved))'
   "Unexpected struct v4l2_create_buffers.reserved size, please update the decoder"

It seems that strace has dropped those assertions

https://github.com/strace/strace/commit/e5554291d14b852f61385ba5ba59412d133ac99d#diff-d534423e8a79b6957ef4deb7f8bbd3276bf18ede6a82553e8823ee4f840b6e06


But we, probably, need to use unions in UAPI. Any thoughts?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ