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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 24 Oct 2022 09:44:16 -0700
From:   "Zach O'Keefe" <zokeefe@...gle.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Gautam Menghani <gautammenghani201@...il.com>,
        akpm@...ux-foundation.org, mhiramat@...nel.org,
        shy828301@...il.com, vbabka@...e.cz, david@...hat.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/khugepaged: add tracepoint to collapse_file()

Thanks for your mail, Gautam.

> I try to keep dereferences out of the calling path as much as possible
> (adds to I$ at the call site).

This was probably due to the way I handled
trace_mm_khugepaged_scan_file(). Perhaps that can be cleaned up at the
same time as this patch, for consistency.

Also, no qualms about adding this tracepoint; there are a few scan
result codes that overlap between hpage_collapse_scan_file() and those
possibly returned in collapse_file() such that, if we only have the
one tracepoint in hpage_collapse_scan_file(), it could be ambiguous
what callsite the error path stemmed from. Luckily this hasn't been an
issue thus far.

Lastly, a few other items we might care about capturing:

- is_shmem (perhaps the filename is enough to know this - but I know
at least once during development I was caught off-guard b/c a mount I
thought to be file-backed turned out to be tmpfs (and something I
didn't think to question until I had wasted some time on other
paths)).
- index

Best,
Zach


> Could you just pass in file, and then have:
>
>         __string(filename, file->f_path.dentry->d_iname)
>
>         [..]
>
>         __assign_string(filename, file->f_path.dentry->d_iname);
>
>
> If you are paranoid, you can have the above also be:
>
>                         file ? file->f_path.dentry ? file->f_path.dentry->d_iname : "(null)" : "(null)")
>
>
> -- Steve
>
>
> > +                                   nr, result);
> >       return result;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ