Problem with new uapi header in Linux kernel 4.4+

Bauer, Scott scott.bauer at
Thu Oct 6 16:28:40 PDT 2016

-----Original Message-----
From: Linux-nvme [mailto:linux-nvme-bounces at] On Behalf Of Jan Luca Naumann
Sent: Thursday, October 6, 2016 9:15 AM
To: linux-nvme at
Subject: Problem with new uapi header in Linux kernel 4.4+


at the moment I try to install a tool called "sedutil"[1]. The tool manages self encrypting drives that conform to the TCG OPAL 2.0 specification.

The program uses in the current version i.a. ioctl() to communicate with NVMe disks (see header [2] and source file [3]). The problem is that the tool uses the no longer to the user space exported header file "linux/nvme.h". In the new uapi header "linux/nvme_ioctl.h" are the enumeration "nvme_admin_opcode" and the structure "nvme_id_ctrl" no longer available that are used in the source code...

Since I do not have much experience with ioctl/NVMe and the upstream author has no time at the moment, I want to ask you what would be the best attempt to fix this.

Thank you in advance and best regards,



If you want it to *just work*: 
1) Place the attached nvme.h file in /usr/include/liunx/
2) Modify sedutil/linux/DtaDevLinuxNvme.cpp
     Add #include <linux/nvme_ioctl.h>
3) rebuild

This is what I did a while ago to get this to build. Just so you know I was having issues with this upstream version of sedutil not actually working on a opal-enabled controller. I had to checkout version 1.12 for it to work.

For what it is worth the kernel will soon have OPAL support built in so you won't have to do this weird hack, and use a
tool that is no longer maintained. 


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nvme.h
URL: <>

More information about the Linux-nvme mailing list