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

  abi <abi/4.0>,

  include <abstractions/dri>
  include <abstractions/mesa>
  include <abstractions/nvidia-strict>
  include <abstractions/vulkan-strict>

  /etc/igfx_user_feature{,_next,_report}.txt w,
  /etc/libva.conf r,

  @{sys}/bus/pci/devices/ r,

  @{sys}/devices/system/cpu/cpu@{int}/cache/index@{int}/coherency_line_size r,
  @{sys}/devices/system/cpu/cpu@{int}/cache/index@{int}/id r,
  @{sys}/devices/system/cpu/cpu@{int}/cache/index@{int}/level r,
  @{sys}/devices/system/cpu/cpu@{int}/cache/index@{int}/shared_cpu_map r,
  @{sys}/devices/system/cpu/cpu@{int}/cache/index@{int}/size r,
  @{sys}/devices/system/cpu/cpu@{int}/cache/index@{int}/type r,
  @{sys}/devices/system/cpu/cpu@{int}/cache/index@{int}/ways_of_associativity r,
  @{sys}/devices/system/cpu/cpu@{int}/cpu_capacity r,
  @{sys}/devices/system/cpu/cpu@{int}/online r,
  @{sys}/devices/system/cpu/cpu@{int}/topology/core_cpus r,
  @{sys}/devices/system/cpu/cpu@{int}/topology/physical_package_id r,
  @{sys}/devices/system/cpu/cpu@{int}/topology/thread_siblings r,
  @{sys}/devices/system/cpu/cpu@{int}/topology/thread_siblings_list r,
  @{sys}/devices/system/cpu/cpufreq/policy@{int}/cpuinfo_max_freq r,
  @{sys}/devices/system/cpu/cpufreq/policy@{int}/cpuinfo_min_freq r,
  @{sys}/devices/system/cpu/cpufreq/policy@{int}/scaling_cur_freq r,
  @{sys}/devices/system/cpu/cpufreq/policy@{int}/scaling_max_freq r,
  @{sys}/devices/system/cpu/present r,

  @{sys}/devices/system/node/ r,
  @{sys}/devices/system/node/node@{int}/cpumap r,
  @{sys}/devices/system/node/node@{int}/meminfo r,
  @{sys}/devices/system/node/online r,

  include if exists <abstractions/graphics.d>

# vim:syntax=apparmor
