From patchwork Tue May 25 13:00:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Schaefer X-Patchwork-Id: 12278725 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 8A676C2B9F8 for ; Tue, 25 May 2021 13:01:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1DBFE6141C for ; Tue, 25 May 2021 13:01:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DBFE6141C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B2FCC6B006E; Tue, 25 May 2021 09:01:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B04E96B0070; Tue, 25 May 2021 09:01:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A5D46B0071; Tue, 25 May 2021 09:01:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id 67D316B006E for ; Tue, 25 May 2021 09:01:53 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id F2CA3A767 for ; Tue, 25 May 2021 13:01:52 +0000 (UTC) X-FDA: 78179765664.25.2F3DE73 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf02.hostedemail.com (Postfix) with ESMTP id CEE644202A35 for ; Tue, 25 May 2021 13:01:36 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14PCheeH098926; Tue, 25 May 2021 09:01:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=heKL48jhTKHG+0Zf7GGx5pc2nTO7LUu6qGQW5p/pJiw=; b=m+/4Csr7PprAgzVd7tgMLPdGfwtdhI119P5i2v1HdcKKhFo64NrJyc+6Ei9Ab7omwQZ7 B0bLzR/CDFgvT4MysPx8NzkYJ0ids4UnNh+vdyJgBmssuvpPbhk1Z9Drn6NRW1xUGO/U xDp2cRIr6fh1CSmh2c+wpOBYck7IYDF1o1yBXkdra6DVuGc37u9FqO+lLCqrDo1ssJv8 sY6fEw4WQJumzHHRbVrSE2w8qQQWn86xQSAb4ZpwArFnBNb8th6CttmtXV8fN5QeuxU1 jeTWrwFRJm4yhs1aQw9N3Dub0dtJRkbkfhztnKekRGOFe6BijRefbpndUsF0aEfoM30j Fg== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 38s1g68kum-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 May 2021 09:01:35 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 14PD0KAf002901; Tue, 25 May 2021 13:01:33 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04ams.nl.ibm.com with ESMTP id 38s1r48016-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 May 2021 13:01:33 +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 14PD1VqW28705204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 May 2021 13:01:31 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A19BAE055; Tue, 25 May 2021 13:01:31 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F2DB9AE04D; Tue, 25 May 2021 13:01:30 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 25 May 2021 13:01:30 +0000 (GMT) From: Gerald Schaefer To: Andrew Morton , Anshuman Khandual Cc: linux-mm , LKML , linux-arch , linux-sparc , linux-s390 , Gerald Schaefer Subject: [PATCH 0/1] mm/debug_vm_pgtable: fix alignment for pmd/pud_advanced_tests() Date: Tue, 25 May 2021 15:00:42 +0200 Message-Id: <20210525130043.186290-1-gerald.schaefer@linux.ibm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: UaPDqLmwIwnWKJEQumuWDv4XxDdjtyjp X-Proofpoint-ORIG-GUID: UaPDqLmwIwnWKJEQumuWDv4XxDdjtyjp X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-25_06:2021-05-25,2021-05-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 impostorscore=0 clxscore=1011 phishscore=0 mlxlogscore=683 adultscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105250077 X-Rspamd-Queue-Id: CEE644202A35 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b="m+/4Csr7"; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf02.hostedemail.com: domain of gerald.schaefer@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=gerald.schaefer@linux.ibm.com X-Rspamd-Server: rspam03 X-Stat-Signature: btisszbhhhsyzaxgbhmk86uayqkbtedt X-HE-Tag: 1621947696-326245 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000017, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: We sometimes see a "BUG task_struct (Not tainted): Padding overwritten" on s390, directly after running debug_vm_pgtable. This is because of wrong vaddr alignment in pmd/pud_advanced_tests(), leading to memory corruption at least on s390, see patch description. At first glance, other architectures do not seem to care about vaddr in their xxx_get_and_clear() implementations, so they should not be affected. One exception is sparc, where the addr is passed over to some tlb_batch code, but I'm not sure what implication the wrongly aligned vaddr would have in this case. Also adding linux-arch, just to make sure. Gerald Schaefer (1): mm/debug_vm_pgtable: fix alignment for pmd/pud_advanced_tests() mm/debug_vm_pgtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)