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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0d9066de-769a-44d0-bece-26f1313ce006@os.amperecomputing.com>
Date: Fri, 7 Mar 2025 13:51:41 -0800
From: Daniel Ferguson <danielf@...amperecomputing.com>
To: shiju.jose@...wei.com, linux-edac@...r.kernel.org,
 linux-acpi@...r.kernel.org, bp@...en8.de, tony.luck@...el.com,
 rafael@...nel.org, lenb@...nel.org, mchehab@...nel.org, leo.duran@....com,
 Yazen.Ghannam@....com
Cc: linux-cxl@...r.kernel.org, dan.j.williams@...el.com, dave@...olabs.net,
 jonathan.cameron@...wei.com, dave.jiang@...el.com,
 alison.schofield@...el.com, vishal.l.verma@...el.com, ira.weiny@...el.com,
 david@...hat.com, Vilas.Sridharan@....com, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, rientjes@...gle.com, jiaqiyan@...gle.com,
 Jon.Grimm@....com, dave.hansen@...ux.intel.com, naoya.horiguchi@....com,
 james.morse@....com, jthoughton@...gle.com, somasundaram.a@....com,
 erdemaktas@...gle.com, pgonda@...gle.com, duenwen@...gle.com,
 gthelen@...gle.com, wschwartz@...erecomputing.com,
 dferguson@...erecomputing.com, wbs@...amperecomputing.com,
 nifan.cxl@...il.com, tanxiaofei@...wei.com, prime.zeng@...ilicon.com,
 roberto.sassu@...wei.com, kangkang.shen@...urewei.com,
 wanghuiqiang@...wei.com, linuxarm@...wei.com
Subject: Re: [PATCH v2 3/3] ras: mem: Add memory ACPI RAS2 driver


> +static int ras2_hw_scrub_read_size(struct device *dev, void *drv_data, u64 *size)
> +{
> +	struct ras2_mem_ctx *ras2_ctx = drv_data;
> +	int ret;
> +
> +	if (ras2_ctx->bg_scrub)
> +		return -EBUSY;
> +
> +	ret = ras2_update_patrol_scrub_params_cache(ras2_ctx);
> +	if (ret)
> +		return ret;
> +
> +	*size = ras2_ctx->size;
> +
> +	return 0;
> +}

Calling ras2_update_patrol_scrub_params_cache here is problematic.

Imagine:
  echo 0x1000 > size
  cat size
  echo 0x2000000000 > addr

What happens here? What happens is the scrub range is not what you expect it to
be.  Once you cat size, you reset the size from what you initially set it to.
I don't think that is what anyone will expect. It certainly caused us to stumble
while testing.

Regards,
~Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ