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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2023 16:30:25 +0200 (EET)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     "David E. Box" <david.e.box@...ux.intel.com>
cc:     LKML <linux-kernel@...r.kernel.org>,
        platform-driver-x86@...r.kernel.org, rajvi.jingar@...ux.intel.com,
        dave.hansen@...ux.intel.com, peterz@...radead.org
Subject: Re: [PATCH V5 12/20] asm-generic/io.h: iounmap/ioport_unmap cleanup.h
 support

On Wed, 22 Nov 2023, David E. Box wrote:

> Add auto-release cleanups for iounmap() and ioport_unmap().
> 
> Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
> Suggested-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> ---
> V2 - Move from linux/io.h to asm-generic/io.h. Adds iounmap cleanup if
>      iounmap() is defined. Adds ioport_unmap cleanup if CONFIG_IOPORT_MAP
>      is defined.
> 
>  include/asm-generic/io.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
> index bac63e874c7b..9ef0332490b1 100644
> --- a/include/asm-generic/io.h
> +++ b/include/asm-generic/io.h
> @@ -8,6 +8,7 @@
>  #define __ASM_GENERIC_IO_H
>  
>  #include <asm/page.h> /* I/O is all done through memory accesses */
> +#include <linux/cleanup.h>
>  #include <linux/string.h> /* for memset() and memcpy() */
>  #include <linux/types.h>
>  #include <linux/instruction_pointer.h>
> @@ -1065,6 +1066,10 @@ static inline void __iomem *ioremap(phys_addr_t addr, size_t size)
>  #endif
>  #endif /* !CONFIG_MMU || CONFIG_GENERIC_IOREMAP */
>  
> +#ifdef iounmap
> +DEFINE_FREE(iounmap, void __iomem *, iounmap(_T));
> +#endif
> +
>  #ifndef ioremap_wc
>  #define ioremap_wc ioremap
>  #endif
> @@ -1127,6 +1132,7 @@ static inline void ioport_unmap(void __iomem *p)
>  extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
>  extern void ioport_unmap(void __iomem *p);
>  #endif /* CONFIG_GENERIC_IOMAP */
> +DEFINE_FREE(ioport_unmap, void __iomem *, ioport_unmap(_T));
>  #endif /* CONFIG_HAS_IOPORT_MAP */
>  
>  #ifndef CONFIG_GENERIC_IOMAP

Has this now built successfully with LKP? (I don't think we get success 
notifications from LKP for patch submissions, only failures).

There were some odd errors last time but I think all they were unrelated 
to this change (besides the checkpatch false positive, I mean).

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ