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]
Date:   Thu, 10 Nov 2022 19:12:43 -0800
From:   alison.schofield@...el.com
To:     Dan Williams <dan.j.williams@...el.com>,
        Ira Weiny <ira.weiny@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>,
        Dave Jiang <dave.jiang@...el.com>,
        Ben Widawsky <bwidawsk@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>
Cc:     Alison Schofield <alison.schofield@...el.com>,
        linux-cxl@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 5/6] tools/testing/cxl: Mock the max err records field of Identify cmd

From: Alison Schofield <alison.schofield@...el.com>

The CXL mbox command Identify reports the maximum media error
records that a device will report. Mock it here for testing
the GET POISON LIST mbox command.

Signed-off-by: Alison Schofield <alison.schofield@...el.com>
---
 tools/testing/cxl/test/mem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/cxl/test/mem.c b/tools/testing/cxl/test/mem.c
index aa2df3a15051..f0704d090073 100644
--- a/tools/testing/cxl/test/mem.c
+++ b/tools/testing/cxl/test/mem.c
@@ -111,6 +111,10 @@ static int mock_id(struct cxl_dev_state *cxlds, struct cxl_mbox_cmd *cmd)
 			cpu_to_le64(DEV_SIZE / CXL_CAPACITY_MULTIPLIER),
 	};
 
+	__le32 val = cpu_to_le32(SZ_64);
+
+	memcpy(id.poison_list_max_mer, &val, 3);
+
 	if (cmd->size_out < sizeof(id))
 		return -EINVAL;
 
-- 
2.37.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ