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]
Message-ID: <5615959.Mqr2uNrfH2@hyperiorarchmachine>
Date:   Wed, 02 Jun 2021 00:40:25 +0300
From:   jarmo.tiitto@...il.com
To:     Bill Wendling <morbo@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Jonathan Corbet <corbet@....net>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Jarmo Tiitto <jarmo.tiitto@...il.com>,
        Sami Tolvanen <samitolvanen@...gle.com>
Subject: Re: [PATCH] pgo: rename the raw profile file to vmlinux.profraw

Kees Cook wrote tiistaina 1. kesäkuuta 2021 22.13.21 EEST:
> On Tue, Jun 01, 2021 at 01:24:39AM -0700, 'Bill Wendling' via Clang Built 
Linux wrote:
> > On Mon, May 31, 2021 at 1:29 PM Nathan Chancellor <nathan@...nel.org> 
wrote:
> > > On 5/31/2021 1:20 PM, Bill Wendling wrote:
> > > > Future PGO features may create other files in /sys/kernel/debug/pgo.
> > > > So
> > > > rename the kernel's raw profile data file to "vmlinux.profraw" to make
> > > > which part of the kernel the file is for more explicit.
> > > > 
> > > > Note that future files in /sys/kernel/debug/pgo should follow a
> > > > similar
> > > > naming convention.
> > > > 
> > > > Signed-off-by: Bill Wendling <morbo@...gle.com>
> > > 
> > > Guess this clears up my confusion around the module patches :)
> > 
> > To clarify, Jarmo did those patches on his own. I just wanted to
> > clarify the naming convention. :-)
> 
> Is the expectation that there would be 1 file per module in
> /sys/kernel/debug/pgo/ after the modules patch?
> 
> > -bw
> > 
> > > Reviewed-by: Nathan Chancellor <nathan@...nel.org>
> > > 
> > > > ---
> > > > 
> > > >   Documentation/dev-tools/pgo.rst | 6 +++---
> > > >   kernel/pgo/Kconfig              | 7 ++++---
> > > >   kernel/pgo/fs.c                 | 2 +-
> > > >   3 files changed, 8 insertions(+), 7 deletions(-)
> > > > 
> > > > diff --git a/Documentation/dev-tools/pgo.rst
> > > > b/Documentation/dev-tools/pgo.rst index b7f11d8405b7..0200449c4843
> > > > 100644
> > > > --- a/Documentation/dev-tools/pgo.rst
> > > > +++ b/Documentation/dev-tools/pgo.rst
> > > > 
> > > > @@ -76,7 +76,7 @@ The PGO kernel support creates the following files in 
debugfs:
> > > >   ``/sys/kernel/debug/pgo/reset``
> > > >   
> > > >       Global reset file: resets all coverage data to zero when written
> > > >       to.
> > > > 
> > > > -``/sys/kernel/debug/profraw``
> > > > +``/sys/kernel/debug/pgo/vmlinux.profraw``
> > > > 
> > > >       The raw PGO data that must be processed with ``llvm_profdata``.
> > > > 
> > > > @@ -108,7 +108,7 @@ using the result to optimize the kernel:
> > > >      .. code-block:: sh
> > > > 
> > > > -      $ cp -a /sys/kernel/debug/pgo/profraw /tmp/vmlinux.profraw
> > > > +      $ cp -a /sys/kernel/debug/pgo/vmlinux.profraw
> > > > /tmp/vmlinux.profraw
> 
> And if so, these instructions would change (in the future) to something
> like:
> 
>      $ cp -a /sys/kernel/debug/pgo/*.profraw /tmp/prof/
> 
> ?
> 
> -Kees

Hi,

To be clear the mucked up patches I sent are more like of RFC to get in 
contact with the development.
Back to the code:

Yes, my future intention is that there will be one *.profraw file per module.
And curiously I would also have renamed the current profile data file to 
"vmlinux.profraw" to disambiguate it from what part of kernel generated it.

I already wrote an small fix up that I think should be part of the upstream 
code so that profiling the vmlinux works better.
It filters out any module originated content from vmlinux.profraw.

Above will be probably a good exercise for me.

Next, my future v2 module profiling machinery
would probably follow on top of your work.

-Jarmo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ