Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1178818ybx; Tue, 5 Nov 2019 11:40:04 -0800 (PST) X-Google-Smtp-Source: APXvYqxtQ7fIg1eUWVDAJAXX82FBUU39pkUq9OLQtvyiz8v3IC+ibH1itPHxN2MARlYicfTVQxmj X-Received: by 2002:a50:85cb:: with SMTP id q11mr4314066edh.141.1572982804143; Tue, 05 Nov 2019 11:40:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572982804; cv=none; d=google.com; s=arc-20160816; b=co8G2ukNBdGTpJKfDllSHLdz1yDl3L4gQiNjg3FaKPPV44TbWxd95CZUedja74/Dl3 U/DcFU1Y8m+0xjmGPtXxdrgUg2sAT8wt4yJVjpTNsHugM+4qhuxDXx6wRb1hjC/QrkEE 4mSz2yXP4H5QBGIAhLWJgluXfGZrV3oaNJpj1kSHcthtZez78hVqCwAu313DVl/gvARa yyznKOnx+bTlYa8p+/Zcxjza9Z9U1qRI/6H7cFoEX5R2dWudSigWXrWIN+4Ndg1luUil T6evSf4hfoDb+olc30nd/Nh/0oojXyk5tgDZbIKqSzJeKTQ/EWGMFCjM7ijPd24NH9Nr 6kpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:from:date; bh=+7aDTYQ1KYFXZ+1l7Q3UqrO5gSvxm9VvVKDdmRiTMvg=; b=zKgTEr3IW04DqNqG7YREGIxzcwfUMB47VIiWIyF3LeN3kvgPUVLmJOxbWCzImiNCi9 JMnk0No0Z3+sOfef8QsmmWTpbYUIl50hzA+4kNPCQAt6F44SWnjgunt4AIq81yagN6sx bP5botMOSI+uySiOemj5UREA4vKDfna0exNA0U7RAH4t/MU4Xs9RU0ZNnYfZ96+Psn4L djN21bKZUygKLGrn9BQgTPyerscG5X3UP5wpvwL6H8LKsMTyPI+6LLSj6OfvkXL0MxNJ BUkldh8q/qtKLDfuM9RvyZc+cTj9dkYZdiNbu1hmflmGqnbU4S/ADtQ+DJralpXIV4x2 u8YA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pg2si4194353ejb.216.2019.11.05.11.39.40; Tue, 05 Nov 2019 11:40:04 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403781AbfKETgz (ORCPT + 99 others); Tue, 5 Nov 2019 14:36:55 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59602 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390893AbfKETgz (ORCPT ); Tue, 5 Nov 2019 14:36:55 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id xA5JXmot134189 for ; Tue, 5 Nov 2019 14:36:54 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2w3eh79prv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 05 Nov 2019 14:36:53 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Nov 2019 19:36:50 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 5 Nov 2019 19:36:41 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xA5JaeNI31719424 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Nov 2019 19:36:40 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6370DAE057; Tue, 5 Nov 2019 19:36:40 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 43F44AE056; Tue, 5 Nov 2019 19:36:39 +0000 (GMT) Received: from thinkpad (unknown [9.152.97.32]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 5 Nov 2019 19:36:39 +0000 (GMT) Date: Tue, 5 Nov 2019 20:36:38 +0100 From: Gerald Schaefer To: Anshuman Khandual Cc: linux-mm@kvack.org, Andrew Morton , Vlastimil Babka , Greg Kroah-Hartman , Thomas Gleixner , Mike Rapoport , Jason Gunthorpe , Dan Williams , Peter Zijlstra , Michal Hocko , Mark Rutland , Mark Brown , Steven Price , Ard Biesheuvel , Masahiro Yamada , Kees Cook , Tetsuo Handa , Matthew Wilcox , Sri Krishna chowdary , Dave Hansen , Russell King - ARM Linux , Michael Ellerman , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , "David S. Miller" , Vineet Gupta , James Hogan , Paul Burton , Ralf Baechle , "Kirill A . Shutemov" , Christophe Leroy , Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V8] mm/debug: Add tests validating architecture page table helpers In-Reply-To: <1572240562-23630-1-git-send-email-anshuman.khandual@arm.com> References: <1572240562-23630-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19110519-0020-0000-0000-00000382D869 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19110519-0021-0000-0000-000021D903DD Message-Id: <20191105203638.6889a994@thinkpad> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-11-05_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1911050162 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Oct 2019 10:59:22 +0530 Anshuman Khandual wrote: > This adds tests which will validate architecture page table helpers and > other accessors in their compliance with expected generic MM semantics. > This will help various architectures in validating changes to existing > page table helpers or addition of new ones. > > This test covers basic page table entry transformations including but not > limited to old, young, dirty, clean, write, write protect etc at various > level along with populating intermediate entries with next page table page > and validating them. > > Test page table pages are allocated from system memory with required size > and alignments. The mapped pfns at page table levels are derived from a > real pfn representing a valid kernel text symbol. This test gets called > right after page_alloc_init_late(). > > This gets build and run when CONFIG_DEBUG_VM_PGTABLE is selected along with > CONFIG_VM_DEBUG. Architectures willing to subscribe this test also need to > select CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE which for now is limited to x86 and > arm64. Going forward, other architectures too can enable this after fixing > build or runtime problems (if any) with their page table helpers. I've prepared a couple of commits to our arch code to make this work on s390, they will go upstream in the next merge window. After that, we can add s390 to the supported architectures. We had some issues, e.g. because we do not report large entries as bad in pxd_bad(), do not check for folded page tables in pxd_free(), or assume that primitives like pmd_mkdirty() will only be called after pmd_mkhuge(). None of those should have any impact on current code, but your test module revealed that we do not behave like other architectures in some aspects, and it's good to find and fix such things to prevent possible future issues. Thanks a lot for the effort! Regards, Gerald