Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp613514ybz; Fri, 1 May 2020 05:29:50 -0700 (PDT) X-Google-Smtp-Source: APiQypJf7+jktEn6n/nAqMnRIewSirLIf7gueqtlV7dRB6qDeQ1NB3wk2sFHoxWMLIhc2CM60DAI X-Received: by 2002:a17:906:1490:: with SMTP id x16mr2725339ejc.323.1588336190600; Fri, 01 May 2020 05:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588336190; cv=none; d=google.com; s=arc-20160816; b=r6Htorr6uo+GIBqogdjxApJGgSoEi4FzzwDZ9D0+oZ28c8bPm0dyDm3utZCD0RDT/Y H+HWoNPKtYk7wUWp9XibQzq5huXImKghLGAwHZJ4oepVqEUi6ahw3WxYYCmM30QU4XKJ xL9jO/LeKKmeSaZvxLM/YxMhsNww5k9LPIzXUEcplY33+txOu4JZbm3603XQCo/FGvEi 6NF+886Mo5LujRcnNNQ90OLA2OV6K9nbyrpTP5IY2N8gcx0keUtKywAtOyUklmtihtg9 VXFDXq73E6/mUzkiKoNtk2gAAKCKrFmzIHmCIqVupNM4R+2OrZbXDMhmUTBnVlAINXXw JMVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=AWqcC7IFHGnNKByDv3wbL/TMKc9BXtCe7aekFvCtgxY=; b=d6k1N9trTHv4kXTm28xvc85cVLw5SiKtbw0QV7NKPBvsjgbMsXwEhI5SCQGlIYZGkA C9y7o8QfN1TVDGQbEk0g7F0TK0+4AW0pj/qdDKMJQ1gghl/zEyuPtSu3ZhZam2DAZq17 6cwb7HrvptedXdv0ZajN+61SJKtrV/0KTrkDW0BFPMCWQgtEUgAOPH7jn8mgkLI/1Xbl OqFsOlYZQkXgL1xnKmvBH19hST6rlbGz5BaC4UnJmDE4QRk4OPTDTUhT7O0BWd/GJR6L 8Oqy3q7LBgej85esIY3jzu55RXzGRr7pwJTarQvl1dYLUSBP7VYCpREnry/ui52Z85pk 0Bxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZSUr3yos; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si1543275ejr.422.2020.05.01.05.29.27; Fri, 01 May 2020 05:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZSUr3yos; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728746AbgEAM1r (ORCPT + 99 others); Fri, 1 May 2020 08:27:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726131AbgEAM1r (ORCPT ); Fri, 1 May 2020 08:27:47 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26930C061A0C for ; Fri, 1 May 2020 05:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AWqcC7IFHGnNKByDv3wbL/TMKc9BXtCe7aekFvCtgxY=; b=ZSUr3yosVEIRLrEcsFyWV5oaCg C81OHNmMSZ+wlasKT1KJJ7YehPQOf6r4zPI7JBZOF0XFN7NcbkqR+4JomLCgsBZhL4HTXongDMQxc UlQooqewqik84iP7fdPNecxtdhhXy+pIHeCGaGrYorCoCWmQsprvV/IT3yMcrDR8PqClcMeWO++hj BoFhMuumJIuH1XYFqBSJhDG+eVlsqIXChLg4yKQvdbTRSSFzeSnsaaYiyJdcoifajGsv/w2wz7d8K ubSDkrpLs+MZ536mVXdApeSQsSlehhPE1ovAYMc/R8/Vhks0moZ1GCM0yeHs+w585cULeLkZqp1ph NKIZUC0A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUUlc-0003vv-Tg; Fri, 01 May 2020 12:27:45 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 6A10B3011E8; Fri, 1 May 2020 14:27:43 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 511A729A22695; Fri, 1 May 2020 14:27:43 +0200 (CEST) Date: Fri, 1 May 2020 14:27:43 +0200 From: Peter Zijlstra To: Josh Poimboeuf Cc: Arnd Bergmann , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: Remaining randconfig objtool warnings, linux-next-20200428 Message-ID: <20200501122743.GB3762@hirez.programming.kicks-ass.net> References: <20200501002858.4wuiqqv5o32jcvxf@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200501002858.4wuiqqv5o32jcvxf@treble> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 30, 2020 at 07:28:58PM -0500, Josh Poimboeuf wrote: > On Thu, Apr 30, 2020 at 04:05:07PM +0200, Arnd Bergmann wrote: > > lib/locking-selftest.o: warning: objtool: locking_selftest()+0x117f: PUSHF stack exhausted > > lib/locking-selftest.o: warning: objtool: ww_tests()+0x1083: PUSHF stack exhausted > > Peter, > > These functions have a bunch of irqs_disabled() checks, which means a > bunch of PUSHFs with no POPFs. > > Am I reading it correctly that objtool assumes PUSHF is always paired > with POPF? irqs_disabled() doesn't do that. Right, it sorta does. I wonder why this shows up with GCC-10 though, and not before. Anyway, the sneaky fix here would be something like this. diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index 14f44f59e733..510656c776d9 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -1138,7 +1138,7 @@ static void dotest(void (*testcase_fn)(void), int expected, int lockclass_mask) { unsigned long saved_preempt_count = preempt_count(); - WARN_ON(irqs_disabled()); + lockdep_assert_irqs_enabled(); testcase_fn(); /*