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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 20 Sep 2021 11:26:38 +0200
From:   Marco Elver <elver@...gle.com>
To:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:     kasan-dev@...glegroups.com, linux-kernel@...r.kernel.org,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Andrey Konovalov <andreyknvl@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Steven Rostedt <rostedt@...dmis.org>,
        Clark Williams <williams@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 0/5] kcov: PREEMPT_RT fixup + misc

On Mon, 6 Sept 2021 at 18:28, Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
> On 2021-09-06 18:13:11 [+0200], Marco Elver wrote:
> > Thanks for sorting this out. Given syzkaller is exercising all of
> > KCOV's feature, I let syzkaller run for a few hours with PROVE_LOCKING
> > (and PROVE_RAW_LOCK_NESTING) on, and looks fine:
> >
> >     Acked-by: Marco Elver <elver@...gle.com>
> >     Tested-by: Marco Elver <elver@...gle.com>
>
> awesome.
>
> > > One thing I noticed and have no idea if this is right or not:
> > > The code seems to mix long and uint64_t for the reported instruction
> > > pointer / position in the buffer. For instance
> > > __sanitizer_cov_trace_pc() refers to a 64bit pointer (in the comment)
> > > while the area pointer itself is (long *). The problematic part is that
> > > a 32bit application on a 64bit pointer will expect a four byte pointer
> > > while kernel uses an eight byte pointer.
> >
> > I think the code is consistent in using 'unsigned long' for writing
> > regular pos/IP (except write_comp_data(), which has a comment about
> > it). The mentions of 64-bit in comments might be inaccurate though.
> > But I think it's working as expected:
> >
> > - on 64-bit kernels, pos/IP can be up to 64-bit;
> > - on 32-bit kernels, pos/IP can only be up to 32-bit.
> >
> > User space necessarily has to know about the bit-ness of its kernel,
> > because the coverage information is entirely dependent on the kernel
> > image. I think the examples in documentation weren't exhaustive in
> > this regard. At least that's my take -- Dmitry or Andrey would know
> > for sure (Dmitry is currently on vacation, but hopefully can clarify
> > next week).

Just for reference, this is what syzkaller does which confirms the above:
https://github.com/google/syzkaller/blob/3d9c9a2ac29573a117cde8ace07d0749eeda991b/executor/executor_linux.h#L84

> okay.

I saw Dmitry responded with Acks/comment. Did you have a tree in mind
to take it through? Usually KCOV changes go through the -mm tree, in
which case please Cc Andrew in the rest of the series.

Thanks,
-- Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ