1. 23 Oct, 2023 2 commits
  2. 22 Oct, 2023 1 commit
    • Arnd Bergmann's avatar
      apparmor: mark new functions static · 7060d3cc
      Arnd Bergmann authored
      Two new functions were introduced as global functions when they are
      only called from inside the file that defines them and should have
      been static:
      
      security/apparmor/lsm.c:658:5: error: no previous prototype for 'apparmor_uring_override_creds' [-Werror=missing-prototypes]
      security/apparmor/lsm.c:682:5: error: no previous prototype for 'apparmor_uring_sqpoll' [-Werror=missing-prototypes]
      
      Fixes: c4371d90 ("apparmor: add io_uring mediation")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      7060d3cc
  3. 18 Oct, 2023 12 commits
  4. 16 Oct, 2023 3 commits
    • Vinicius Costa Gomes's avatar
      apparmor: Optimize retrieving current task secid · 2516fde1
      Vinicius Costa Gomes authored
      When running will-it-scale[1] open2_process testcase, in a system with a
      large number of cores, a bottleneck in retrieving the current task
      secid was detected:
      
      27.73% ima_file_check;do_open (inlined);path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_x64 (inlined);do_syscall_64;entry_SYSCALL_64_after_hwframe (inlined);__libc_open64 (inlined)
          27.72%     0.01%  [kernel.vmlinux]      [k] security_current_getsecid_subj             -      -
      27.71% security_current_getsecid_subj;ima_file_check;do_open (inlined);path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_x64 (inlined);do_syscall_64;entry_SYSCALL_64_after_hwframe (inlined);__libc_open64 (inlined)
          27.71%    27.68%  [kernel.vmlinux]      [k] apparmor_current_getsecid_subj             -      -
      19.94% __refcount_add (inlined);__refcount_inc (inlined);refcount_inc (inlined);kref_get (inlined);aa_get_label (inlined);aa_get_label (inlined);aa_get_current_label (inlined);apparmor_current_getsecid_subj;security_current_getsecid_subj;ima_file_check;do_open (inlined);path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_x64 (inlined);do_syscall_64;entry_SYSCALL_64_after_hwframe (inlined);__libc_open64 (inlined)
      7.72% __refcount_sub_and_test (inlined);__refcount_dec_and_test (inlined);refcount_dec_and_test (inlined);kref_put (inlined);aa_put_label (inlined);aa_put_label (inlined);apparmor_current_getsecid_subj;security_current_getsecid_subj;ima_file_check;do_open (inlined);path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_x64 (inlined);do_syscall_64;entry_SYSCALL_64_after_hwframe (inlined);__libc_open64 (inlined)
      
      A large amount of time was spent in the refcount.
      
      The most common case is that the current task label is available, and
      no need to take references for that one. That is exactly what the
      critical section helpers do, make use of them.
      
      New perf output:
      
      39.12% vfs_open;path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_64;entry_SYSCALL_64_after_hwframe;__libc_open64 (inlined)
          39.07%     0.13%  [kernel.vmlinux]          [k] do_dentry_open                                                               -      -
      39.05% do_dentry_open;vfs_open;path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_64;entry_SYSCALL_64_after_hwframe;__libc_open64 (inlined)
          38.71%     0.01%  [kernel.vmlinux]          [k] security_file_open                                                           -      -
      38.70% security_file_open;do_dentry_open;vfs_open;path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_64;entry_SYSCALL_64_after_hwframe;__libc_open64 (inlined)
          38.65%    38.60%  [kernel.vmlinux]          [k] apparmor_file_open                                                           -      -
      38.65% apparmor_file_open;security_file_open;do_dentry_open;vfs_open;path_openat;do_filp_open;do_sys_openat2;__x64_sys_openat;do_syscall_64;entry_SYSCALL_64_after_hwframe;__libc_open64 (inlined)
      
      The result is a throughput improvement of around 20% across the board
      on the open2 testcase. On more realistic workloads the impact should
      be much less.
      
      [1] https://github.com/antonblanchard/will-it-scaleSigned-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      2516fde1
    • Xiu Jianfeng's avatar
      apparmor: remove unused functions in policy_ns.c/.h · fee5304a
      Xiu Jianfeng authored
      These functions are not used now, remove them.
      Signed-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      fee5304a
    • Xiu Jianfeng's avatar
      apparmor: remove unneeded #ifdef in decompress_zstd() · 5ebb39eb
      Xiu Jianfeng authored
      The whole function is guarded by CONFIG_SECURITY_APPARMOR_EXPORT_BINARY,
      so the #ifdef here is redundant, remove it.
      Signed-off-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      5ebb39eb
  5. 22 Aug, 2023 1 commit
  6. 08 Aug, 2023 4 commits
  7. 10 Jul, 2023 15 commits
  8. 09 Jul, 2023 2 commits
    • Linus Torvalds's avatar
      Linux 6.5-rc1 · 06c2afb8
      Linus Torvalds authored
      06c2afb8
    • Linus Torvalds's avatar
      MAINTAINERS 2: Electric Boogaloo · c192ac73
      Linus Torvalds authored
      We just sorted the entries and fields last release, so just out of a
      perverse sense of curiosity, I decided to see if we can keep things
      ordered for even just one release.
      
      The answer is "No. No we cannot".
      
      I suggest that all kernel developers will need weekly training sessions,
      involving a lot of Big Bird and Sesame Street.  And at the yearly
      maintainer summit, we will all sing the alphabet song together.
      
      I doubt I will keep doing this.  At some point "perverse sense of
      curiosity" turns into just a cold dark place filled with sadness and
      despair.
      
      Repeats: 80e62bc8 ("MAINTAINERS: re-sort all entries and fields")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c192ac73