twx-linux/include/uapi/linux
Ondrej Kozina 9e05a2599a sed-opal: geometry feature reporting command
Locking range start and locking range length
attributes may be require to satisfy restrictions
exposed by OPAL2 geometry feature reporting.

Geometry reporting feature is described in TCG OPAL SSC,
section 3.1.1.4 (ALIGN, LogicalBlockSize, AlignmentGranularity
and LowestAlignedLBA).

4.3.5.2.1.1 RangeStart Behavior:

[ StartAlignment = (RangeStart modulo AlignmentGranularity) - LowestAlignedLBA ]

When processing a Set method or CreateRow method on the Locking
table for a non-Global Range row, if:

a) the AlignmentRequired (ALIGN above) column in the LockingInfo
   table is TRUE;
b) RangeStart is non-zero; and
c) StartAlignment is non-zero, then the method SHALL fail and
   return an error status code INVALID_PARAMETER.

4.3.5.2.1.2 RangeLength Behavior:

If RangeStart is zero, then
	[ LengthAlignment = (RangeLength modulo AlignmentGranularity) - LowestAlignedLBA ]

If RangeStart is non-zero, then
	[ LengthAlignment = (RangeLength modulo AlignmentGranularity) ]

When processing a Set method or CreateRow method on the Locking
table for a non-Global Range row, if:

a) the AlignmentRequired (ALIGN above) column in the LockingInfo
   table is TRUE;
b) RangeLength is non-zero; and
c) LengthAlignment is non-zero, then the method SHALL fail and
   return an error status code INVALID_PARAMETER

In userspace we stuck to logical block size reported by general
block device (via sysfs or ioctl), but we can not read
'AlignmentGranularity' or 'LowestAlignedLBA' anywhere else and
we need to get those values from sed-opal interface otherwise
we will not be able to report or avoid locking range setup
INVALID_PARAMETER errors above.

Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Tested-by: Milan Broz <gmazyland@gmail.com>
Link: https://lore.kernel.org/r/20230411090931.9193-2-okozina@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-19 14:07:13 -06:00
..
android binder: return pending info for frozen async txns 2023-01-19 17:14:18 +01:00
byteorder
caif
can
cifs
dvb
genwqe
hdlc
hsi
iio
isdn
misc
mmc
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-01-27 22:56:18 -08:00
netfilter_arp
netfilter_bridge
netfilter_ipv4
netfilter_ipv6
nfsd
raid
sched
spi
sunrpc
surface_aggregator
tc_act
tc_ematch
usb usb: uvc: Enumerate valid values for color matching 2023-02-06 13:46:42 +01:00
a.out.h
acct.h
acrn.h
adb.h
adfs_fs.h
affs_hardblocks.h
agpgart.h
aio_abi.h
am437x-vpfe.h
amt.h
apm_bios.h
arcfb.h
arm_sdei.h
aspeed-lpc-ctrl.h
aspeed-p2a-ctrl.h
aspeed-video.h
atalk.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_tcp.h
atm_zatm.h
atm.h
atmapi.h
atmarp.h
atmbr2684.h atm: uapi: fix spelling typos in comments 2022-12-22 18:18:37 -08:00
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
audit.h
auto_dev-ioctl.h
auto_fs4.h
auto_fs.h
auxvec.h rseq: Introduce feature size and alignment ELF auxiliary vector entries 2022-12-27 12:52:10 +01:00
ax25.h
batadv_packet.h batman-adv: tvlv: prepare for tvlv enabled multicast packet type 2023-01-21 19:01:59 +01:00
batman_adv.h
baycom.h
bcm933xx_hcs.h
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h
blkzoned.h
bpf_common.h
bpf_perf_event.h
bpf.h bpf: Add BPF_FIB_LOOKUP_SKIP_NEIGH for bpf_fib_lookup 2023-02-17 22:12:04 +01:00
bpfilter.h
bpqether.h
bsg.h
bt-bmc.h
btf.h
btrfs_tree.h
btrfs.h btrfs: ioctl: return device fsid from DEV_INFO ioctl 2023-03-06 19:28:19 +01:00
cachefiles.h
can.h
capability.h
capi.h
cciss_defs.h
cciss_ioctl.h
ccs.h
cdrom.h
cec-funcs.h
cec.h
cfm_bridge.h
cgroupstats.h
chio.h
close_range.h
cm4000_cs.h
cn_proc.h
coda.h
coff.h
comedi.h
connector.h
const.h
coresight-stm.h
counter.h
cramfs_fs.h
cryptouser.h
cuda.h
cxl_mem.h cxl/mem: Fix UAPI command comment 2023-02-10 17:54:45 -08:00
cyclades.h
cycx_cfm.h
dcbnl.h net: dcb: add new rewrite table 2023-01-20 09:33:22 +00:00
dccp.h
devlink.h
dlm_device.h
dlm_netlink.h
dlm_plock.h
dlm.h
dlmconstants.h
dm-ioctl.h
dm-log-userspace.h
dma-buf.h
dma-heap.h
dns_resolver.h
dqblk_xfs.h
dw100.h
edd.h
efs_fs_sb.h
elf-em.h
elf-fdpic.h
elf.h LoongArch changes for v6.3 2023-03-01 09:27:00 -08:00
errno.h
errqueue.h
erspan.h
ethtool_netlink.h net: ethtool: extend ringparam set/get APIs for rx_push 2023-02-13 11:05:12 +00:00
ethtool.h net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) 2023-01-23 12:44:18 +00:00
eventpoll.h
f2fs.h
fadvise.h
falloc.h
fanotify.h fanotify: define struct members to hold response decision context 2023-02-07 12:53:53 +01:00
fb.h
fcntl.h mm/memfd: add F_SEAL_EXEC 2023-01-18 17:12:37 -08:00
fd.h
fdreg.h
fib_rules.h
fiemap.h
filter.h
firewire-cdev.h
firewire-constants.h
fou.h ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause 2023-03-07 13:44:30 -08:00
fpga-dfl.h
fs.h
fscrypt.h
fsi.h
fsl_hypervisor.h
fsl_mc.h
fsmap.h
fsverity.h
fuse.h fuse: optional supplementary group in create requests 2023-01-26 17:10:38 +01:00
futex.h
gameport.h
gen_stats.h
genetlink.h
gfs2_ondisk.h
gpio.h
gsmmux.h tty: n_gsm: add keep alive support 2023-02-16 13:50:50 +01:00
gtp.h
hash_info.h
hdlc.h
hdlcdrv.h
hdreg.h
hid.h
hiddev.h
hidraw.h
hpet.h
hsr_netlink.h
hw_breakpoint.h
hyperv.h
i2c-dev.h
i2c.h
i2o-dev.h
i8k.h
icmp.h
icmpv6.h
idxd.h
if_addr.h
if_addrlabel.h
if_alg.h
if_arcnet.h
if_arp.h
if_bonding.h
if_bridge.h net: bridge: Add netlink knobs for number / maximum MDB entries 2023-02-06 08:48:26 +00:00
if_cablemodem.h
if_eql.h
if_ether.h
if_fc.h
if_fddi.h
if_hippi.h
if_infiniband.h
if_link.h net: bridge: Add netlink knobs for number / maximum MDB entries 2023-02-06 08:48:26 +00:00
if_ltalk.h
if_macsec.h
if_packet.h packet: add TP_STATUS_GSO_TCP for tp_status 2023-02-01 20:54:27 -08:00
if_phonet.h
if_plip.h
if_ppp.h
if_pppol2tp.h
if_pppox.h
if_slip.h
if_team.h
if_tun.h
if_tunnel.h
if_vlan.h
if_x25.h
if_xdp.h
if.h
ife.h
igmp.h
ila.h
in6.h
in_route.h
in.h inet: Add IP_LOCAL_PORT_RANGE socket option 2023-01-25 22:45:00 -08:00
inet_diag.h
inotify.h
input-event-codes.h
input.h
io_uring.h hardening updates for v6.3-rc1 2023-02-21 11:07:23 -08:00
ioam6_genl.h
ioam6_iptunnel.h
ioam6.h ipv6: ioam: Replace 0-length array with flexible array 2023-01-06 19:22:53 -08:00
ioctl.h
iommu.h
iommufd.h
ioprio.h
ip6_tunnel.h
ip_vs.h
ip.h uapi: add missing ip/ipv6 header dependencies for linux/stddef.h 2023-02-06 09:01:00 +00:00
ipc.h
ipmi_bmc.h
ipmi_msgdefs.h
ipmi_ssif_bmc.h
ipmi.h
ipsec.h
ipv6_route.h
ipv6.h uapi: add missing ip/ipv6 header dependencies for linux/stddef.h 2023-02-06 09:01:00 +00:00
irqnr.h
iso_fs.h
isst_if.h
ivtv.h
ivtvfb.h
jffs2.h
joystick.h
kcm.h
kcmp.h
kcov.h
kd.h VT: Add KD_FONT_OP_SET/GET_TALL operations 2023-01-19 16:28:57 +01:00
kdev_t.h
kernel-page-flags.h
kernel.h
kernelcapi.h
kexec.h
keyboard.h
keyctl.h
kfd_ioctl.h
kfd_sysfs.h
kvm_para.h
kvm.h * Two more V!=R patches 2023-02-15 12:35:26 -05:00
l2tp.h
landlock.h
libc-compat.h
limits.h
lirc.h
llc.h
loadpin.h
loop.h
lp.h
lwtunnel.h
magic.h
major.h
map_to_7segment.h
map_to_14segment.h
matroxfb.h
max2175.h
mctp.h
mdio.h net: phy: add genphy_c45_ethtool_get/set_eee() support 2023-02-13 11:12:31 +00:00
media-bus-format.h drm-misc-next for v6.3: 2023-01-04 14:59:25 +01:00
media.h
mei.h
membarrier.h sched/membarrier: Introduce MEMBARRIER_CMD_GET_REGISTRATIONS 2023-01-07 11:29:29 +01:00
memfd.h mm/memfd: add MFD_NOEXEC_SEAL and MFD_EXEC 2023-01-18 17:12:37 -08:00
mempolicy.h
mii.h
minix_fs.h
mman.h
mmtimer.h
module.h
mount.h
mpls_iptunnel.h
mpls.h
mptcp.h
mqueue.h
mroute6.h
mroute.h
mrp_bridge.h
msdos_fs.h
msg.h
mtio.h
nbd-netlink.h
nbd.h
ncsi.h
ndctl.h
neighbour.h
net_dropmon.h
net_namespace.h
net_tstamp.h
net.h
netconf.h
netdev.h ynl: re-license uniformly under GPL-2.0 OR BSD-3-Clause 2023-03-07 13:44:30 -08:00
netdevice.h
netfilter_arp.h
netfilter_bridge.h
netfilter_ipv4.h
netfilter_ipv6.h
netfilter.h
netlink_diag.h
netlink.h
netrom.h
nexthop.h
nfc.h
nfs2.h
nfs3.h
nfs4_mount.h
nfs4.h
nfs_fs.h
nfs_idmap.h
nfs_mount.h
nfs.h
nfsacl.h
nilfs2_api.h
nilfs2_ondisk.h
nitro_enclaves.h
nl80211-vnd-intel.h
nl80211.h wifi: nl80211: Allow authentication frames and set keys on NAN interface 2023-02-14 12:35:02 +01:00
nsfs.h
nubus.h
nvme_ioctl.h
nvram.h
omap3isp.h
omapfb.h
oom.h
openat2.h
openvswitch.h
packet_diag.h
param.h
parport.h
patchkey.h
pci_regs.h cxl: add RAS status unmasking for CXL 2023-02-14 14:12:54 -08:00
pci.h
pcitest.h
perf_event.h perf: Add perf_event_attr::config3 2023-02-07 11:52:00 +00:00
personality.h
pfkeyv2.h
pfrut.h
pg.h
phantom.h
phonet.h
pidfd.h
pkt_cls.h
pkt_sched.h
pktcdvd.h Revert "pktcdvd: remove driver." 2023-01-04 14:44:13 -07:00
pmu.h
poll.h
posix_acl_xattr.h
posix_acl.h
posix_types.h
ppdev.h
ppp_defs.h
ppp-comp.h
ppp-ioctl.h
pps.h
pr.h
prctl.h mm: implement memory-deny-write-execute as a prctl 2023-02-02 22:33:24 -08:00
psample.h
psci.h firmware/psci: Fix MEM_PROTECT_RANGE function numbers 2023-01-06 17:12:39 +00:00
psp-sev.h
ptp_clock.h
ptrace.h
qemu_fw_cfg.h
qnx4_fs.h
qnxtypes.h
qrtr.h
quota.h
radeonfb.h
random.h
rds.h
reboot.h
reiserfs_fs.h
reiserfs_xattr.h
remoteproc_cdev.h
resource.h
rfkill.h
rio_cm_cdev.h
rio_mport_cdev.h
rkisp1-config.h
romfs_fs.h
rose.h
route.h
rpl_iptunnel.h
rpl.h net: ipv6: rpl_iptunnel: Replace 0-length arrays with flexible arrays 2023-01-06 19:28:01 -08:00
rpmsg_types.h
rpmsg.h
rseq.h rseq: Extend struct rseq with per-memory-map concurrency ID 2022-12-27 12:52:12 +01:00
rtc.h
rtnetlink.h sched: add new attr TCA_EXT_WARN_MSG to report tc extact message 2023-01-17 09:38:33 +01:00
rxrpc.h
scc.h
sched.h
scif_ioctl.h
screen_info.h
sctp.h
seccomp.h
securebits.h
sed-opal.h sed-opal: geometry feature reporting command 2023-04-19 14:07:13 -06:00
seg6_genl.h
seg6_hmac.h
seg6_iptunnel.h
seg6_local.h
seg6.h
selinux_netlink.h
sem.h
serial_core.h serial: 8250_pci1xxxx: Add driver for quad-uart support 2023-02-08 13:10:15 +01:00
serial_reg.h serial: 8250: Define IIR 64 byte bit & cleanup related code 2023-01-19 15:01:20 +01:00
serial.h
serio.h
sev-guest.h
shm.h
signal.h
signalfd.h
smc_diag.h
smc.h
smiapp.h
snmp.h icmp: Add counters for rate limits 2023-01-26 10:52:18 +01:00
sock_diag.h
socket.h
sockios.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h
stddef.h
stm.h
string.h
suspend_ioctls.h
swab.h
switchtec_ioctl.h
sync_file.h
synclink.h
sysctl.h
sysinfo.h
target_core_user.h
taskstats.h
tcp_metrics.h
tcp.h
tdx-guest.h
tee.h
termios.h
thermal.h
time_types.h
time.h
timerfd.h
times.h
timex.h
tiocl.h
tipc_config.h
tipc_netlink.h
tipc_sockets_diag.h
tipc.h
tls.h
toshiba.h
tty_flags.h
tty.h
types.h
ublk_cmd.h block: ublk: switch to ioctl command encoding 2023-04-18 20:13:30 -06:00
udf_fs_i.h
udmabuf.h
udp.h
uhid.h
uinput.h
uio.h
uleds.h
ultrasound.h
um_timetravel.h
un.h
unistd.h
unix_diag.h
usbdevice_fs.h
usbip.h
userfaultfd.h
userio.h
utime.h
utsname.h
uuid.h uuid: Decouple guid_t and uuid_le types and respective macros 2023-01-31 15:57:19 +01:00
uvcvideo.h media: uvcvideo: Silence memcpy() run-time false positive warnings 2023-01-15 23:45:15 +02:00
v4l2-common.h
v4l2-controls.h media: meye: remove this deprecated driver 2023-01-22 09:54:31 +01:00
v4l2-dv-timings.h
v4l2-mediabus.h
v4l2-subdev.h media: subdev: add stream based configuration 2023-01-22 09:38:20 +01:00
vbox_err.h
vbox_vmmdev_types.h
vboxguest.h
vdpa.h vdpa: merge functionally duplicated dev_features attributes 2022-12-28 05:09:46 -05:00
vduse.h
veth.h
vfio_ccw.h
vfio_zdev.h
vfio.h vfio/type1: exclude mdevs from VFIO_UPDATE_VADDR 2023-02-09 11:39:14 -07:00
vhost_types.h vhost-vdpa: Introduce RESUME backend feature bit 2023-02-20 19:26:56 -05:00
vhost.h vhost-vdpa: uAPI to resume the device 2023-02-20 19:26:56 -05:00
videodev2.h media: Add Y210, Y212 and Y216 formats 2023-01-20 17:46:00 +02:00
virtio_9p.h
virtio_balloon.h
virtio_blk.h virtio_blk: mark all zone fields LE 2023-02-15 06:46:22 -05:00
virtio_bt.h
virtio_config.h
virtio_console.h
virtio_crypto.h
virtio_fs.h
virtio_gpio.h
virtio_gpu.h
virtio_i2c.h
virtio_ids.h
virtio_input.h
virtio_iommu.h
virtio_mem.h
virtio_mmio.h
virtio_net.h
virtio_pci.h
virtio_pcidev.h
virtio_pmem.h
virtio_ring.h
virtio_rng.h
virtio_scmi.h
virtio_scsi.h
virtio_snd.h
virtio_types.h
virtio_vsock.h
vm_sockets_diag.h
vm_sockets.h
vmcore.h
vsockmon.h
vt.h
vtpm_proxy.h
wait.h
watch_queue.h
watchdog.h
wireguard.h
wireless.h
wmi.h
wwan.h
x25.h
xattr.h
xdp_diag.h
xfrm.h
xilinx-v4l2-controls.h
zorro_ids.h
zorro.h