Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1555096pxf; Fri, 26 Mar 2021 09:43:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGc0LvQt2/87uXce4xsyc6FGQO8i1kSQ6ZomBjqIjJg4MBN3WqLFDmWWhcoD+dgFxVldRy X-Received: by 2002:a05:6402:b2a:: with SMTP id bo10mr15966774edb.144.1616777038623; Fri, 26 Mar 2021 09:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616777038; cv=none; d=google.com; s=arc-20160816; b=HvSLPbRZXMwJGo7f9egfC3RTzxHCXL/UKVFt85ZfCrVLpT4VNxsErQBryzyDEvF413 4T7mWRRGmCvZvpxQZHFZqijUhcPUKIU8qk7JaP1BlUcarDLjXKcMVkwC+rw7MBBs431Z AcoU3dpjpM0zuYu9SKFbIhre+TQ0nJ6HbQZYfn0S4c9t65tQkYGgS9hdWUtrPSiF3rCm Waz0VZtHlHl5cOm2d5tUrWMWVWpyywjg2yGqyaoTyFh1R/H2TQ73hzqZ2Bj1PnfFDc+b CWK1H3I1/fdwW8OYSx1qcyLqVt9LoAQMQxBNVMZf2coXFYj62QHn440p47GS6Sbkay1t IciQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=ArfWW3FuP7fLr8qKD1lkr4YsGto++u9MCvHLjfUJeSc=; b=YIvVi2U2WRYyZZYP7rEjdP1ooJYWXlLscEkXP+Kl/4zTBVooBAOPQFbXNYU2ESC5b8 RwWaCMayVYO2/86XV4r2r7jzVsvtrc1KvAYnAbrQTyg5DCcBEGv8nYadUz/5uZZ3JdPF NKpezZ/fqIPSk7iaR3zsV4aN3Pq4uoO6T4hrMlaUIsjV3gvdKmh6cevEuVCEljgbU8h8 58Td52s0fYgaTE99DAGAeaBF031EQkxqABK/gGGquXatdvb3ZgxPhkwgQs4IPzCUtzey bGiWOdsdL61zLLewcFZxGE8aHsSJvMwrE/GhOhhuVUJJkznCoQhfrG/8C2o0JA2/nW3h NVrA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc19si6575387edb.127.2021.03.26.09.43.35; Fri, 26 Mar 2021 09:43:58 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbhCZQm3 (ORCPT + 99 others); Fri, 26 Mar 2021 12:42:29 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:47252 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbhCZQmL (ORCPT ); Fri, 26 Mar 2021 12:42:11 -0400 Date: Fri, 26 Mar 2021 16:42:04 +0000 From: Sergei Trofimovich To: Andrey Konovalov Cc: David Hildenbrand , Andrew Morton , Linux Memory Management List , LKML , Vlastimil Babka Subject: Re: [PATCH] mm: page_alloc: ignore init_on_free=1 for page alloc Message-ID: <20210326164204.29da5808@sf> In-Reply-To: References: <20210326112650.307890-1-slyfox@gentoo.org> <4e23d404-5125-6c9c-4aa7-5eff0fa1ba33@redhat.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Mar 2021 16:00:34 +0100 Andrey Konovalov wrote: > On Fri, Mar 26, 2021 at 2:49 PM David Hildenbrand wrote: > > > > > I observed use of poisoned pages as the crash on ia64 booted with > > > init_on_free=1 init_on_alloc=1 (CONFIG_PAGE_POISONING=y config). > > > There pmd page contained 0xaaaaaaaa poison pages and led to early crash. > > > > > > The change drops the assumption that init_on_free=1 guarantees free > > > pages to contain zeros. > > > > > > Alternative would be to make interaction between runtime poisoning and > > > sanitizing options and build-time debug flags like CONFIG_PAGE_POISONING > > > more coherent. I took the simpler path. > > > > > > > I thought latest work be Vlastimil tried to tackle that. To me, it feels > > like page_poison=on and init_on_free=1 should bail out and disable one > > of both things. Having both at the same time doesn't sound helpful. > > This is exactly how it works, see init_mem_debugging_and_hardening(). > > Sergei, could you elaborate more on what kind of crash this patch is > trying to fix? Where does it happen and why? Yeah, I see I misinterpreted page_poison=on handling and misled you all. Something else poisons a page when it should have not. I'll answer in more detail to Vlastimil's email upthread and will provide more detail of the unexpected poisoning I see. -- Sergei