# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2026 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

# Sata disks
#
# To limit to SATA connector. You may prefer `<abstractions/sys/sd>` that gives
# control over solid disks regardless of the connector.

  abi <abi/4.0>,

  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/ r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/@{sd}@{u8}/ r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/@{sd}@{u8}/dev r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/@{sd}@{u8}/holders/ r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/@{sd}@{u8}/ro r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/@{sd}@{u8}/size r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/@{sd}@{u8}/start r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/@{sd}@{u8}/uevent r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/alignment_offset r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/dev r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/diskseq r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/ext_range r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/hidden r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/holders/ r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/queue/dax r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/queue/logical_block_size r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/queue/minimum_io_size r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/queue/optimal_io_size r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/queue/physical_block_size r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/queue/rotational r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/removable r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/ro r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/size r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/block/@{sd}/slaves/ r,

  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/model r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/type r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/**/vendor r,
  @{sys}/devices/@{pci}/ata@{int}/host@{int}/scsi_host/host@{int}/unique_id r,
  @{sys}/devices/@{pci}/ata@{int}/uevent r,

  include if exists <abstractions/sys/sata.d>

# vim:syntax=apparmor
