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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 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 B6B06C433DB for ; Fri, 26 Mar 2021 16:42:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 51F2D619D5 for ; Fri, 26 Mar 2021 16:42:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51F2D619D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gentoo.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7AC4F6B006C; Fri, 26 Mar 2021 12:42:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 75D1C6B006E; Fri, 26 Mar 2021 12:42:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FD586B0070; Fri, 26 Mar 2021 12:42:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 44F4F6B006C for ; Fri, 26 Mar 2021 12:42:32 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 01DA8181F3B5C for ; Fri, 26 Mar 2021 16:42:32 +0000 (UTC) X-FDA: 77962593744.24.303BA59 Received: from smtp.gentoo.org (unknown [140.211.166.183]) by imf12.hostedemail.com (Postfix) with ESMTP id B9FD32BE0 for ; Fri, 26 Mar 2021 16:42:19 +0000 (UTC) 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 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B9FD32BE0 X-Stat-Signature: 1sxrf99xotr46u4eyrre9eds65z3a3eu Received-SPF: none (gentoo.org>: No applicable sender policy available) receiver=imf12; identity=mailfrom; envelope-from=""; helo=smtp.gentoo.org; client-ip=140.211.166.183 X-HE-DKIM-Result: none/none X-HE-Tag: 1616776939-583471 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 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