Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6836576rwb; Wed, 18 Jan 2023 09:58:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXujPqJRhtXlfHrWbeEFcF4pLcGsrpsLw7SM9RjmQXR0nttytBUwG1DSIuMOmVTHn4z1t0RI X-Received: by 2002:a17:907:cf48:b0:86b:914a:576 with SMTP id uv8-20020a170907cf4800b0086b914a0576mr7713334ejc.6.1674064708117; Wed, 18 Jan 2023 09:58:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674064708; cv=none; d=google.com; s=arc-20160816; b=Lwy0BA8ewyZlU0T1aWdDXCGcDTFaSznlbfxNVSh1HLhfuZwRpQ7hnxkXar7yikb3qs deeSOvUDV4Z+IMqvCUdO2tSdzHwTrWFMBwGGulGSrPsc2nz4miBeYfURYbeu1Lb7CcU7 PS3WtKhv6bjPC25A/gaDgjEBZvpWiWS7xLnIhFMTVO5QIR9O/qx0fE9TkPQIhxFVx54K pJ2VC++W5Si8huvPSfiAi/3pj1KsG+wZyZ032lDCRJcPBbOpca/zTy/b+tHfPUemo9hZ dTf8rY55x/w7G6kZ5K348/7Cjp0y7Clrlh8qB/9+nEs/70HINnrTrHvebTnqtmV8OKD1 /TFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fdqIaz/OuT3KiECAYbJfl+d3yacajyE8FY/hHAgDXU4=; b=I84i7URLitpns5RRIipJxpPic3UFPRqhma4WrWiSVKH+BSZ136pcse+r9IStmjyhfe YmJ+o0WA1LORdORjf+gazkNhwMwwLllmtoWJRhM0rEYTeLDomqTZglfa2hZMVcgLswqP uOCKwlf0EXTKkoHAIQ+zzFs4p5b5eFmgjZwgaZgcbKNVjxlhFsijNT5NBgysMxEuBR8D nsfKyCt+wBGgyL00ALy2O3MuSN2A44ftXV7yCWh65jd+/oHO6KKujijhV4vmkWNCIsoz 6+mq7wyoAaWZPGafL11XwP+z8H3TyOIYXVgFEf/KO/LWKgM1/+2INw1BiZboGO1j1dc7 PWTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bW+I6GT3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id un2-20020a170907cb8200b0084cbf555299si28572617ejc.954.2023.01.18.09.58.13; Wed, 18 Jan 2023 09:58:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=bW+I6GT3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230445AbjARRLK (ORCPT + 45 others); Wed, 18 Jan 2023 12:11:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229831AbjARRLE (ORCPT ); Wed, 18 Jan 2023 12:11:04 -0500 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 284CD4ABCE for ; Wed, 18 Jan 2023 09:11:04 -0800 (PST) Received: by mail-qt1-x82c.google.com with SMTP id x5so6725500qti.3 for ; Wed, 18 Jan 2023 09:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fdqIaz/OuT3KiECAYbJfl+d3yacajyE8FY/hHAgDXU4=; b=bW+I6GT3472rBqyqGwRHftx7r2GGIogKz2Y0oQTedgzUrfMCpXWKof68tlXZFbetUY 2WATXsTp3RN1pb5gw6psBaXonl0PhuZDMJziCI8xLhFsEUJHCwD7EFzPgWd1Kuk7vxkd FZsGsrkAAdXlgWHrdqvwR81hEpMUYuiE/bHLE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fdqIaz/OuT3KiECAYbJfl+d3yacajyE8FY/hHAgDXU4=; b=j0j3T6SbZ1asqztfQD647I3lb6qyU5yi4Etmkc4muXD4e0xWlubpryAwbWij3IWOcW 6j2zAk7INoKpj3LylcLRGud8SFdTYp5ONFXQOrjzhGm0I5BJrBoDQ72kpmO8wSVTB5dV Oq8gIpe3xqf9JcvKKVelCdlYRSx7IDJ6bOH+mEvBwiWgz1yfdr5Wl2zclQ0FMLNZnYf5 vqoUczYVONX+PrSSARY6we6moP8nUa9wa6ZDAJ/cu20g9rS3Q3mo+hLqUEHgkJOdMMxj Rgdgm11t9GzGvaxp0mzTM3RdNAM0mtM5f0UfDOp7LH7HlUen3KVQMRaDDLAn7kC+kKCS hxSg== X-Gm-Message-State: AFqh2kr7PopMr9u5+LxqnTIsmwyOhzGSQciH8ulU5NJ2i/64Y6woS6X7 WErsAtnvcqPzpOwj4HG5Dd1N2ydZvhaAX21D X-Received: by 2002:a05:622a:428a:b0:3ab:7391:28b with SMTP id cr10-20020a05622a428a00b003ab7391028bmr11197802qtb.6.1674061862854; Wed, 18 Jan 2023 09:11:02 -0800 (PST) Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com. [209.85.219.43]) by smtp.gmail.com with ESMTPSA id l6-20020ac81486000000b003a981f7315bsm17769107qtj.44.2023.01.18.09.11.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Jan 2023 09:11:01 -0800 (PST) Received: by mail-qv1-f43.google.com with SMTP id h10so24190083qvq.7 for ; Wed, 18 Jan 2023 09:11:01 -0800 (PST) X-Received: by 2002:a05:6214:5f82:b0:534:252f:b091 with SMTP id ls2-20020a0562145f8200b00534252fb091mr345510qvb.130.1674061861468; Wed, 18 Jan 2023 09:11:01 -0800 (PST) MIME-Version: 1.0 References: <202301170941.49728982-oliver.sang@intel.com> <2f483247-da76-9ec9-3e51-f690939f4585@suse.cz> In-Reply-To: From: Linus Torvalds Date: Wed, 18 Jan 2023 09:10:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linus:master] [hugetlb] 7118fc2906: kernel_BUG_at_lib/list_debug.c To: Feng Tang Cc: Vlastimil Babka , "Sang, Oliver" , Mike Kravetz , "oe-lkp@lists.linux.dev" , lkp , "linux-kernel@vger.kernel.org" , Jann Horn , "Song, Youquan" , Andrea Arcangeli , Jan Kara , John Hubbard , "Kirill A . Shutemov" , Matthew Wilcox , Michal Hocko , Muchun Song , Andrew Morton , "linux-mm@kvack.org" , Hyeonggon Yoo <42.hyeyoo@gmail.com>, "Yin, Fengwei" , hongjiu.lu@intel.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 18, 2023 at 5:33 AM Feng Tang wrote: > > > Finally, your objdump version also does some horrendous decoding, like > > > > c13b3e29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi > > I know little about these tools, and I tried objdump tool from > Cent OS 9 (objdump version 2.35.2) and Ubuntu 22.04 (objdump version > 2.38), they both dumped similar assembly. Please let me know if you > want us to try other version of objdump. It's fine - it just makes things even less legible than they already were. I personally very seldom try to look at objdump output - I tend to do things like make mm/page_alloc.s and look at the compiler-generated assembly instead. That ends up generally being a lot more legible for various reasons, not the least of which is the variable name commentary that the compiler also outputs. So objdump is kind of a last resort, and then you just have to deal with the fact that its output format is very nasty. > We modify the kconfig to disable GCOV and UBSAN, and the issue can't > be reproudced in 1000 runs. Ok, it does seem like this is a compiler bug, as per Vlastimil's decoding. And the reason it happens on 32-bit is probably that we just have much fewer registers available there, and the 64-bit GCOV counts then complicate things even more, and then some interaction between that and UBSAN just generates crazy code. And it probably has very little compiler test coverage in real life anyway. From Vlastimil's decode, it does look like gcc has mixed up the "update GCOV counts" with actual real values for "nr_pages", and is using %eax for both things because of some register allocation mistake. So I think we can dismiss this one as a compiler bug. It might be good to see if it happens with a newer version of gcc too, and even perhaps post a gcc bugzilla entry, but since this probably isn't really a very interesting config for real life, I'm not sure how interested people are going to be. Linus