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: <20230326045327.GE3269998@google.com>
Date:   Sun, 26 Mar 2023 13:53:27 +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, Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCH -next v7 2/4] mm/zswap: skip invalid or unchanged
 parameter

On (23/03/26 12:17), Sergey Senozhatsky wrote:
> On (23/03/25 15:14), Liu Shixin wrote:
> >  static int zswap_enabled_param_set(const char *val,
> >  				   const struct kernel_param *kp)
> >  {
> > +	bool res;
> > +
> > +	if (kstrtobool(val, &res))
> > +		return -EINVAL;
> > +
> > +	/* no change required */
> > +	if (res == *(bool *)kp->arg)
> > +		return 0;
> 
> Bool kernel param can be any of these letters 'YyTt1NnFf0'. Doing things
> to kp->arg outside of kernel/params.c is not going to be easy, let's not
> even try.

Please disregard my previous email. kp->arg is always true or false
at this point. I'd still prefer to not do kp->arg in zswap.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ