Re: [PATCH 0/6] Initial Rust V4L2 support

Hans Petter Selasky
2023-04-11T15:33:08Z

On 4/11/23 16:19, Miguel Ojeda wrote:
> On Tue, Apr 11, 2023 at 3:15 PM Hans Petter Selasky <hps@selasky.org> wrote:
>>
>> If you cannot build a new toolchain without a new kernel.
>

Hi,

> Why not?

To me it is very simple:

Look at this:

-#define FE_GET_PROPERTY _IOR('o', 83, struct
dtv_properties)
+#define FE_GET_PROPERTY _IOW('o', 83, struct
dtv_properties)
+#define FE_GET_PROPERTY_OLD _IOR('o', 83, struct dtv_properties)

The FE_GET_PROPERTY IOCTL definition is incorrectly specified as reading
data. While it is actually writing data. When will this be fixed in
Linux - I think never. That's just the way both Linux and GIT works,
unfortunately, though that's another discussion. You can put stuff in,
but you can't easily get stuff out, without it having consequences.

Similarly rustc may depend on an incorrectly specified ioctl()
definition, also via other libraries and static linking, that just have
to stay incorrectly defined, because it was initially incorrectly defined.

Daniel, please explain why the few lines of chunk above (and there are
some more) cannot be upstreamed into Linux?

>
>> Then you are stuck forever to build a new toolchain and kernel? Do you
>> agree?
>
> No, I don't agree, because I don't understand why you cannot build the
> new toolchain in the old kernel, or use a pre-built toolchain for that
> matter (whether built by you or by somebody else).
>
>> Or you can say, someone else needs to deal with it, but then you have a
>> single point of failure.
>
> No, you could build your own toolchain and save it somewhere, if you
> don't want to rely on a build from somebody else.

I'm trying to explain something difficult. And I'm OK that you neither
understand nor agree about my viewpoint. See my replies above.

--HPS