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: <054739a5-f38c-4756-b248-94dfb6bad916@acm.org>
Date: Thu, 16 May 2024 08:17:13 -0600
From: Bart Van Assche <bvanassche@....org>
To: Avri Altman <avri.altman@....com>,
 "Martin K . Petersen" <martin.petersen@...cle.com>
Cc: Bean Huo <beanhuo@...ron.com>, Peter Wang <peter.wang@...iatek.com>,
 linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 3/3] scsi: ufs: sysfs: Make max_number_of_rtt
 read-write

On 5/15/24 23:51, Avri Altman wrote:
> +static ssize_t max_number_of_rtt_store(struct device *dev,
> +				     struct device_attribute *attr,
> +				     const char *buf, size_t count)
> +{
> +	struct ufs_hba *hba = dev_get_drvdata(dev);
> +	unsigned int rtt;
> +	int ret;
> +
> +	if (kstrtouint(buf, 0, &rtt))
> +		return -EINVAL;
> +
> +	down(&hba->host_sem);
> +	if (!ufshcd_is_user_access_allowed(hba)) {
> +		ret = -EBUSY;
> +		goto out;
> +	}
> +
> +	ufshcd_rpm_get_sync(hba);
> +	ret = ufshcd_query_attr(hba, UPIU_QUERY_OPCODE_WRITE_ATTR,
> +		QUERY_ATTR_IDN_MAX_NUM_OF_RTT, 0, 0, &rtt);
> +	ufshcd_rpm_put_sync(hba);
> +
> +out:
> +	up(&hba->host_sem);
> +	return ret < 0 ? ret : count;
> +}

Since modifying RTT is only allowed while no commands are in progress,
shouldn't max_number_of_rtt_store() freeze and unfreeze all request
queues of all logical units?

Thanks,

Bart.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ