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  linux-cve-announce  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:   Wed, 26 May 2021 19:37:17 -0400
From:   Gabriel Krisman Bertazi <krisman@...labora.com>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     kernel@...labora.com, "Darrick J . Wong" <djwong@...nel.org>,
        "Theodore Ts'o" <tytso@....edu>,
        Dave Chinner <david@...morbit.com>, Jan Kara <jack@...e.com>,
        David Howells <dhowells@...hat.com>,
        Khazhismel Kumykov <khazhy@...gle.com>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        Ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 10/11] samples: Add fs error monitoring example

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

>> +                       printf("unexpected FAN MARK: %llx\n", metadata->mask);
>> +                       continue;
>> +               } else if (metadata->fd != FAN_NOFD) {
>> +                       printf("Unexpected fd (!= FAN_NOFD)\n");
>> +                       continue;
>> +               }
>> +
>> +               printf("FAN_ERROR found len=%d\n", metadata->event_len);
>> +
>> +               error = (struct fanotify_event_info_error *) (metadata+1);
>> +               if (error->hdr.info_type == FAN_EVENT_INFO_TYPE_ERROR) {
>
> You meant != FAN_EVENT_INFO_TYPE_ERROR ?

Ugh. the FAN_EVENT_INFO_TYPE_ERROR definition on this file was not updated,
preventing me from catching this. nice catch.
>
>> +                       printf("unknown record: %d\n", error->hdr.info_type);
>> +                       continue;
>> +               }
>> +
>> +               printf("  Generic Error Record: len=%d\n", error->hdr.len);
>> +               printf("      fsid: %llx\n", error->fsid);
>> +               printf("      error: %d\n", error->error);
>> +               printf("      inode: %lu\n", error->inode);
>> +               printf("      error_count: %d\n", error->error_count);
>> +       }
>> +}
>> +
>> +int main(int argc, char **argv)
>> +{
>> +       int fd;
>> +       char buffer[BUFSIZ];
>
> BUFSIZ not defined?

that's from stdio.h.


-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ