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] [day] [month] [year] [list]
Message-ID: <dc441690-914a-487e-9867-c2012f74f498@yahoo.com>
Date: Fri, 14 Nov 2025 23:20:26 +0100
From: Sunday Adelodun <adelodunolaoluwa@...oo.com>
To: maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
 tzimmermann@...e.de, airlied@...il.com, simona@...ll.ch,
 zack.rusin@...adcom.com
Cc: bcm-kernel-feedback-list@...adcom.com, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org, david.hunter.linux@...il.com,
 skhan@...uxfoundation.org, linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] drm: rename drm_ioctl_flags() to drm_ioctl_get_flags() to
 fix kernel-doc name conflict

On 10/10/25 01:25, Sunday Adelodun wrote:
> The function `drm_ioctl_flags()` defined in `drm_ioctl.c` shares the same
> identifier name as the `enum drm_ioctl_flags` defined in
> `drm_ioctl.h`. Although this naming overlap is perfectly valid in C —
> since functions and enumerations exist in separate namespaces and do
> not affect compilation or linkage — it causes a symbol collision in the
> kernel-doc build system.
>
> During `make htmldocs`, Sphinx reports the following warning:
>    ./Documentation/gpu/drm-uapi:574: ./drivers/gpu/drm/drm_ioctl.c:915:
>    WARNING: Duplicate C declaration, also defined at gpu/drm-uapi:69.
>    Declaration is '.. c:function::
>    bool drm_ioctl_flags (unsigned int nr, unsigned int *flags)'.
>
> This happens because kernel-doc processes both identifiers (the enum and
> the function) under the same name, leading to a duplicate symbol entry
> in the generated documentation index. The build system therefore treats
> them as conflicting declarations, even though they represent different
> entities in code.
>
> To resolve this, the function has been renamed to
> `drm_ioctl_get_flags()`, which both removes the naming collision and
> better describes the function’s purpose—retrieving ioctl permission
> flags associated with a given command number.
>
> All affected references have been updated accordingly in:
>    - `drivers/gpu/drm/drm_ioctl.c`
>    - `drivers/gpu/drm/vmwgfx/vmwgfx_drv.c`
>    - `include/drm/drm_ioctl.h`
>
> No other symbols or behavior are modified.
>
> Signed-off-by: Sunday Adelodun <adelodunolaoluwa@...oo.com>
> ---
>   drivers/gpu/drm/drm_ioctl.c         | 6 +++---
>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +-
>   include/drm/drm_ioctl.h             | 2 +-
>   3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index f593dc569d31..313e8bb7986a 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -912,7 +912,7 @@ long drm_ioctl(struct file *filp,
>   EXPORT_SYMBOL(drm_ioctl);
>   
>   /**
> - * drm_ioctl_flags - Check for core ioctl and return ioctl permission flags
> + * drm_ioctl_get_flags - Check for core ioctl and return ioctl permission flags
>    * @nr: ioctl number
>    * @flags: where to return the ioctl permission flags
>    *
> @@ -923,7 +923,7 @@ EXPORT_SYMBOL(drm_ioctl);
>    * Returns:
>    * True if the @nr corresponds to a DRM core ioctl number, false otherwise.
>    */
> -bool drm_ioctl_flags(unsigned int nr, unsigned int *flags)
> +bool drm_ioctl_get_flags(unsigned int nr, unsigned int *flags)
>   {
>   	if (nr >= DRM_COMMAND_BASE && nr < DRM_COMMAND_END)
>   		return false;
> @@ -935,4 +935,4 @@ bool drm_ioctl_flags(unsigned int nr, unsigned int *flags)
>   	*flags = drm_ioctls[nr].flags;
>   	return true;
>   }
> -EXPORT_SYMBOL(drm_ioctl_flags);
> +EXPORT_SYMBOL(drm_ioctl_get_flags);
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> index 8ff958d119be..fa4644067d46 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -1257,7 +1257,7 @@ static long vmw_generic_ioctl(struct file *filp, unsigned int cmd,
>   			goto out_io_encoding;
>   
>   		flags = ioctl->flags;
> -	} else if (!drm_ioctl_flags(nr, &flags))
> +	} else if (!drm_ioctl_get_flags(nr, &flags))
>   		return -EINVAL;
>   
>   	return ioctl_func(filp, cmd, arg);
> diff --git a/include/drm/drm_ioctl.h b/include/drm/drm_ioctl.h
> index 171760b6c4a1..585dda7550b0 100644
> --- a/include/drm/drm_ioctl.h
> +++ b/include/drm/drm_ioctl.h
> @@ -164,7 +164,7 @@ long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
>   /* Let drm_compat_ioctl be assigned to .compat_ioctl unconditionally */
>   #define drm_compat_ioctl NULL
>   #endif
> -bool drm_ioctl_flags(unsigned int nr, unsigned int *flags);
> +bool drm_ioctl_get_flags(unsigned int nr, unsigned int *flags);
>   
>   int drm_noop(struct drm_device *dev, void *data,
>   	     struct drm_file *file_priv);

Hi all,

I hope this meets you well.

I wanted to check if there's any update or if any further changes are 
needed from my side

regarding this patch.

Thank you for your time.

Best regards,
Sunday Adelodun


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ