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] [day] [month] [year] [list]
Message-ID: <CANpmjNMAZiW-Er=2QDgGP+_3hg1LOvPYcbfGSPMv=aR6MVTB-g@mail.gmail.com>
Date:   Thu, 12 Aug 2021 16:04:25 +0200
From:   Marco Elver <elver@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Mark Rutland <mark.rutland@....com>
Cc:     kasan-dev@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] kcov, objtool: Make runtime functions noinstr-compatible

[-Cc most]
[+Cc Mark]

On Thu, 4 Jun 2020 at 17:25, Peter Zijlstra <peterz@...radead.org> wrote:
[...]
> I would feel very much better with those actually in noinstr, because
> without it, there is nothing stopping us from adding a kprobe/hw-
> breakpoint or other funny to the function.
>
> Even if they almost instra-return, having a kprobe on the function entry
> or condition check is enough to utterly wreck things.
>
> So something like:
>
> void noinstr __sanitizer_cov_trace_*(...)
> {
>         if (within_noinstr_section(ip))
>                 return;
>
>         instrumentation_begin();
>         write_comp_data(...);
>         instrumentation_end();
> }

Apologies for resurrecting this. :-)

It seems I'll need to use this approach soon for upcoming KCSAN
instrumentation for memory barriers. I'm able to use the same objtool
feature that erases __sanitizer_cov* calls on x86 to erase memory
barrier instrumentation, but arm64 will still be a problem because of
lack of objtool support.

Mark, on arm64, is the approach above that Peter proposed ~1y ago
acceptable in general to make instrumentation noinstr-safe?

Thanks,
-- Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ