Bug 1214999 - NVMe CLI issue on openSUSE Leap 15.5
Summary: NVMe CLI issue on openSUSE Leap 15.5
Status: RESOLVED INVALID
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Other (show other bugs)
Version: Leap 15.5
Hardware: x86-64 openSUSE Leap 15.5
: P3 - Medium : Normal (vote)
Target Milestone: Leap 15.5
Assignee: Daniel Wagner
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-05 10:24 UTC by Ankush Khokher
Modified: 2024-01-25 14:09 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
screenshots (573.34 KB, application/pdf)
2023-09-05 10:24 UTC, Ankush Khokher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ankush Khokher 2023-09-05 10:24:35 UTC
Created attachment 869282 [details]
screenshots

There may be a nvme cli issue on openSUSE leap 15.5

I have the latest revision of nvme cli downloaded (2.4) on a opensuse system. I am looking to transition my centos servers to opensuse but this issue would be blocker to that. 

I am testing nvme drives for work and part of my test script looks to check the controller registers supported by the drive. I use "nvme show-regs /dev/nvmex" which should work. Please attached screenshots. You can expected output vs output I'm seeing on a opensuse system. 

CentOS system works as expected (see the attached document). I need this command to work in order to ensure the test script does what it's meant to. 

Is there a workaround?
Comment 1 Hannes Reinecke 2023-09-19 12:42:33 UTC
'show-regs' is actually limited by kernel lockdown, which precisely forbids 'ordinary' user to look at PCI registers.

But it might be that newer nvme-cli has a workaround to that.
Daniel?
Comment 2 Ankush Khokher 2023-09-19 12:48:51 UTC
(In reply to Hannes Reinecke from comment #1)
> 'show-regs' is actually limited by kernel lockdown, which precisely forbids
> 'ordinary' user to look at PCI registers.
> 
> But it might be that newer nvme-cli has a workaround to that.
> Daniel?

What does it mean to be an "ordinary" user? Is it possible to overwrite to send the command? I believe I am on the latest rev available for nvme cli-2.4.
Comment 3 Daniel Wagner 2023-10-04 06:06:10 UTC
Hardware register access is limited by the kernel config option CONFIG_IO_STRICT_DEVMEM. This means, userspace can't map the hardware register
and thus nvme-cli is not able to read them. 

The access strict feature can be disabled by adding the kernel command
line option 'iomem=relaxed'

https://documentation.suse.com/smart/systems-management/html/task-modify-kernel-boot-parameter/index.html
Comment 4 Daniel Wagner 2024-01-25 14:09:23 UTC
nvme-cli can only show the hardware register when the kernel allows
to map the hardware register to userland. The default distribution
settions do not allow this operation. Though this can be enabled
by booting the kernel with the 'iomem=relaxed' command line option.

This works as designed, nothing we ca do. Closing the bug report.