Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2048913rdb; Mon, 9 Oct 2023 10:44:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGEbDDFO0AYZlViFnwScuOon55zPkCoGikUVaZf2tIquD/YmwtvTpWOp3biCioS19NYIJve X-Received: by 2002:a17:902:b7cb:b0:1c7:31b6:241b with SMTP id v11-20020a170902b7cb00b001c731b6241bmr13735400plz.7.1696873458329; Mon, 09 Oct 2023 10:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696873458; cv=none; d=google.com; s=arc-20160816; b=RQHj3ytsMvQgk1U1U+Unk4nhWS6a1X4F3Mv//KupQvU+ImOuC1yeTIDnR/vWFF2ebT yQp+jj1VWpfyZqFU7EfYP/x+ycCm6iXJL9H+KkixYsVVSOBIwhuXaUZdq7A2yNh73cGK YvxibLlJGdasjkTFkqlFBukoMVjMVLCGdb5SlprL+tLc/fP9POpOQIsiWauYtQAlLgNc w4axa4BcUiE2VSjNXfve/FKA0uktM6I84R5WlsAvq33Gb0kHZZI+c+iLrMtVVpfwyagO U4gfacoHptlCS489GwB1lRpTNgHU+aloR7e3tVupPSfh6E3gEN8o/oPQsMt4bTaPmBUM m8SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=9ymQW1hU5KSRzFFrnXvWvbt7y6O9V4+IynB4heEg3lo=; fh=bdZmrdzm2qam7AXV4D2FGREwRU4Afqq57mJmXQqFyfk=; b=QmVgX5N2euyEsZTaFAHS23gFh/tNSQUPVPiJHQ7dn//Yt5xHl2hX6jLWpS20aESwxc OWW+XpUYqkF1n985DeHTScbARBGbJdhNfEWhXtDfzKAEELJ/k7Wa663cZ3wSFU9d9OJ/ e8V7qryV6aumZVDlULo3zJrVKY2q0Ylrm3P8eeeqy/DBL2ZRjzCyin1ezoYVTxU6XHo4 yDAeoiQDkMKoH1peILH0qhUUJuJ64S8WaREkX3alkExt8P3axTjvsRCXvFsyGvMsHbwj ujaiioRsg+jFSHy2GQ3fEpaommY62iMr60FCg5YlSGV+USRLJut49Mc08ke0Sh6PQIoq OOyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=e9VunNJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c16-20020a170902d49000b001c724f997ffsi10659434plg.131.2023.10.09.10.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:44:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=e9VunNJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 916CF80443A8; Mon, 9 Oct 2023 10:44:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377488AbjJIRnu (ORCPT + 99 others); Mon, 9 Oct 2023 13:43:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377485AbjJIRns (ORCPT ); Mon, 9 Oct 2023 13:43:48 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DF2B9E for ; Mon, 9 Oct 2023 10:43:46 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d9a3e0f8872so587583276.0 for ; Mon, 09 Oct 2023 10:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696873425; x=1697478225; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=9ymQW1hU5KSRzFFrnXvWvbt7y6O9V4+IynB4heEg3lo=; b=e9VunNJlgalq31091voI+9oLPQ6aeyVlsfYRpvltQmNxqyA6WMoua2LcAxcuqnes9t lQjt5DKhdX2RIwQgliibtLT3yhwEMS5DJxaHbm8K+b8/MElEF+5jccSrdysOZ7WOgl65 K43rOPhzTfC1xK1oTKz8tKZi9Wfo2ouIxUlzNURx6fsGb57LYX/N0St7xJYwBJFLCV6V VaE5CNdW9nHRpvN8v0NhKvc9Cq7oTE/869jVFwpwHYt0Loh/VT+4pNAxzz4BMkm/HYS9 CpCqPs8LiR9XxCDqaUkkeTIhdnl9g6nabnQ6JCUy4/x0GCyhjoFfCNJPu/+DkEcYr8Ba thhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696873425; x=1697478225; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9ymQW1hU5KSRzFFrnXvWvbt7y6O9V4+IynB4heEg3lo=; b=hY6nLmY/e710WGNZDViq796kUoZw04oGHTwPTQEcJ1hApHPbXoA3+a366HsaWMJKJz D8sAl29wkL1EGbWoZGwGr13I7erZi2HW8wQAGRxLN2Qui82gC459Wcymr7GdRa4TdSpU 34+qb3flFCRboGJu5ANl7LZDtTgH+jsAQ0r2LnHwy7qdUK2F06yoTZx/ytBt231SQJ5Z vuRZ1N4lP46N7+zuoAPdKWmeEO57rSnS995Of/5XamvLt6qPv2m8vuUoIXL5tiMaFUSL WnNMVA4dK5ESLDspzUY9bBxv5zSMfllAw50hj41Cz0aBqtQl1hwRduWbi03y2IkgWMMY aWJQ== X-Gm-Message-State: AOJu0YzHaW+zxbpXZpGlK/y/eWauaAPHrHQp9Yj2kFx57jakJO5lJ/Xa 7FLVc9fbmH18uyBQVtkerFDFLNRKNrs= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:4197:0:b0:d78:f45:d7bd with SMTP id o145-20020a254197000000b00d780f45d7bdmr254742yba.4.1696873425494; Mon, 09 Oct 2023 10:43:45 -0700 (PDT) Date: Mon, 9 Oct 2023 10:43:43 -0700 In-Reply-To: <20231006205415.3501535-1-kuba@kernel.org> Mime-Version: 1.0 References: <20231006205415.3501535-1-kuba@kernel.org> Message-ID: Subject: Re: [PATCH] KVM: deprecate KVM_WERROR in favor of general WERROR From: Sean Christopherson To: Jakub Kicinski Cc: pbonzini@redhat.com, workflows@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 09 Oct 2023 10:44:15 -0700 (PDT) On Fri, Oct 06, 2023, Jakub Kicinski wrote: > Setting WERROR for random subsystems make life really hard > for subsystems which want to build-test their stuff with W=1. > WERROR for the entire kernel now exists and can be used > instead. W=1 people probably know how to deal with the global > W=1 already, tracking all per-subsystem WERRORs is too much... I assume s/W=1/WERROR=y in this line? > Link: https://lore.kernel.org/all/0da9874b6e9fcbaaa5edeb345d7e2a7c859fc818.1696271334.git.thomas.lendacky@amd.com/ > Signed-off-by: Jakub Kicinski > --- > Documentation/process/maintainer-kvm-x86.rst | 2 +- > arch/x86/kvm/Kconfig | 14 -------------- > arch/x86/kvm/Makefile | 1 - > 3 files changed, 1 insertion(+), 16 deletions(-) > > diff --git a/Documentation/process/maintainer-kvm-x86.rst b/Documentation/process/maintainer-kvm-x86.rst > index 9183bd449762..cd70c0351108 100644 > --- a/Documentation/process/maintainer-kvm-x86.rst > +++ b/Documentation/process/maintainer-kvm-x86.rst > @@ -243,7 +243,7 @@ context and disambiguate the reference. > Testing > ------- > At a bare minimum, *all* patches in a series must build cleanly for KVM_INTEL=m > -KVM_AMD=m, and KVM_WERROR=y. Building every possible combination of Kconfigs > +KVM_AMD=m, and WERROR=y. Building every possible combination of Kconfigs > isn't feasible, but the more the merrier. KVM_SMM, KVM_XEN, PROVE_LOCKING, and > X86_64 are particularly interesting knobs to turn. > > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig > index ed90f148140d..12929324ac3e 100644 > --- a/arch/x86/kvm/Kconfig > +++ b/arch/x86/kvm/Kconfig > @@ -63,20 +63,6 @@ config KVM > > If unsure, say N. > > -config KVM_WERROR > - bool "Compile KVM with -Werror" > - # KASAN may cause the build to fail due to larger frames > - default y if X86_64 && !KASAN Hrm, I am loath to give up KVM's targeted -Werror as it allows for more aggresive enabling, e.g. enabling CONFIG_WERROR for i386 builds with other defaults doesn't work because of CONFIG_FRAME_WARN=1024. That in turns means making WERROR=y a requirement in maintainer-kvm-x86.rst is likely unreasonable. And arguably KVM_WERROR is doing its job by flagging the linked W=1 error. The problem there lies more in my build testing, which I'll go fix by adding a W=1 configuration or three. As the changelog notes, I highly doubt W=1 builds work with WERROR, whereas keeping KVM x86 warning-free even with W=1 is feasible. > - # We use the dependency on !COMPILE_TEST to not be enabled > - # blindly in allmodconfig or allyesconfig configurations > - depends on KVM > - depends on (X86_64 && !KASAN) || !COMPILE_TEST On a related topic, this is comically stale as WERROR is on by default for both allmodconfig and allyesconfig, which work because they trigger 64-bit builds. And KASAN on x86 is 64-bit only. Rather than yank out KVM_WERROR entirely, what if we make default=n and trim the depends down to "KVM && EXPERT && !KASAN"? E.g. diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 8452ed0228cb..c2466304aa6a 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -65,13 +65,12 @@ config KVM config KVM_WERROR bool "Compile KVM with -Werror" - # KASAN may cause the build to fail due to larger frames - default y if X86_64 && !KASAN - # We use the dependency on !COMPILE_TEST to not be enabled - # blindly in allmodconfig or allyesconfig configurations - depends on KVM - depends on (X86_64 && !KASAN) || !COMPILE_TEST - depends on EXPERT + # Disallow KVM's -Werror if KASAN=y, e.g. to guard against randomized + # configs from selecting KVM_WERROR=y. KASAN builds generates warnings + # for the default FRAME_WARN, i.e. KVM_WERROR=y with KASAN=y requires + # special tuning. Building KVM with -Werror and KASAN is still doable + * via enabling the kernel-wide WERROR=y. + depends on KVM && EXPERT && !KASAN help Add -Werror to the build flags for KVM.