Find a file
Amir Goldstein e252f2ed1c fanotify: introduce FAN_MARK_IGNORE
This flag is a new way to configure ignore mask which allows adding and
removing the event flags FAN_ONDIR and FAN_EVENT_ON_CHILD in ignore mask.

The legacy FAN_MARK_IGNORED_MASK flag would always ignore events on
directories and would ignore events on children depending on whether
the FAN_EVENT_ON_CHILD flag was set in the (non ignored) mask.

FAN_MARK_IGNORE can be used to ignore events on children without setting
FAN_EVENT_ON_CHILD in the mark's mask and will not ignore events on
directories unconditionally, only when FAN_ONDIR is set in ignore mask.

The new behavior is non-downgradable.  After calling fanotify_mark() with
FAN_MARK_IGNORE once, calling fanotify_mark() with FAN_MARK_IGNORED_MASK
on the same object will return EEXIST error.

Setting the event flags with FAN_MARK_IGNORE on a non-dir inode mark
has no meaning and will return ENOTDIR error.

The meaning of FAN_MARK_IGNORED_SURV_MODIFY is preserved with the new
FAN_MARK_IGNORE flag, but with a few semantic differences:

1. FAN_MARK_IGNORED_SURV_MODIFY is required for filesystem and mount
   marks and on an inode mark on a directory. Omitting this flag
   will return EINVAL or EISDIR error.

2. An ignore mask on a non-directory inode that survives modify could
   never be downgraded to an ignore mask that does not survive modify.
   With new FAN_MARK_IGNORE semantics we make that rule explicit -
   trying to update a surviving ignore mask without the flag
   FAN_MARK_IGNORED_SURV_MODIFY will return EEXIST error.

The conveniene macro FAN_MARK_IGNORE_SURV is added for
(FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY), because the
common case should use short constant names.

Link: https://lore.kernel.org/r/20220629144210.2983229-4-amir73il@gmail.com
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
2022-07-01 14:53:01 +02:00
arch ARM: SoC fixes for 5.19 2022-06-26 14:12:56 -07:00
block block: remove WARN_ON() from bd_link_disk_holder 2022-06-23 07:48:05 -06:00
certs Certs changes 2022-06-21 12:13:53 -05:00
crypto Certs changes 2022-06-21 12:13:53 -05:00
Documentation A NULL pointer dereference fix for vc4, and 3 patches to improve the 2022-07-01 09:27:55 +10:00
drivers drm fixes for 5.19-rc5 2022-06-30 17:19:19 -07:00
fs fanotify: introduce FAN_MARK_IGNORE 2022-07-01 14:53:01 +02:00
include fanotify: introduce FAN_MARK_IGNORE 2022-07-01 14:53:01 +02:00
init gcc-12: disable '-Warray-bounds' universally for now 2022-06-09 10:11:12 -07:00
ipc These changes update the ipc sysctls so that they are fundamentally 2022-06-03 15:54:57 -07:00
kernel tick/nohz: unexport __init-annotated tick_nohz_full_setup() 2022-06-27 10:43:12 -07:00
lib Build tool updates: 2022-06-19 09:54:16 -05:00
LICENSES
mm Minor things, mainly - mailmap updates, MAINTAINERS updates, etc. 2022-06-26 14:00:55 -07:00
net net: rose: fix UAF bugs caused by timer handler 2022-06-30 11:07:30 +02:00
samples fprobe, samples: Add use_trace option and show hit/missed counter 2022-06-17 21:53:29 +02:00
scripts kbuild: Ignore __this_module in gen_autoksyms.sh 2022-06-26 06:15:05 +09:00
security selinux: free contexts previously transferred in selinux_add_opt() 2022-06-15 21:20:45 -04:00
sound sound fixes for 5.19-rc4 2022-06-23 08:44:00 -05:00
tools Including fixes from netfilter. 2022-06-30 15:26:55 -07:00
usr Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
virt KVM: x86: disable preemption around the call to kvm_arch_vcpu_{un|}blocking 2022-06-09 10:52:20 -04:00
.clang-format clang-format: Fix space after for_each macros 2022-05-20 19:27:16 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap mailmap: add entry for Christian Marangi 2022-06-16 19:11:32 -07:00
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Including fixes from netfilter. 2022-06-30 15:26:55 -07:00
Makefile Linux 5.19-rc4 2022-06-26 14:22:10 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.