Skip to content

Commit

Permalink
Allow mysqld_t to read and write to the 'memory.pressure' file in cgr…
Browse files Browse the repository at this point in the history
…oup2

--

Note:
The original suggestion was:
  allow mysqld_t cgroup_t:file { read write };
however one should not use a SELinux type from outside of their own SELinux module

--

Note from Daniel Black:
For clarity
  MariaDB/server@2323483#diff-ed06407705f2d1088e796ecb0c9592f1928f7b86fa8e48cbbe50f589fce18f3cR801
is the write to describe the PSI event desired from the kernel.
ref: https://www.kernel.org/doc/html/latest/accounting/psi.html

--

Resolves: RHBZ#2294899 RHBZ#2256002
  • Loading branch information
FaramosCZ committed Sep 16, 2024
1 parent a672fbb commit d39fb26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysql.te
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ allow mysqld_t self:udp_socket create_socket_perms;
kernel_read_network_state(mysqld_t)
kernel_read_net_sysctls(mysqld_t)

# Allow mysqld_t to read to memory.pressure in cgroup
fs_read_cgroup_files(mysqld_t)
fs_write_cgroup_files(mysqld_t)

manage_dirs_pattern(mysqld_t, mysqld_db_t, mysqld_db_t)
manage_files_pattern(mysqld_t, mysqld_db_t, mysqld_db_t)
manage_sock_files_pattern(mysqld_t, mysqld_db_t, mysqld_db_t)
Expand Down

0 comments on commit d39fb26

Please sign in to comment.