Bug 21498 - fanotify api unexpected error
Summary: fanotify api unexpected error
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 21708
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-11 11:30 CEST by eric gerbier
Modified: 2017-09-16 10:45 CEST (History)
2 users (show)

See Also:
Source RPM: kernel-4.9.40-1.mga6.src.rpm ?
CVE:
Status comment:


Attachments
test code from man 7 fanotify (5.94 KB, text/plain)
2017-08-11 11:31 CEST, eric gerbier
Details

Description eric gerbier 2017-08-11 11:30:12 CEST
Description of problem:
On mageia 6 (and 5), try to use fanotify api to monitor files events.
I first try with the c code example from man 7 fanotify
but the program always exit with the errno message : fanotify_mark: Invalid argument.
the same code works without any problem on other recent linux distributions : fedora 26, ubuntu 17.04

 
Version-Release number of selected component (if applicable):
tested with kernel 4.9.90-desktop-1, 4.9.35-server-1

How reproducible:
every time 

Steps to Reproduce:
1. take the c code example from man 7 fanotify : test_fanotify.c 
2. compile it with : gcc -o test_fanotify test_fanotify.c
3. run it under root : sudo ./test_fanotify  /tmp
Comment 1 eric gerbier 2017-08-11 11:31:25 CEST
Created attachment 9583 [details]
test code from man 7 fanotify
Marja Van Waes 2017-08-11 12:34:58 CEST

Assignee: bugsquad => kernel
CC: (none) => marja11

Comment 2 eric gerbier 2017-09-12 16:36:13 CEST
The test code does not work because CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not set
in the kernel.

$ grep FANOTIFY /boot/config-4.9.35-server-1.mga6 
CONFIG_FANOTIFY=y
# CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not set
Comment 3 Thomas Backlund 2017-09-14 20:17:47 CEST
I have enabled it in kernel-4.9.50-1 currently in updates_testing

CC: (none) => tmb
Depends on: (none) => 21708

Comment 4 Thomas Backlund 2017-09-16 10:45:22 CEST
FANOTIFY_ACCESS_PERMISSIONS enabled on all kernels

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.