Received: by 10.213.65.68 with SMTP id h4csp682488imn; Tue, 13 Mar 2018 18:04:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELtuiWpcKiAddKsFkmokwQN+lgJxVTbWgo3xZxFaXTTLcT5wQDCbrKpCi7DXh7p7bIT93MnR X-Received: by 10.99.110.11 with SMTP id j11mr2103441pgc.294.1520989485559; Tue, 13 Mar 2018 18:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520989485; cv=none; d=google.com; s=arc-20160816; b=BXYHRciQWBjc8xK1jYm3N/xD/D7S2LjZlCKUY5WTn7yBmsVltYVw3ZsgaDpxhbpzTa HN/UNP1Ece5WcRYGa5rLMT7TdUrQDDQdFj/VuP/KFa4ucLiFzjblVot/SU4WAa6PO6DC ydEMTYZRZH6EJAkUbJp/cucctOpqiebQqBcLyScksZc9l3fOg+HVYKjgkWj1BKdIyvtD 6j4Beo5l2EP5MNLwtWudB47yVjMd/ZfWOLrD4O6BkPWSYDEGLOD0CA99+O6+XClQsu8Z GYVDwa1Y5lAVEEiu9f+qp99Qu3TqlxbQEVXG3xDU2oKufoYOnNVSWfGr8pN6PrkimqG0 XslA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=AM/mWKxz+utpXTKgblrXSJmRHTdK/KSqSOoc5NX5P4U=; b=gzpYjHStAePmq+rO8Fx2u1csDSWfxSx2/9qky7AKDZ2AO/pE91hHYVum+tfKqe9zxY BSqW1M33EnfzceVNxXQgLK3ZALMNVsCLxDVT9mM5406jfNxpQUYGnBGkzFJiqjo3P/FD qIE+7YKEY95q8H4ytfcVxT5GRbdTerai0zZmeQW8PzqaaTkutQyaMdxOlnLcy/0f/fyk QJUxCRVX4WS6MmSBHB+WXVqDgUDh3Xy69JM9R1CHyMr5y+QD/xzEzmlkNhJchPuJ0FOV 2j+QtYzg0uPUdG5chhSRhAUwpwQeMv10yIQebbbffXnKO7CvN7q1BLyE3VpbKL7puXYd hNMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=LUhGRKmc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si790068pgn.373.2018.03.13.18.04.30; Tue, 13 Mar 2018 18:04:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=LUhGRKmc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932840AbeCNBDh (ORCPT + 99 others); Tue, 13 Mar 2018 21:03:37 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:46276 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932634AbeCNBDg (ORCPT ); Tue, 13 Mar 2018 21:03:36 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2E11x7k045207 for ; Wed, 14 Mar 2018 01:03:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : in-reply-to : references : from : date : message-id : subject : to : cc : content-type; s=corp-2017-10-26; bh=AM/mWKxz+utpXTKgblrXSJmRHTdK/KSqSOoc5NX5P4U=; b=LUhGRKmcf+hG5sUmV+OscNpKMBNb2Sc7HV8mHAaGnj9iKhbMqAxZdBSsT2uLuPKx65J+ qjjiCOVN84R6KvTxSIOVXnifMdT0R3t7al9jaCwaSrYGpDTBxfLPy3T9zdi/gALWdJA8 43d+HF57gFy0ficAHzh/otogbwJozJM4jchwboM7nVjIHkpOvSVuPRvLJVyHMC4eTttY TUHcv5DF9DPMKHNxdlhW+zm7cy5xikMzif1a/80Kg4gM3S/YU28AKIOxR9T/NGMLxhK7 O4DCHqBBY70zUCpToBYAN+XD9G8jNojgWYh1zniwGVZJfbHiemQPvSzp0PvA6+KzLkHh vg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2gps1x82pa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 14 Mar 2018 01:03:35 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w2E13YTt018225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 14 Mar 2018 01:03:34 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2E13YYE014417 for ; Wed, 14 Mar 2018 01:03:34 GMT Received: from mail-oi0-f47.google.com (/209.85.218.47) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 13 Mar 2018 18:03:34 -0700 Received: by mail-oi0-f47.google.com with SMTP id c83so1367760oib.1 for ; Tue, 13 Mar 2018 18:03:33 -0700 (PDT) X-Gm-Message-State: AElRT7FhhfVfCn3X93TszLkypQTOZ2ILzaoFESuq5N2xm6CUv8A+DpMT cRMOHtrNrx/D9PVLPUilV30lKtqKrEjzwPsAijs= X-Received: by 10.202.88.86 with SMTP id m83mr1594617oib.221.1520989413529; Tue, 13 Mar 2018 18:03:33 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:7258:0:0:0:0:0 with HTTP; Tue, 13 Mar 2018 18:02:53 -0700 (PDT) In-Reply-To: <20180314005350.6xdda2uqzuy4n3o6@sasha-lappy> References: <20180131210300.22963-1-pasha.tatashin@oracle.com> <20180131210300.22963-2-pasha.tatashin@oracle.com> <20180313234333.j3i43yxeawx5d67x@sasha-lappy> <20180314005350.6xdda2uqzuy4n3o6@sasha-lappy> From: Pavel Tatashin Date: Tue, 13 Mar 2018 21:02:53 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] mm: uninitialized struct page poisoning sanity checking To: Sasha Levin Cc: "steven.sistare@oracle.com" , "daniel.m.jordan@oracle.com" , "akpm@linux-foundation.org" , "mgorman@techsingularity.net" , "mhocko@suse.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "gregkh@linuxfoundation.org" , "vbabka@suse.cz" , "bharata@linux.vnet.ibm.com" Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8831 signatures=668690 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803140008 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 13, 2018 at 8:53 PM, Sasha Levin wrote: > On Tue, Mar 13, 2018 at 08:38:57PM -0400, Pavel Tatashin wrote: >>Hi Sasha, >> >>It seems the patch is doing the right thing, and it catches bugs. Here >>we access uninitialized struct page. The question is why this happens? > > Not completely; note that we die on an invalid reference rather than > assertion failure. I think that invalid reference happens within assertion failure, as far as I can tell, it is dump_page() where we get the invalid reference, but to get to dump_page() from get_nid_for_pfn() we must have triggered the assertion. > >>register_mem_sect_under_node(struct memory_block *mem_blk, int nid) >> page_nid = get_nid_for_pfn(pfn); >> >>node id is stored in page flags, and since struct page is poisoned, >>and the pattern is recognized, the panic is triggered. >> >>Do you have config file? Also, instructions how to reproduce it? > > Attached the config. It just happens on boot. Thanks, I will try in qemu. Pasha