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]
Date: Tue, 19 Dec 2023 14:27:52 +0000
From: Robin Murphy <robin.murphy@....com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, hch@....de,
 m.szyprowski@...sung.com
Cc: linux-kernel@...r.kernel.org, iommu@...ts.linux.dev
Subject: Re: [PATCH] dma-debug: make dma_debug_add_bus take a const pointer

On 2023-12-19 1:41 pm, Greg Kroah-Hartman wrote:
> The driver core now can handle a const struct bus_type pointer, and the
> dma_debug_add_bus() call just passes on the pointer give to it to the
> driver core, so make this pointer const as well to allow everyone to use
> read-only struct bus_type pointers going forward.

Reviewed-by: Robin Murphy <robin.murphy@....com>

> Cc: Christoph Hellwig <hch@....de>
> Cc: Marek Szyprowski <m.szyprowski@...sung.com>
> Cc: Robin Murphy <robin.murphy@....com>
> Cc: iommu@...ts.linux.dev
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
>   include/linux/dma-map-ops.h | 4 ++--
>   kernel/dma/debug.c          | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h
> index f2fc203fb8a1..e401f824a007 100644
> --- a/include/linux/dma-map-ops.h
> +++ b/include/linux/dma-map-ops.h
> @@ -443,10 +443,10 @@ static inline void arch_teardown_dma_ops(struct device *dev)
>   #endif /* CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS */
>   
>   #ifdef CONFIG_DMA_API_DEBUG
> -void dma_debug_add_bus(struct bus_type *bus);
> +void dma_debug_add_bus(const struct bus_type *bus);
>   void debug_dma_dump_mappings(struct device *dev);
>   #else
> -static inline void dma_debug_add_bus(struct bus_type *bus)
> +static inline void dma_debug_add_bus(const struct bus_type *bus)
>   {
>   }
>   static inline void debug_dma_dump_mappings(struct device *dev)
> diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
> index 3de494375b7b..1a5c86dd87d5 100644
> --- a/kernel/dma/debug.c
> +++ b/kernel/dma/debug.c
> @@ -876,7 +876,7 @@ static int dma_debug_device_change(struct notifier_block *nb, unsigned long acti
>   	return 0;
>   }
>   
> -void dma_debug_add_bus(struct bus_type *bus)
> +void dma_debug_add_bus(const struct bus_type *bus)
>   {
>   	struct notifier_block *nb;
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ