lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 29 Oct 2021 12:03:11 -0300
From:   Gabriel Krisman Bertazi <krisman@...labora.com>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     LTP List <ltp@...ts.linux.it>, Jan Kara <jack@...e.com>,
        Khazhismel Kumykov <khazhy@...gle.com>, kernel@...labora.com,
        Ext4 <linux-ext4@...r.kernel.org>,
        Matthew Bobrowski <repnop@...gle.com>
Subject: Re: [PATCH v2 10/10] syscalls/fanotify20: Test capture of multiple
 errors

Amir Goldstein <amir73il@...il.com> writes:

> On Tue, Oct 26, 2021 at 9:44 PM Gabriel Krisman Bertazi
>> --- a/testcases/kernel/syscalls/fanotify/fanotify20.c
>> +++ b/testcases/kernel/syscalls/fanotify/fanotify20.c
>> @@ -78,6 +78,18 @@ static void tcase2_trigger_lookup(void)
>>                         ret, BAD_DIR, errno, EUCLEAN);
>>  }
>>
>> +static void tcase3_trigger(void)
>> +{
>> +       trigger_fs_abort();
>> +       tcase2_trigger_lookup();
>
> So after remount,abort filesystem operations can still be executed?
> Then I guess my comment from the previous patch about running the test in a loop
> is not relevant?

Hi Amir,

As you mentioned here, -i works fine.  Abort will remount with
MS_RDONLY, and this doesn't affect the existing tests.  Future tests
that write to the file system inside .trigger_error() would require the
umount-mount cycle but, since the goal is testing fanotify and not
specific fs errors, I think we don't need the added complexity of such
tests.

Output of '-i #' always pass:

  root@...t-box:~/ltp/testcases/kernel/syscalls/fanotify# ./fanotify20 -i 5
  tst_device.c:88: TINFO: Found free device 0 '/dev/loop0'
  tst_test.c:932: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
  mke2fs 1.46.4 (18-Aug-2021)
  tst_test.c:1363: TINFO: Timeout per run is 0h 05m 00s
  fanotify.h:252: TINFO: fid(test_mnt) = 469af9fc.8ced5767.2.0.0...
  fanotify.h:252: TINFO: fid(test_mnt/internal_dir/bad_dir) = 469af9fc.8ced5767.8002.acd05469.0...
  debugfs 1.46.4 (18-Aug-2021)
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2
  fanotify20.c:234: TPASS: Successfully received: Trigger abort
  fanotify20.c:234: TPASS: Successfully received: Lookup of inode with invalid mode
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission
  fanotify20.c:234: TPASS: Successfully received: Multiple error submission 2

  Summary:
  passed   20
  failed   0
  broken   0
  skipped  0
  warnings 0

Thanks,

-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists