From: "Christian König" <christian.koenig@amd.com>
To: Jerome Pouiller <Jerome.Pouiller@silabs.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Jason Ekstrand <jason@jlekstrand.net>,
Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-buf: fix use of DMA_BUF_SET_NAME_{A,B} in userspace
Date: Tue, 17 May 2022 09:30:24 +0200 [thread overview]
Message-ID: <c1479285-7fd8-b73a-9672-6e0d7db4cbdf@amd.com> (raw)
In-Reply-To: <20220517072708.245265-1-Jerome.Pouiller@silabs.com>
Am 17.05.22 um 09:27 schrieb Jerome Pouiller:
> From: Jérôme Pouiller <jerome.pouiller@silabs.com>
>
> The typedefs u32 and u64 are not available in userspace. Thus user get
> an error he try to use DMA_BUF_SET_NAME_A or DMA_BUF_SET_NAME_B:
>
> $ gcc -Wall -c -MMD -c -o ioctls_list.o ioctls_list.c
> In file included from /usr/include/x86_64-linux-gnu/asm/ioctl.h:1,
> from /usr/include/linux/ioctl.h:5,
> from /usr/include/asm-generic/ioctls.h:5,
> from ioctls_list.c:11:
> ioctls_list.c:463:29: error: ‘u32’ undeclared here (not in a function)
> 463 | { "DMA_BUF_SET_NAME_A", DMA_BUF_SET_NAME_A, -1, -1 }, // linux/dma-buf.h
> | ^~~~~~~~~~~~~~~~~~
> ioctls_list.c:464:29: error: ‘u64’ undeclared here (not in a function)
> 464 | { "DMA_BUF_SET_NAME_B", DMA_BUF_SET_NAME_B, -1, -1 }, // linux/dma-buf.h
> | ^~~~~~~~~~~~~~~~~~
>
> The issue was initially reported here[1].
>
> [1]: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjerome-pouiller%2Fioctl%2Fpull%2F14&data=05%7C01%7Cchristian.koenig%40amd.com%7C4b665e3c2222463014ec08da37d6b3f4%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637883692533547283%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=prj%2BSOuf%2B1IWK1XKGD381LhDuL9qOoj7lYy8xMoV%2B6o%3D&reserved=0
>
> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Good catch, Reviewed-by: Christian König <christian.koenig@amd.com>
CC: stable?
Fixes: ?
> ---
> include/uapi/linux/dma-buf.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/dma-buf.h b/include/uapi/linux/dma-buf.h
> index 8e4a2ca0bcbf..b1523cb8ab30 100644
> --- a/include/uapi/linux/dma-buf.h
> +++ b/include/uapi/linux/dma-buf.h
> @@ -92,7 +92,7 @@ struct dma_buf_sync {
> * between them in actual uapi, they're just different numbers.
> */
> #define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
> -#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)
> -#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)
> +#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32)
> +#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64)
>
> #endif
next prev parent reply other threads:[~2022-05-17 7:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 7:27 Jerome Pouiller
2022-05-17 7:30 ` Christian König [this message]
2022-05-17 8:32 ` Jérôme Pouiller
2022-05-17 9:37 ` Christian König
2022-05-17 11:00 ` Jérôme Pouiller
2022-05-17 9:59 ` Greg KH
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=c1479285-7fd8-b73a-9672-6e0d7db4cbdf@amd.com \
--to=christian.koenig@amd.com \
--cc=Jerome.Pouiller@silabs.com \
--cc=daniel.vetter@ffwll.ch \
--cc=jason@jlekstrand.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pekka.paalanen@collabora.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
all inboxes | Powered by JetHome®