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: <20230326030810.GC3269998@google.com>
Date:   Sun, 26 Mar 2023 12:08:10 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Liu Shixin <liushixin2@...wei.com>
Cc:     Seth Jennings <sjenning@...hat.com>,
        Dan Streetman <ddstreet@...e.org>,
        Vitaly Wool <vitaly.wool@...sulko.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH -next v7 2/4] mm/zswap: skip invalid or unchanged
 parameter

On (23/03/25 15:14), Liu Shixin wrote:
> +++ b/mm/zswap.c
> @@ -761,15 +761,15 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp,
>  	char *s = strstrip((char *)val);
>  	int ret;
>  
> +	/* no change required */
> +	if (!strcmp(s, *(char **)kp->arg) && zswap_has_pool)
> +		return 0;
> +
>  	if (zswap_init_failed) {
>  		pr_err("can't set param, initialization failed\n");
>  		return -ENODEV;
>  	}
>  
> -	/* no change required */
> -	if (!strcmp(s, *(char **)kp->arg) && zswap_has_pool)
> -		return 0;

I probably would suggest to simply remove `*(char **)kp->arg`
from zswap code entirely, it doesn't solve any real problem
(as far as I can tell).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ