Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: <dan.j.williams@intel.com>, <dave.jiang@intel.com>,
	<vishal.l.verma@intel.com>, <fan.ni@samsung.com>,
	<a.manzanares@samsung.com>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v6 0/7] cxl: Support device sanitation
Date: Tue, 13 Jun 2023 16:51:30 +0100	[thread overview]
Message-ID: <20230613165130.00006259@huawei.com> (raw)
In-Reply-To: <20230613162611.00007b0b@Huawei.com>

On Tue, 13 Jun 2023 16:26:11 +0100
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> Hi Davidlohr,
> 
> > Testing.
> > ========
> > 
> > o There are the mock device tests for Sanitize and Secure Erase.
> > 
> > o The latest (v2) qemu bg/sanitize support series is posted here:
> > 	https://lore.kernel.org/linux-cxl/20230418172337.19207-1-dave@stgolabs.net/  
> 
> That doesn't seem to have support for reading back the security state so
> the stuff this set adds fails before it gets going.
> Am I missing another series?
> 
I hacked in enough to get things to carry on...

Following might be something I've broken locally but on basis
it might not...  Note my QEMU is odd right now as I'm in middle
of a big refactor of the CCI handling, but this should still not happen
even if I happen to have broken QEMU side of things in some weird way.

My base is more or less mainline + background set as queued on CXL
tree plus this set.

However similar traces to below happen when I poke a 1 into
sanitize

 This appears to be:

        WARN_ON_ONCE(timer->function != delayed_work_timer_fn);
then
        WARN_ON_ONCE(!list_empty(&work->entry));

triggering.

------------[ cut here ]------------                                                                                                                                                                                                                                    
 WARNING: CPU: 3 PID: 617 at kernel/workqueue.c:1663 __queue_delayed_work+0xb8/0xe8                                                                                                                                                                                       
 Modules linked in: cxl_pmem cxl_mem cxl_port cxl_pmu cxl_acpi cxl_pci cxl_core                                                                                                                                                                                           
 CPU: 3 PID: 617 Comm: bash Not tainted 6.4.0-rc6+ #790                                                                                                                                                                                                                   
 Hardware name: QEMU QEMU Virtual Machine, BIOS unknown unknown                                                                                                                                                                                                           
 pstate: 014000c5 (nzcv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--)                                                                                                                                                                                                         
 pc : __queue_delayed_work+0xb8/0xe8                                                                                                                                                                                                                                      
 lr : queue_delayed_work_on+0x70/0x98                                                                                                                                                                                                                                     
 sp : ffff800008a23b10                                                                                                                                                                                                                                                    
 x29: ffff800008a23b10 x28: ffff0000f6de5880 x27: ffff0000c14d9c80                                                                                                                                                                                                        
 x26: ffff8000085510a8 x25: ffff0000c0a490d0 x24: ffff0000c14d9cd8                                                                                                                                                                                                        
 x23: ffff800008a23da8 x22: fffffffffffffff2 x21: 0000000000000000                                                                                                                                                                                                        
 x20: 0000000000000001 x19: 0000000000000000 x18: 0000000000000000                                                                                                                                                                                                       
 x17: 0000000000000000 x16: ffffba73a9885008 x15: 0000aaaad5a0b6b0
 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
 x11: 0000000000000000 x10: 0000000000000000 x9 : ffffba73a9885078
 x8 : ffff800008a23c98 x7 : 0000000000000000 x6 : 0000000000000000
 x5 : ffffba73a9884ea8 x4 : 0000000000000100 x3 : 00000000000000fa
 x2 : ffff0000c14d9e98 x1 : ffff0000c0028600 x0 : ffff0000c14d9eb8
Call trace:
  __queue_delayed_work+0xb8/0xe8
  queue_delayed_work_on+0x70/0x98
  cxl_pci_mbox_send+0x404/0x580 [cxl_pci]
  cxl_internal_send_cmd+0x48/0x110 [cxl_core]
  cxl_mem_sanitize+0xbc/0x140 [cxl_core]
  security_sanitize_store+0x98/0xf0 [cxl_core]
  dev_attr_store+0x20/0x40
  sysfs_kf_write+0x4c/0x68
  kernfs_fop_write_iter+0x128/0x200
  vfs_write+0x1ac/0x2e8
  ksys_write+0x74/0x110
  __arm64_sys_write+0x24/0x38
  invoke_syscall.constprop.0+0x58/0xf8
  do_el0_svc+0x60/0x168
  el0_svc+0x38/0xf0
  el0t_64_sync_handler+0xf4/0x120
  el0t_64_sync+0x190/0x198
 ---[ end trace 0000000000000000 ]---

  reply	other threads:[~2023-06-13 15:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12 18:10 [PATCH v6 0/7] cxl: Support device sanitation Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 1/7] cxl/mbox: Allow for IRQ_NONE case in the isr Davidlohr Bueso
2023-06-13 12:49   ` Jonathan Cameron
2023-06-13 18:11   ` Dave Jiang
2023-06-12 18:10 ` [PATCH 2/7] cxl/mem: Introduce security state sysfs file Davidlohr Bueso
2023-06-13 18:12   ` Dave Jiang
2023-06-12 18:10 ` [PATCH 3/7] cxl/mbox: Add sanitation handling machinery Davidlohr Bueso
2023-06-13 16:07   ` Jonathan Cameron
2023-06-13 16:28     ` Davidlohr Bueso
2023-06-14  8:36       ` Jonathan Cameron
2023-06-25 22:13   ` Dan Williams
2023-06-26 18:17     ` Davidlohr Bueso
2023-06-25 22:18   ` Dan Williams
2023-06-12 18:10 ` [PATCH 4/7] cxl/mem: Wire up Sanitation support Davidlohr Bueso
2023-06-25 22:34   ` Dan Williams
2023-06-12 18:10 ` [PATCH 5/7] cxl/test: Add Sanitize opcode support Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 6/7] cxl/mem: Support Secure Erase Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 7/7] cxl/test: Add Secure Erase opcode support Davidlohr Bueso
2023-06-13 15:26 ` [PATCH v6 0/7] cxl: Support device sanitation Jonathan Cameron
2023-06-13 15:51   ` Jonathan Cameron [this message]
2023-06-13 16:25     ` Davidlohr Bueso
2023-06-25 22:44 ` Dan Williams
2023-06-26 21:32   ` Davidlohr Bueso
2023-06-26 22:47     ` Dan Williams
2023-06-27  8:02       ` [PATCH] cxl/pci: Use correct flag for sanitize polling Davidlohr Bueso
2023-06-27 23:01         ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230613165130.00006259@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=a.manzanares@samsung.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=fan.ni@samsung.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox