From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Ming Lei <ming.lei@canonical.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Tony Lindgren <tony@atomide.com>, Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
Sylwester Nawrocki <snjw23@gmail.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-omap@vger.kernel.org
Subject: Re: [RFC PATCH v1 5/7] media: v4l2: introduce two IOCTLs for face detection
Date: Fri, 02 Dec 2011 13:33:36 +0100 [thread overview]
Message-ID: <42689146.OPtqLboC2m@wuerfel> (raw)
In-Reply-To: <1322817178-8931-6-git-send-email-ming.lei@canonical.com>
On Friday 02 December 2011 17:12:56 Ming Lei wrote:
> +/**
> + * struct v4l2_fd_result - VIDIOC_G_FD_RESULT argument
> + * @buf_index: entry, index of v4l2_buffer for face detection
> + * @face_cnt: return, how many faces detected from the @buf_index
> + * @fd: return, result of faces' detection
> + */
> +struct v4l2_fd_result {
> + __u32 buf_index;
> + __u32 face_cnt;
> + __u32 reserved[6];
> + struct v4l2_fd_detection *fd;
> +};
This data structure is not 32/64 bit safe: running a 64 bit kernel with 32 bit
user space will see an incompatible layout.
One way to solve this is to remove the pointer and just start the array
directly after the __u32 members. Alternatively, you can use a __u64
to pass the pointer in an integer representation.
A nicer interface from the data structure perspective would be to
get rid of the array altogether and always return exactly one face.
Arnd
next prev parent reply other threads:[~2011-12-02 12:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 9:12 [RFC PATCH v1 0/7] media&omap4: introduce face detection(FD) driver Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 1/7] omap4: introduce fdif(face detect module) hwmod Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 2/7] omap4: build fdif omap device from hwmod Ming Lei
2011-12-02 12:10 ` Sergei Shtylyov
2011-12-05 4:25 ` Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 3/7] media: videobuf2: move out of setting pgprot_noncached from vb2_mmap_pfn_range Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 4/7] media: videobuf2: introduce VIDEOBUF2_PAGE memops Ming Lei
2011-12-02 16:35 ` Aguirre, Sergio
2011-12-05 2:16 ` Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 5/7] media: v4l2: introduce two IOCTLs for face detection Ming Lei
2011-12-02 12:33 ` Arnd Bergmann [this message]
2011-12-04 11:18 ` Ming Lei
2011-12-05 14:37 ` Arnd Bergmann
2011-12-06 6:30 ` Ming Lei
2011-12-06 12:55 ` Arnd Bergmann
2011-12-06 13:11 ` Ming Lei
2011-12-06 14:41 ` Arnd Bergmann
2011-12-06 14:52 ` Ming Lei
2011-12-06 15:45 ` Ming Lei
2011-12-06 20:59 ` Arnd Bergmann
2011-12-02 9:12 ` [RFC PATCH v1 6/7] media: video: introduce face detection driver module Ming Lei
2011-12-02 9:12 ` [RFC PATCH v1 7/7] media: video: introduce omap4 face detection module driver Ming Lei
2011-12-02 10:28 ` [RFC PATCH v1 0/7] media&omap4: introduce face detection(FD) driver Sylwester Nawrocki
2011-12-02 14:59 ` Ming Lei
-- strict thread matches above, loose matches on Subject: below --
2011-12-02 15:02 Ming Lei
2011-12-02 15:02 ` [RFC PATCH v1 5/7] media: v4l2: introduce two IOCTLs for face detection Ming Lei
2011-12-05 22:15 ` Sylwester Nawrocki
2011-12-08 3:42 ` Ming Lei
2011-12-08 22:27 ` Sylwester Nawrocki
2011-12-09 4:34 ` Ming Lei
2011-12-11 17:27 ` Sylwester Nawrocki
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=42689146.OPtqLboC2m@wuerfel \
--to=arnd@arndb.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=ming.lei@canonical.com \
--cc=snjw23@gmail.com \
--cc=tony@atomide.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