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: <a89910ad-da5b-42c2-8a0f-9f4908fa2c1a@acm.org>
Date: Tue, 9 Jul 2024 11:10:24 -0700
From: Bart Van Assche <bvanassche@....org>
To: "Bao D. Nguyen" <quic_nguyenb@...cinc.com>, quic_cang@...cinc.com,
 quic_nitirawa@...cinc.com, avri.altman@....com, peter.wang@...iatek.com,
 manivannan.sadhasivam@...aro.org, minwoo.im@...sung.com,
 adrian.hunter@...el.com, martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org, Alim Akhtar <alim.akhtar@...sung.com>,
 "James E.J. Bottomley" <jejb@...ux.ibm.com>, Bean Huo <beanhuo@...ron.com>,
 Maramaina Naresh <quic_mnaresh@...cinc.com>,
 open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/1] scsi: ufs: core: Support Updating UIC Command
 Timeout

On 7/8/24 11:06 PM, Bao D. Nguyen wrote:
> +static int uic_cmd_timeout_set(const char *val, const struct kernel_param *kp)
> +{
> +	unsigned int n;
> +	int ret;
> +
> +	ret = kstrtou32(val, 0, &n);
> +	if (ret != 0 || n < UIC_CMD_TIMEOUT_DEFAULT || n > UIC_CMD_TIMEOUT_MAX)
> +		return -EINVAL;
> +
> +	return param_set_int(val, kp);
> +}

The above code converts 'val' twice to an integer: a first time by
calling kstrtou32() and a second time by calling param_set_int().
Please remove one of the two string-to-integer conversions, e.g. by
changing "param_set_int(val, kp)" into "uic_cmd_timeout = n" or
*(unsigned int *)kp->arg = n".

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ