From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71FA7C433F5 for ; Wed, 1 Dec 2021 18:32:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B03276B00A3; Wed, 1 Dec 2021 13:16:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AB27A6B00A4; Wed, 1 Dec 2021 13:16:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 97E776B00A5; Wed, 1 Dec 2021 13:16:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id 87CAC6B00A3 for ; Wed, 1 Dec 2021 13:16:49 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 4CD1981218 for ; Wed, 1 Dec 2021 18:16:39 +0000 (UTC) X-FDA: 78870030918.03.D8EC5D6 Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) by imf29.hostedemail.com (Postfix) with ESMTP id 9E5659000258 for ; Wed, 1 Dec 2021 18:16:38 +0000 (UTC) Received: by mail-oo1-f43.google.com with SMTP id x1-20020a4aea01000000b002c296d82604so8074886ood.9 for ; Wed, 01 Dec 2021 10:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wGrsaWNUagkaLBjhVNdr8PrYlBPFyk15DPESvwSI7wQ=; b=Cg02J9Geyt/0G6GQQniw1BsOs9gOfoTQSZW1pIGvEqFbN2T6wIsOrcxh9jdgAH3JQB WQs0TIrwaV0ZkZ153T+Of2tQWCWBHKbeDM0QI6xUWruL13LVQP6EHYu1FOlIEIq16w24 d8KQYtjL3fG1Xi2cGVJd7QkPUGDg3G2qwUvm2KOlHBwzUKrH3/MEYRs1Z0WK2NbP/HmD efPf3paUmLIuSrP5DtZe+nZQnoRFW2Gveow525/meJlfsW6IMNPH3lmf9FzhoxsSju/z GR5yXMvKakkJ0CZ9cWEslrU3+D9x1N7ZGbwaJW8oy8grROIWSRXdGIm08psNZyXhh6FL wHTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wGrsaWNUagkaLBjhVNdr8PrYlBPFyk15DPESvwSI7wQ=; b=eiOxeN4r1hfhQrpxhjP7vUqwaN1Q1PeJ11rB4nnj7UumS5nuMOBaR7vm7exB15l1LP BS4tt2rzqWv5NT+rNGO/ZaXOFjax77NmfyZj7lxwQ3XOoJVn6II8KViFl44A0XK+iPTh nTelUXytYIFmDOH7q1WVWrSSPAlaH3Y7I0QyEbjaSk02z6DHfwvEwiV2ps07oOuXcrUq EFjds6YWoZUdzm5pk4wJkjVyvG8YddhurGD5Nszv3l7E7Sz1bIZfC7Povzpxvgf/GIzo ZqSBgdLLWLSimnHqLTqQuJMBVrErFJZdtvIyMEJyFfCdfehtfJCf4y2ARNgG6xyDBBzO /69w== X-Gm-Message-State: AOAM531wLgSMuOuTUE4vGqVLPT2Jp3WAGh9yWbgE3NDtwKkwFnZTmTSa qE7Pgx7GCKeT/j3yAK6Psu47fbU8Zj8HG2KDwlGbqQ== X-Google-Smtp-Source: ABdhPJza6pEs9eUV/J8DdSMu19nlAcyEidPBV3ZMA7X/V6SJg0BAsTfx5q0q7Ukk3RC6j651Z4jnhvPbAYFXX2+rIFw= X-Received: by 2002:a4a:cf12:: with SMTP id l18mr5335169oos.25.1638382597543; Wed, 01 Dec 2021 10:16:37 -0800 (PST) MIME-Version: 1.0 References: <20211201152604.3984495-1-elver@google.com> In-Reply-To: From: Marco Elver Date: Wed, 1 Dec 2021 19:16:25 +0100 Message-ID: Subject: Re: [PATCH] kcov: fix generic Kconfig dependencies if ARCH_WANTS_NO_INSTR To: Mark Rutland Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, Peter Zijlstra , Nick Desaulniers , Nathan Chancellor , Dmitry Vyukov , Andrey Konovalov , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: 13go79jjictusmcj8t99gsz6btgaykdo X-Rspamd-Queue-Id: 9E5659000258 X-Rspamd-Server: rspam07 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Cg02J9Ge; spf=pass (imf29.hostedemail.com: domain of elver@google.com designates 209.85.161.43 as permitted sender) smtp.mailfrom=elver@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1638382598-911270 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 1 Dec 2021 at 18:46, Mark Rutland wrote: [...] > > > Currently we mostly get away with disabling KCOV for while compilation units, > > > so maybe it's worth waiting for the GCC 12.0 release, and restricting things > > > once that's out? > > > > An alternative would be to express 'select ARCH_WANTS_NO_INSTR' more > > precisely, say with an override or something. Because as-is, > > ARCH_WANTS_NO_INSTR then doesn't quite reflect reality on arm64 > > (yet?). > > It's more of a pragmatic thing -- ARCH_WANTS_NO_INSTR does reflect reality, and > we do *want* to enforce that strictly, it's just that we're just struck between > a rock and a hard place where until GCC 12 is released we either: > > a) Strictly enforce noinstr, and be sure there aren't any bugs from unexpected > instrumentation, but we can't test GCC-built kernels under Syzkaller due to > the lack of KCOV. > > b) Don't strictly enforce noinstr, and have the same latent bugs as today (of > unknown severity), but we can test GCC-built kernels under Syzkaller. > > ... and since this (currently only affects KCOV, which people only practically > enable for Syzkaller, I think it's ok to wait until GCC 12 is out, so that we > can have the benefit of Sykaller in the mean time, and subsequrntly got for > option (a) and say those people need to use GCC 12+ (and clang 13+). > > > But it does look simpler to wait, so I'm fine with that. I leave it to you. > > FWIW, for my purposes I'm happy to take this immediately and to have to apply a > local patch to my fuzzing branches until GCC 12 is out, but I assume we'd want > the upstream testing to work in the mean time without requiring additional > patches. Agree, it's not an ideal situation. :-/ syzkaller would still work, just not as efficiently. Not sure what's worse, less efficient fuzzing, or chance of random crashes. In fact, on syzbot we already had to disable it: https://github.com/google/syzkaller/blob/61f862782082c777ba335aa4b4b08d4f74d7d86e/dashboard/config/linux/bits/base.yml#L110 https://lore.kernel.org/linux-arm-kernel/20210119130010.GA2338@C02TD0UTHF1T.local/T/#m78fdfcc41ae831f91c93ad5dabe63f7ccfb482f0 So if we ran into issues with KCOV on syzbot for arm64, I'm sure it's not just us. I can't quite see what the reasons for the crashes are, but ruling out noinstr vs. KCOV would be a first step. So I'm inclined to suggest we take this patch now and not wait for GCC 12, given we're already crashing with KCOV and therefore have KCOV disabled on arm64 syzbot. I'm still fine waiting, but just wanted to point out you can fuzz without KCOV. Preferences? Thanks, -- Marco