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:   Fri, 21 Jul 2023 09:39:30 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Mark Brown <broonie@...nel.org>,
        Dan Carpenter <dan.carpenter@...aro.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regmap: Remove dynamic allocation warnings for rbtree and
 maple

On 7/21/23 09:31, Mark Brown wrote:
> Thanks to Dan and Guenter's very prompt updates of the rbtree and maple
> caches to support GPF_ATOMIC allocations and since the update shook out
> a bunch of users at least some of whom have been suitably careful about
> ensuring that the cache is prepoulated so there are no dynamic
> allocations after init let's revert the warnings.
> 
> Signed-off-by: Mark Brown <broonie@...nel.org>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/base/regmap/regmap.c | 9 ---------
>   1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index 6c637b18d6b0..8b37451fa931 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -723,15 +723,6 @@ struct regmap *__regmap_init(struct device *dev,
>   	} else {
>   		if ((bus && bus->fast_io) ||
>   		    config->fast_io) {
> -			/*
> -			 * fast_io is incompatible with REGCACHE_RBTREE and REGCACHE_MAPLE
> -			 * since both need to dynamically allocate memory.
> -			 */
> -			if (config->cache_type == REGCACHE_RBTREE ||
> -			    config->cache_type == REGCACHE_MAPLE) {
> -				ret = -EINVAL;
> -				goto err_name;
> -			}
>   			if (config->use_raw_spinlock) {
>   				raw_spin_lock_init(&map->raw_spinlock);
>   				map->lock = regmap_lock_raw_spinlock;
> 
> ---
> base-commit: b0393e1fe40e962574613a5cdc4a470d6c1de023
> change-id: 20230721-regmap-enable-kmalloc-2e2d0d018cef
> 
> Best regards,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ