Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2141343rdb; Mon, 9 Oct 2023 14:11:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqBQCeJ/NldMKeUu1OBYUwN8/AyY1enWhp/djCl/mvO8wYOn/uI5pc1T5fBh0kg4Qw1sp3 X-Received: by 2002:a05:6a00:985:b0:68a:2272:23e9 with SMTP id u5-20020a056a00098500b0068a227223e9mr16697272pfg.17.1696885872908; Mon, 09 Oct 2023 14:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696885872; cv=none; d=google.com; s=arc-20160816; b=wcqnEl7CrYbkUId1H/DbQ19rXnvmvxlWsveVkumda8eu5N7g4eJRXVyCj3W2jASzTE 4S/LQ0BwvWnXIkV+fjZAuOW3lAc0yi7kqiZN52bqY5756m2bwSEG2jzzOJmFyUO8pC/W +WwG9flHL+0fDGAInmCZ3ZKY5KphM/SxWcjcWE703J7s+y/krmrzI55wXoKTOalbdEb4 W+3Gaz/EoPwyTi0iEGK5K2UYJOet2bjGY6et/Ed3ROYMac9DUxk/AtXe/LLPdAGH8ChR YDqFQ8erKH7M3u6pkbE8xUFERXgYu3s+jA2JsuXepNIxy8E0Ylk0N2RBpRM0+IQN8e75 nG6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1TU4GqFpyKx+szQTs3GpdZdYoNMAHrbMfWPpl7iHi/E=; fh=mPpGB1r8Pjkw41EITZ/nSqiwWwIlaCQw1OYY04A5K9I=; b=N1oxbeAOnbB8e5p+rlhE9dSSaQlueLOBhoCSSPcqa9jia/hF2l6cYkNPZKXKaYY6gW LyIqZHSnXPzOuZevZjAI0Kn64cE9z9fQ5+RYJjmd0a8m7rQOuGJixSVZbd/XM9MsWR1J R+VPMwdlXWAn033LioQ3JFw3oPojTaYAMdyTECizISBzhpiwO47cHP1XUTaFuLP0/v2g 2OA6QclUc/P8vhzhWLiU+l+TmneRrJEwcXefhk0WXBsfEVZWBpk14dQpH4dbw/W9YsTB eVMzmoSRO3IpWIb2z4N27C7V4UQwKUxNrxrfJc6Zm52+OLwhjXOERJkaOUByNq01K9hJ JEEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EEbjKbKf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id a70-20020a639049000000b00585a16c1077si10276854pge.367.2023.10.09.14.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:11:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EEbjKbKf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6BF0780AEE17; Mon, 9 Oct 2023 14:10:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378102AbjJIVKB (ORCPT + 99 others); Mon, 9 Oct 2023 17:10:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233286AbjJIVKA (ORCPT ); Mon, 9 Oct 2023 17:10:00 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5A2AA3 for ; Mon, 9 Oct 2023 14:09:58 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50307acd445so6230781e87.0 for ; Mon, 09 Oct 2023 14:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696885797; x=1697490597; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=1TU4GqFpyKx+szQTs3GpdZdYoNMAHrbMfWPpl7iHi/E=; b=EEbjKbKfOI+JEupvi39YiEi2dEcMKiqkw0fkO45G9ymhtTtsr3CQ6Wa3I/QCOqEu49 CMswqgfSxA0Sa24KTFMKOPG6NfL0u7kSqW/ksWW//iEQB2Ma5IHb+C4947bOzJ0gKAeR B81QGsY+tmhxfCRFHvOWKnsKsWvJlsi/iAU0UaQRAl293wawWS/fu6Q5NG9cTQDkOsZc jBgXt5G1+hlGS1nMw5y0S2r5r+P4LR7XGJqsp7vfkip0ttlvzMTmkZKoL9GnRtYbTwzk RVbX5SA6BZb8q3zag4KJ+R+ps3pFMxYQUSJ87+QwfLXtHMXCXHflIOK71Uk0ogvMWGAw CCkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696885797; x=1697490597; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1TU4GqFpyKx+szQTs3GpdZdYoNMAHrbMfWPpl7iHi/E=; b=ezpPxJ6aQFCKGe1CFsQAS189WgU1t90hw+xmkxexIaih8NlyerLqrg3dB3GLTquMc6 tAql+8pAkNnKoeLBXFlwo1cnB5JQ4iSXbzqEqX9KKCxoY43wnWRbmE2EdX2W0VwdK4O3 FLTh/bgQk6P5sAinOu5ugWETRYVXHojONuvsJnP5iIwdDO9DT9OQfvd3KIUDnsEyuYZh kaPr89M5SglLw02BR8l5SVGJbG2MnsX2R/J1mIWnZcztwqb7RmmEtZno9BLQeT9otUc9 FwcY3gA5zkT2a6vi0JSfqpyPr5qGSXc2x14mJRHRBfxiWIrMCukJawXWHg9mVQZeJJ99 w9Yg== X-Gm-Message-State: AOJu0YwYquw0iiL1KxNwz9mxIMVcZdrmH3YSFR4+62DqSECa4dQ9GGwc puYnzXQch6WkB5fltd+u3hT9Wg== X-Received: by 2002:a19:2d14:0:b0:505:84c8:c640 with SMTP id k20-20020a192d14000000b0050584c8c640mr14717972lfj.48.1696885796954; Mon, 09 Oct 2023 14:09:56 -0700 (PDT) Received: from [172.30.204.90] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id q10-20020ac25a0a000000b004ff8cd27a61sm1532825lfn.213.2023.10.09.14.09.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 14:09:56 -0700 (PDT) Message-ID: <0343c1d5-8706-4cf8-a17e-25ab27f654d8@linaro.org> Date: Mon, 9 Oct 2023 23:09:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 2/8] hugetlb: restructure pool allocations Content-Language: en-US To: Mike Kravetz Cc: Anshuman Khandual , Andrew Morton , Xiongchun Duan , Barry Song <21cnbao@gmail.com>, David Rientjes , Miaohe Lin , Matthew Wilcox , linux-mm@kvack.org, Naoya Horiguchi , Joao Martins , David Hildenbrand , Michal Hocko , Oscar Salvador , linux-kernel@vger.kernel.org References: <20230925234837.86786-3-mike.kravetz@oracle.com> <20230929205731.GA10357@monkey> <20231006030836.GC86415@monkey> <5d14b681-a2c9-4210-a0c1-bf38708b7998@linaro.org> <20231006223512.GC3861@monkey> <20231009032926.GA3376@monkey> <070bd916-d4d6-41c2-9f51-af35e80c96b9@linaro.org> <20231009150401.GA3846@monkey> <20231009151513.GB3846@monkey> From: Konrad Dybcio In-Reply-To: <20231009151513.GB3846@monkey> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:10:11 -0700 (PDT) On 10/9/23 17:15, Mike Kravetz wrote: > On 10/09/23 08:04, Mike Kravetz wrote: >> On 10/09/23 12:11, Konrad Dybcio wrote: >>> On 9.10.2023 05:29, Mike Kravetz wrote: >>>> On 10/06/23 15:35, Mike Kravetz wrote: >>>>> On 10/06/23 23:39, Konrad Dybcio wrote: >>>>>> On 6.10.2023 05:08, Mike Kravetz wrote: >>>>>>> On 10/02/23 11:57, Konrad Dybcio wrote: >>>>>>>> On 9/29/23 22:57, Mike Kravetz wrote: >>>>>>>>> On 09/27/23 13:26, Konrad Dybcio wrote: >>>>>>>>>> On 26.09.2023 01:48, Mike Kravetz wrote: >>> >>> I managed to get a boot log: >>> >>> https://pastebin.com/GwurpCw9 >>> >>> This is using arch/arm64/boot/dts/qcom/sm8550-mtp.dts for reference >>> >> >> Early on in boot log before the panic, I see this in the log: >> >> [ 0.000000] efi: UEFI not found. >> [ 0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader! >> >> Isn't that misalignment pretty serious? Or, is is possible to run with that? >> >> There are no hugetlb pages allocated at boot time: >> >> [ 0.000000] Kernel command line: PMOS_NO_OUTPUT_REDIRECT console=ttyMSM0 earlycon clk_ignore_unused pd_ignore_unused androidboot.bootdevice=1d84000.ufshc androidboot.fstab_suffix=default androidboot.boot_devices=soc/1d84000.ufshc androidboot.serialno=ab855d8d androidboot.baseband=msm >> >> So, the routine where we are panic'ing (gather_bootmem_prealloc) should be a >> noop. The first thing it does is: >> list_for_each_entry(m, &huge_boot_pages, list) { >> ... >> } >> >> However, huge_boot_pages should be empty as initialized here: >> __initdata LIST_HEAD(huge_boot_pages); >> >> At the end of the routine, we call prep_and_add_bootmem_folios to >> process the local list created withing that above loop: >> >> LIST_HEAD(folio_list); >> >> This should also be empty and a noop. >> >> Is it possible that the misaligned kernel image could make these lists >> appear as non-empty? > > Actually, just saw this: > > https://lore.kernel.org/linux-mm/20231009145605.2150897-1-usama.arif@bytedance.com/ > > Will take a look, although as mentioned above prep_and_add_bootmem_folios on > an empty list should be a noop. I'll try it out atop the series tomorrow or so. Konrad