From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: Menion <menion@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: 32bit userland cannot work with DVB drivers in 64bit kernel, design issue
Date: Thu, 2 Nov 2017 18:52:36 +0000 [thread overview]
Message-ID: <20171102185236.6c0329fd@alans-desktop> (raw)
In-Reply-To: <CAJVZm6euviGF_HFfTT9-CUR75eGkJMVpDo29ZzOf4yMyVXX40A@mail.gmail.com>
On Thu, 2 Nov 2017 12:16:39 +0100
Menion <menion@gmail.com> wrote:
> Hi all
> I am investigating for Armbian, the feasability of running 32bit
> userland on single board computers based on arm64 SoC, where only 64
> bit kernel is available, for reducing the memory footprint.
> I have discovered that there is a flaw in the DVB frontend ioctl (at
> least) that prevents to do so.
> in frontend.h the biggest problem is:
>
> struct dtv_properties {
> __u32 num;
> struct dtv_property *props;
> };
>
> The master userland-kernel ioctl structure is based on an array set by
> pointer, so the 32bit userland will allocate 32bit pointer (and the
> resulting structure size) while the 64bit kernel will expect the 64bit
> pointers
And in some cases the pointer might end up aligned to the next 64bit
boundary.
> The void *reserved2 field will also give problem when crossing the
> 32-64bits boundaries
> As today the endire dvb linux infrastructure can only work in 32-32
> and 64-64 bit mode
If this isn't handled by the existing media compat_ioctl support then you
can send patches to use compat_ioctl handlers to fix this.
Alan
next prev parent reply other threads:[~2017-11-02 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 11:16 32bit userland cannot work with DVB drivers in 64bit kernel, design issue Menion
2017-11-02 18:52 ` Alan Cox [this message]
2017-11-03 9:29 ` Menion
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171102185236.6c0329fd@alans-desktop \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=linux-media@vger.kernel.org \
--cc=menion@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox