From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76CB0C433DB for ; Thu, 25 Feb 2021 17:42:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 039AB64F1F for ; Thu, 25 Feb 2021 17:42:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 039AB64F1F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 54BA66B006C; Thu, 25 Feb 2021 12:42:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FCFA6B006E; Thu, 25 Feb 2021 12:42:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3C4FD6B0070; Thu, 25 Feb 2021 12:42:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id 2786D6B006C for ; Thu, 25 Feb 2021 12:42:20 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E12308248068 for ; Thu, 25 Feb 2021 17:42:19 +0000 (UTC) X-FDA: 77857509198.17.89DDF08 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf11.hostedemail.com (Postfix) with ESMTP id C86FE200039F for ; Thu, 25 Feb 2021 17:42:08 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11PHWmPL004083; Thu, 25 Feb 2021 12:42:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=pp1; bh=/nWMJgwtZ7Cm8sF4GEYJiUOZKiRImRLfYOx8gpJxRys=; b=irXn9tef6j28pcK9CBZ+Z7HLwDqATyoG3Tco9CnCn9ODI5u7iCK6Q4zGX4AO0/Ag04ax ytNDyAX21s2puysbucB9F4z4+9EUK1XpbC4yR1rmMwXtAxjTrRH9ugJQfKaIYFcmlOKY Um5zhyqB8BhgXkf0ZzCOGk0F8je5dPxNtAdNjxNgHIgNRKERFjIeONf8EiTmvc2rZ+t3 9b0j/w2sD9MrWLKzRE9JsfGILJyDEhCfbXpSi3iaDwIIrFjUdvDN5CK+dKtCBJHV30+q +dIdLrhFfXG93SkPJqRYMyqVXujcry7yWALsM9G38rB0l65FFiy0/OZIUixr3wqvXjaw yQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xfcxadey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 12:42:00 -0500 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 11PHfx3A039690; Thu, 25 Feb 2021 12:41:59 -0500 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 36xfcxade2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 12:41:59 -0500 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11PHbiII007103; Thu, 25 Feb 2021 17:41:57 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma01fra.de.ibm.com with ESMTP id 36tt28aehq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Feb 2021 17:41:57 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11PHfsg026280326 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Feb 2021 17:41:54 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CAB1CA4040; Thu, 25 Feb 2021 17:41:54 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E755A4057; Thu, 25 Feb 2021 17:41:52 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.51.238]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 25 Feb 2021 17:41:52 +0000 (GMT) Date: Thu, 25 Feb 2021 19:41:50 +0200 From: Mike Rapoport To: David Hildenbrand Cc: George Kennedy , Andrey Konovalov , Andrew Morton , Catalin Marinas , Vincenzo Frascino , Dmitry Vyukov , Konrad Rzeszutek Wilk , Will Deacon , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Peter Collingbourne , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , Christoph Hellwig , kasan-dev , Linux ARM , Linux Memory Management List , LKML , Dhaval Giani Subject: Re: [PATCH] mm, kasan: don't poison boot memory Message-ID: <20210225174150.GF1854360@linux.ibm.com> References: <450a9895-a2b4-d11b-97ca-1bd33d5308d4@oracle.com> <20210224103754.GA1854360@linux.ibm.com> <9b7251d1-7b90-db4f-fa5e-80165e1cbb4b@oracle.com> <20210225085300.GB1854360@linux.ibm.com> <9973d0e2-e28b-3f8a-5f5d-9d142080d141@oracle.com> <20210225145700.GC1854360@linux.ibm.com> <20210225160706.GD1854360@linux.ibm.com> <24e43280-1442-3c4e-aa57-ac84b987aa58@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <24e43280-1442-3c4e-aa57-ac84b987aa58@redhat.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.761 definitions=2021-02-25_10:2021-02-24,2021-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxscore=0 spamscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 malwarescore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102250133 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: C86FE200039F X-Stat-Signature: qioe4fs8wgxywao84oi77yx5s19qnnmy Received-SPF: none (linux.ibm.com>: No applicable sender policy available) receiver=imf11; identity=mailfrom; envelope-from=""; helo=mx0a-001b2d01.pphosted.com; client-ip=148.163.156.1 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614274928-932374 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 25, 2021 at 06:23:24PM +0100, David Hildenbrand wrote: > On 25.02.21 17:31, George Kennedy wrote: > > : rsdp_address=3Dbfbfa014 > > [=A0=A0=A0 0.066612] ACPI: RSDP 0x00000000BFBFA014 000024 (v02 BOCHS = ) > > [=A0=A0=A0 0.067759] ACPI: XSDT 0x00000000BFBF90E8 00004C (v01 BOCHS = BXPCFACP > > 00000001=A0=A0=A0=A0=A0 01000013) > > [=A0=A0=A0 0.069470] ACPI: FACP 0x00000000BFBF5000 000074 (v01 BOCHS = BXPCFACP > > 00000001 BXPC 00000001) > > [=A0=A0=A0 0.071183] ACPI: DSDT 0x00000000BFBF6000 00238D (v01 BOCHS = BXPCDSDT > > 00000001 BXPC 00000001) > > [=A0=A0=A0 0.072876] ACPI: FACS 0x00000000BFBFD000 000040 > > [=A0=A0=A0 0.073806] ACPI: APIC 0x00000000BFBF4000 000090 (v01 BOCHS = BXPCAPIC > > 00000001 BXPC 00000001) > > [=A0=A0=A0 0.075501] ACPI: HPET 0x00000000BFBF3000 000038 (v01 BOCHS = BXPCHPET > > 00000001 BXPC 00000001) > > [=A0=A0=A0 0.077194] ACPI: BGRT 0x00000000BE49B000 000038 (v01 INTEL = EDK2 > > 00000002=A0=A0=A0=A0=A0 01000013) > > [=A0=A0=A0 0.078880] ACPI: iBFT 0x00000000BE453000 000800 (v01 BOCHS = BXPCFACP > > 00000000=A0=A0=A0=A0=A0 00000000) >=20 >=20 > Can you explore the relevant area using the page-flags tools (located i= n > Linux src code located in tools/vm/page-flags.c) >=20 >=20 > ./page-types -L -r -a 0xbe490,0xbe4a0 These are not iBFT and they are "ACPI data", so we should have them as PG_Reserved set at init_unavailable_mem(). [ 0.000000] BIOS-e820: [mem 0x0000000000808000-0x000000000080ffff] usa= ble [ 0.000000] BIOS-e820: [mem 0x0000000000810000-0x00000000008fffff] ACP= I NVS [ 0.000000] BIOS-e820: [mem 0x0000000000900000-0x00000000be49afff] usa= ble ^ iBFT@0xbe453 lives here ^=20 And it should be a normal page, as it's in "usable" memory and nothing reserves it at boot, so no reason it won't be freed to buddy. If iBFT was in the low memory (<1M) it would have been reserved by reserve_ibft_region(), but with ACPI any block not marked by BIOS as "ACP= I something" is treated like a normal memory and there is nothing that reserves it. So we do need to memblock_reserve() iBFT region, but I still couldn't fin= d the right place to properly get its address without duplicating ACPI tabl= es parsing :( [ 0.000000] BIOS-e820: [mem 0x00000000be49b000-0x00000000be49bfff] ACP= I data --=20 Sincerely yours, Mike.