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=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 92AFAC12002 for ; Wed, 14 Jul 2021 21:14:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 45D536109E for ; Wed, 14 Jul 2021 21:14:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45D536109E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 87A856B0098; Wed, 14 Jul 2021 17:14:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 850F26B0099; Wed, 14 Jul 2021 17:14:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F1EE8D0002; Wed, 14 Jul 2021 17:14:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0243.hostedemail.com [216.40.44.243]) by kanga.kvack.org (Postfix) with ESMTP id 4C4636B0098 for ; Wed, 14 Jul 2021 17:14:08 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 385EF8248076 for ; Wed, 14 Jul 2021 21:14:07 +0000 (UTC) X-FDA: 78362446134.40.0812873 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by imf27.hostedemail.com (Postfix) with ESMTP id EC38970000B4 for ; Wed, 14 Jul 2021 21:14:06 +0000 (UTC) Received: by mail-pg1-f170.google.com with SMTP id w15so3784590pgk.13 for ; Wed, 14 Jul 2021 14:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=m8m1rAnLSqUxpq8o8SiEyqSNSX9K2ZyDZ33nReCUkhE=; b=A+oJjT/UZMdqtW2Mj3JxT4tUrD0ct+coV00V/Q8DEX7kNIfOSqNrp8im+FCutSMp/a bPBVBZHQznxoOA8ig0tLeRChAMRJdd8favVUXvpTEhDKRdqpzFb7fHIcuW910ogKsB5p bglgE2J2Q6+gWhBEItIl4zcK99rjXrh9b4tqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=m8m1rAnLSqUxpq8o8SiEyqSNSX9K2ZyDZ33nReCUkhE=; b=audFdPyC1JMIa6NraM5vOVkeXzaUKbNe/tbkFop5RPTtUz0Lf9//SXd1Tapb+celdw cNpOVv/9KXd5vtqvstW+2//HiYtG/EDopDomsokgthGcSlmLwWALOYMPzsRBzUM3aOwo aRaGBGHu2yCskXz3KHToW+aojka+AwQ4zP+/Oo5L1qteu2oyezdB5dp8rEDGKYvtqg5r UWNmSFwbUbYspyUfuiI7/rGWe7lX3ON6MSYbh04PeRceod9/3rxcRve6zCaH3hzmkl0r V0QqGgTWeXnM6BJX8ypPjxUHNqq3LcyuF3hVr1Ayd5VGuMUiiTaU/V+xZAF0Upc+Ngqg NQ7w== X-Gm-Message-State: AOAM530k2zXKA87L5gFG4x8hI0yULBhlKn5dL3dqosGwQNPVx7fYMubu 91CxryYWqCKIRQCq3cytKbwugA== X-Google-Smtp-Source: ABdhPJxszQxAFtdi+tpp9WU+fLMtnbS+hKc0abtwYZr8cXk43pBte0QbcQNSC2gEpnagmdjDmMJr8g== X-Received: by 2002:a05:6a00:1713:b029:332:7eca:41a1 with SMTP id h19-20020a056a001713b02903327eca41a1mr228474pfc.26.1626297245937; Wed, 14 Jul 2021 14:14:05 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d20sm3796924pfn.219.2021.07.14.14.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 14:14:05 -0700 (PDT) Date: Wed, 14 Jul 2021 14:14:04 -0700 From: Kees Cook To: bowsingbetee Cc: Sergei Trofimovich , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Alexander Potapenko , Thomas Gleixner , Vlastimil Babka Subject: Re: [PATCH] mm: page_alloc: fix page_poison=1 / INIT_ON_ALLOC_DEFAULT_ON interaction Message-ID: <202107141413.78A4ED77@keescook> References: <20210712005732.4f9bfa78@zn3> <20210712215816.1512739-1-slyfox@gentoo.org> <202107131953.BB3627156@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="A+oJjT/U"; spf=pass (imf27.hostedemail.com: domain of keescook@chromium.org designates 209.85.215.170 as permitted sender) smtp.mailfrom=keescook@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Stat-Signature: mgesnrc8oqrapwkqa67e7z7au1jyysse X-Rspamd-Queue-Id: EC38970000B4 X-Rspamd-Server: rspam01 X-HE-Tag: 1626297246-710705 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 Wed, Jul 14, 2021 at 11:11:18AM +0000, bowsingbetee wrote: > B & C variants show this message and A does not, which is what I would expect to happen. > > Tested variants: > > A. "page_poison=1 init_on_free=0 init_on_alloc=0 slub_debug=P" > B. "page_poison=1 init_on_free=0 init_on_alloc=0 slub_debug=P init_on_free=1" > C. "page_poison=1 slub_debug=P" > > in common: > CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y > CONFIG_INIT_ON_FREE_DEFAULT_ON=y > CONFIG_PAGE_POISONING=y > CONFIG_SLUB_DEBUG=y > CONFIG_SLUB=y > > (the slub parts don't matter, ignore them) > > [...] > > While both patches(Sergei's, and yours) work for me, I'll be using this one for now. > > Thank you for your work! > Cheers! Awesome; thanks for testing it! -Kees -- Kees Cook