Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp613137yba; Thu, 9 May 2019 03:17:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwD+1M8gJc9wJR+KtH8zvs/Jd1VcUqKCqtMSUFSRmmGxtIILYl/tzJm9wN3wgzlqj2Z/rAH X-Received: by 2002:a17:902:5e1:: with SMTP id f88mr3780476plf.226.1557397072485; Thu, 09 May 2019 03:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557397072; cv=none; d=google.com; s=arc-20160816; b=A89mLq9f/KI0SVId0EFsjAzPzM8iZAya1v/2BRSlibwUDBP0Pc7QQABLJTmsINeC1q KTGFXN4HYUGXt+1MfqhVvpFT2+7ZBmkQvK96tR1N2moTtSnuC7Bbx0l16gIhI22AGjhV BoqHLoINQogjgU8PcZNx3b9CZjn7sU/lF9zTP/BW7hnDaOlSFB/xs/FxR13kYaXpnztl rDFHmilzItr4NoMKDhQ535a/35eIOgcYD6devQvubSK06lx9tvtoumRKflquKwwCyxbO K9SV9sDukXplYDbFe6yMp0Gv8V99CV718GDmbmOpuFUZ49F+nkQgqv1pqoYdK+kK+AoC pi4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BIlULqxElJ1UVkE3nskm96wPdXbmsrmyS+2BEAOEbgA=; b=dZ7sMPAYJQip0hGH+moSw3VyZYZPmqxhgdUWVja4gl9COiYY0GGpDesIkwtHFQBxh6 VH6IcPH3r4JcEVqowMjD0jk+7X8KhY7K6pveOz88EZbRuqPJAIod+v1poGwut0LqReTS mYE1OW3LIv+PZ71Yf+RkgzhQ5Uok0Io76Tpq04SxR7hh4wwwRosswRkpzxc2cBnc0ijJ +Cc7O9kMOythlhTzrsFpePOABqt6S9cNDEL9IMjg4AIulKgrCcC7+KYdBh8bqyqY7RsU 40o7dR23Exto6QIX72SO4x643bIJpRPY3VJ5jBIOPIWjVbSidRJ7V8inl2zKCL2J9tkf klVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=TKNaXcgt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j15si2189046pll.40.2019.05.09.03.17.36; Thu, 09 May 2019 03:17:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=TKNaXcgt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726281AbfEIKQt (ORCPT + 99 others); Thu, 9 May 2019 06:16:49 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:52709 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfEIKQs (ORCPT ); Thu, 9 May 2019 06:16:48 -0400 Received: by mail-it1-f194.google.com with SMTP id q65so2639663itg.2 for ; Thu, 09 May 2019 03:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BIlULqxElJ1UVkE3nskm96wPdXbmsrmyS+2BEAOEbgA=; b=TKNaXcgtz8qYEpIJukTzgb1p/hYDziVtcRMnhldabv9IEZDEmmTt6GQ0b32MdOp/Fw ezNjxHfzLcgAjU8NOmJ1J4l22ulRC/LF75pwJkpb8H9286c1K3NokoOjR5I3cDesGGOO 7j8dariqP5gQI1oJ8E544TNYLpNorg0/ZRmHo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BIlULqxElJ1UVkE3nskm96wPdXbmsrmyS+2BEAOEbgA=; b=ZyISqmPhP2vOHF6towNH7DfhgJmfq0hxdQVWPehhMLqGb3bIZQ+uvnWyPfQ1+G5p5K 0FBu2/SLaodJ/7yZqJRsI656bCnCO8lpaOXF5jnXU70TtGLqhPq8Bj1h2LpRuBRxK6GP U8CU+YEoGRpPhZFHVteBC2V03sQ8lYN5aFMcz49hjvI79msKv+1zvpj7aXtHSGD3Zbxv J+DctOw4e2SNP/1F+swCFJgrjeEuHrVSmdNFo3Gn/fKm+M5C8/Dcn2RcF4WLOCuj1RNc mxclvVC7UKspdwwAIYe1zoIsjOs9/8jFS1VObgXo9zjqzRAib65SduFAZwW91kb7RnYe BnhA== X-Gm-Message-State: APjAAAXl/kVQ7GtWgnEmy12DZOG4SXbwv/mczf4/fQaBfX3tdApoSjz9 wkz43kfzjnZuaTE0a599iFzccjjMBazguwNrvvuaUg== X-Received: by 2002:a05:660c:6c8:: with SMTP id z8mr1111816itk.51.1557397007880; Thu, 09 May 2019 03:16:47 -0700 (PDT) MIME-Version: 1.0 References: <20190502194208.3535-1-daniel.vetter@ffwll.ch> <20190502194208.3535-2-daniel.vetter@ffwll.ch> <20190509092449.GA10828@jagdpanzerIV> In-Reply-To: <20190509092449.GA10828@jagdpanzerIV> From: Daniel Vetter Date: Thu, 9 May 2019 12:16:36 +0200 Message-ID: Subject: Re: [PATCH 2/2] RFC: soft/hardlookup: taint kernel To: Sergey Senozhatsky Cc: Intel Graphics Development , LKML , Daniel Vetter , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Valdis Kletnieks , Laurence Oberman , Vincent Whitchurch , Don Zickus , Andrew Morton , Sinan Kaya Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 9, 2019 at 11:24 AM Sergey Senozhatsky wrote: > > On (05/02/19 21:42), Daniel Vetter wrote: > [..] > > @@ -469,6 +469,8 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) > > add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK); > > if (softlockup_panic) > > panic("softlockup: hung tasks"); > > + else > > + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); > > __this_cpu_write(soft_watchdog_warn, true); > > Soft lockup sets TAINT_SOFTLOCKUP bit. Would it be enough for your CI? I'm blind :-/ Yes this is totally useful. > [..] > > @@ -154,6 +154,8 @@ static void watchdog_overflow_callback(struct perf_event *event, > > > > if (hardlockup_panic) > > nmi_panic(regs, "Hard LOCKUP"); > > + else > > + add_taint(TAINT_WARN, LOCKDEP_STILL_OK); > > Maybe you can mirror what soft lockup does. Add a HARDLOCKUP taint bit We'd also want a taint for hung tasks (separate patch, same idea), not sure it's a good idea to use a new taint bit for all of them? Atm we don't check for all taint bits (some of them are set because of things our testcases do, like module reload or setting unsafe kernel options meant for testing only, so picking one of the bits we check already was least resistance. > +++ b/include/linux/kernel.h > @@ -571,7 +571,8 @@ extern enum system_states { > #define TAINT_LIVEPATCH 15 > #define TAINT_AUX 16 > #define TAINT_RANDSTRUCT 17 > -#define TAINT_FLAGS_COUNT 18 > +#define TAINT_HARDLOCKUP 18 > +#define TAINT_FLAGS_COUNT 19 > > and then set TAINT_HARDLOCKUP in watchdog_overflow_callback(). > > Just a small idea, I'll leave this to more experienced people. The hung_tasks taint wasn't all that positively received, I feels like this will stay a hack private to our CI. Except if someone else pipes up who wants this, then I'm happy to polish. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch