Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3567230ybd; Tue, 25 Jun 2019 04:59:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCHDzOXxe6eu6sRwzZF/XEneDB5vCz1/ZdGLrSYklfbpwRSBrwT2SeZW8kwBzt8sDMlfSi X-Received: by 2002:a17:90a:2706:: with SMTP id o6mr32213180pje.62.1561463956379; Tue, 25 Jun 2019 04:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561463956; cv=none; d=google.com; s=arc-20160816; b=j9bnSFRYb2XF/6IysYObeRwNEx1zIrg5ncwetVcYLTeO+9BUtGkJEx1I4YTH5OjOCx PofNU/iWdjvSx3+wn+c8wpfYvasDKn2DISFotxh6aTlLaYqBfbQpFaiK6gozJA63jnu3 M0/bc0XirbFg0PKxDwQMuRvBM1O1tnaibEhMUFFpvEJLL+AR4sn9/v0ifcmK5hC3Al8k WHGRzREA+VO72Pz0yQVSR3/ij0xrIeKTpTW9tkX53ZtozpovpmXZi9IV3Fs33s9FT5PM /ZoC3HeECMm+ntpVvCqCh9wZLbt1hcJduQUCYRewIINzIZaexdeIxCuIlTZryy3L58XS ODoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7SEBtMUGP7DfZvAp3+nW4EO8/zgg+fi42ZkMBy1NepQ=; b=gYEO4QtDU3gDbAeuWIJmuU7QjoLw244eV7IvNfPLErMgoeab67DkHJzWECxRgQ6B4O /TZOoqVYYFb2b+tghMbHAZ4dZRetQb7RKtUR+3vZk7Q1nN233NbhHylBAPTUTNPzWguI 0WCuXTN6WAOjiOJjtVB07QyIIXRpqxoYeaatqp42z8CXxNM9PM267TMaHxTg8kCkfCG/ n7mLEb1TqcPIh1Iq6/yDEZw2CpuBRXqq2POdfbtC0YJsm264SuDt+XoA64Klae0cqoQQ zL4+WyB58JYAT2juOViplDe3TMHWoYWMee9ghlgKXtvHImcZNz+sNIjx6pimjtdGJu/d wBrQ== ARC-Authentication-Results: i=1; mx.google.com; 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 x22si14771098pfo.255.2019.06.25.04.59.00; Tue, 25 Jun 2019 04:59:16 -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; 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 S1731516AbfFYJ1o (ORCPT + 99 others); Tue, 25 Jun 2019 05:27:44 -0400 Received: from foss.arm.com ([217.140.110.172]:36670 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbfFYJ1o (ORCPT ); Tue, 25 Jun 2019 05:27:44 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1FBC2360; Tue, 25 Jun 2019 02:27:44 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E2973F71E; Tue, 25 Jun 2019 02:27:43 -0700 (PDT) Date: Tue, 25 Jun 2019 10:27:40 +0100 From: Qais Yousef To: Nicholas Piggin Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Frederic Weisbecker , Ingo Molnar Subject: Re: [PATCH v2] kernel/isolation: Assert that a housekeeping CPU comes up at boot time Message-ID: <20190625092740.homiljqkygecwete@e107158-lin.cambridge.arm.com> References: <20190625001720.19439-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190625001720.19439-1-npiggin@gmail.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/25/19 10:17, Nicholas Piggin wrote: > With the change to allow the boot CPU0 to be isolated, it is possible > to specify command line options that result in no housekeeping CPU > online at boot. > > An 8 CPU system booted with "nohz_full=0-6 maxcpus=4", for example. > > It is not easily possible at housekeeping init time to know all the > various SMP options that will result in an invalid configuration, so > this patch adds a sanity check after SMP init, to ensure that a > housekeeping CPU has been onlined. > > The panic is undesirable, but it's better than the alternative of an > obscure non deterministic failure. The panic will reliably happen > when advanced parameters are used incorrectly. > > Signed-off-by: Nicholas Piggin > --- > v2: Fix a NULL pointer dereference when not overriding housekeeping, > noticed by kernel test robot and Qais, who fixed it and verified > the fix (thanks!) Glad I could help. But for the record my problem wasn't a NULL pointer dereference and simply the loop didn't hit the condition to 'return 0' so I hit the panic. I tested that the fix does indeed skip the verification if no nohz_full nor isolcpus is passed. But I didn't do the reverse check, although from the code this flag is only set in housekeeping_setup() so it should continue to work as intended. Thanks! -- Qais Yousef