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]
Message-Id: <20250317095654.28fee435e7e29712006682d6@linux-foundation.org>
Date: Mon, 17 Mar 2025 09:56:54 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
 linux-kernel@...r.kernel.org, Andy Shevchenko <andy@...nel.org>
Subject: Re: [PATCH v1 1/1] resource: Split DEFINE_RES_NAMED_DESC() out of
 DEFINE_RES_NAMED()

On Thu, 13 Mar 2025 18:09:40 +0200 Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

> In some cases it would be useful to supply predefined descriptor
> of the resource. For this, introduce DEFINE_RES_NAMED_DESC() macro.
> 
> While at it, provide DEFINE_RES() that takes only start, size,
> and flags.
> 
> ...
>
> --- a/include/linux/ioport.h
> +++ b/include/linux/ioport.h
> @@ -157,15 +157,20 @@ enum {
>  };
>  
>  /* helpers to define resources */
> -#define DEFINE_RES_NAMED(_start, _size, _name, _flags)			\
> +#define DEFINE_RES_NAMED_DESC(_start, _size, _name, _flags, _desc)	\
>  (struct resource) {							\
>  		.start = (_start),					\
>  		.end = (_start) + (_size) - 1,				\
>  		.name = (_name),					\
>  		.flags = (_flags),					\
> -		.desc = IORES_DESC_NONE,				\
> +		.desc = (_desc),					\
>  	}
>  
> +#define DEFINE_RES_NAMED(_start, _size, _name, _flags)			\
> +	DEFINE_RES_NAMED_DESC(_start, _size, _name, _flags, IORES_DESC_NONE)
> +#define DEFINE_RES(_start, _size, _flags)				\
> +	DEFINE_RES_NAMED(_start, _size, NULL, _flags)
> +
>  #define DEFINE_RES_IO_NAMED(_start, _size, _name)			\
>  	DEFINE_RES_NAMED((_start), (_size), (_name), IORESOURCE_IO)
>  #define DEFINE_RES_IO(_start, _size)					\

But the new DEFINE_RES_NAMED_DESC() has no users.  Can we add some?  To
demonstrate the usefulness of the new macro and to test it.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ