Message ID | 20201015033206.140550-1-aneesh.kumar@linux.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=XY0j=DW=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB9E51580 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 15 Oct 2020 03:32:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8ED7F22255 for <patchwork-linux-mm@patchwork.kernel.org>; Thu, 15 Oct 2020 03:32:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="dhXzwO7T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8ED7F22255 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 83AA66B0062; Wed, 14 Oct 2020 23:32:22 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7C2D76B0068; Wed, 14 Oct 2020 23:32:22 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 68ACC6B006E; Wed, 14 Oct 2020 23:32:22 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id 3752F6B0062 for <linux-mm@kvack.org>; Wed, 14 Oct 2020 23:32:22 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A921E8249980 for <linux-mm@kvack.org>; Thu, 15 Oct 2020 03:32:21 +0000 (UTC) X-FDA: 77372736882.24.dolls15_010a8ff27211 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 8B89F1A4A0 for <linux-mm@kvack.org>; Thu, 15 Oct 2020 03:32:21 +0000 (UTC) X-Spam-Summary: 1,0,0,c5567f8aee8c3448,d41d8cd98f00b204,aneesh.kumar@linux.ibm.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1311:1314:1345:1431:1437:1515:1534:1539:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3350:3865:3866:3872:3874:4250:5007:6261:6653:10004:11026:11658:11914:12296:12297:12555:12895:13069:13311:13357:13894:14181:14384:14394:14721:21080:21451:21627:21990:30054,0,RBL:148.163.158.5:@linux.ibm.com:.lbl8.mailshell.net-62.14.0.100 64.201.201.201;04y84zwwtyzkknb9a1scoaq7e5qaaypneap5g7iqj8fck9re8ofjzkdzdrpfngk.rhzsmffrtwtubkkg17xqyxwwd41dipaxkybbkrmoaahbrhmpsoey9afccfcbrtp.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:94,LUA_SUMMARY:none X-HE-Tag: dolls15_010a8ff27211 X-Filterd-Recvd-Size: 4209 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf27.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Thu, 15 Oct 2020 03:32:20 +0000 (UTC) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 09F3GB0V047021; Wed, 14 Oct 2020 23:32:18 -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=15VWw2AFltuDYg7bBruxmDbCNOmBFDkYMaDZKmmBOWA=; b=dhXzwO7TWiVIMpsKAnG58tJy86QLDzHgsMccLdBCbMKy4M+20ppwswjAkWnInxvm/3O2 KKoYlbPysyevd2rI1nfakgo02kaTHtPnz/xgU6LwW3ocw+HfTjYXg++QNuef04WPRURy ZHjo9hROuYaiSq1csd1h/W17QJQkRwNv5b/0T9VCymwERn2JQtPPM5ofxuDgJ3XR/qmc wGve+St8AXBF1l8tOjXqV8M4T6xxoA/erK1iUj8a7RwXTpV5wBZYWdRAjMN/3KpE9DCj 7ixVqpmBzPhrYE978kRq7rzGieXdye3+BTi7k7UourOnDreM7r7Mxl+PkQFF1gul4cMQ TQ== Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 346ecdg8jf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Oct 2020 23:32:18 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 09F3R28h013455; Thu, 15 Oct 2020 03:32:18 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma05wdc.us.ibm.com with ESMTP id 3434k9ehrx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Oct 2020 03:32:17 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 09F3WHP520971914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Oct 2020 03:32:17 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E110124054; Thu, 15 Oct 2020 03:32:17 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44E5E124053; Thu, 15 Oct 2020 03:32:15 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.199.63.66]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 15 Oct 2020 03:32:14 +0000 (GMT) From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> To: linux-mm@kvack.org, linux-riscv@lists.infradead.org Cc: akpm@linux-foundation.org, Anshuman Khandual <anshuman.khandual@arm.com>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> Subject: [PATCH] mm/debug_vm_pgtable: Avoid kernel crash with riscv Date: Thu, 15 Oct 2020 09:02:06 +0530 Message-Id: <20201015033206.140550-1-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-10-15_01:2020-10-14,2020-10-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxlogscore=917 malwarescore=0 mlxscore=0 clxscore=1015 phishscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010150022 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
mm/debug_vm_pgtable: Avoid kernel crash with riscv
|
expand
|
diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index c36530c69e33..98b101a8fd2a 100644 --- a/mm/debug_vm_pgtable.c +++ b/mm/debug_vm_pgtable.c @@ -548,7 +548,9 @@ static void __init pte_clear_tests(struct mm_struct *mm, pte_t *ptep, pte_t pte = pfn_pte(pfn, prot); pr_debug("Validating PTE clear\n"); +#ifndef CONFIG_RISCV pte = __pte(pte_val(pte) | RANDOM_ORVALUE); +#endif set_pte_at(mm, vaddr, ptep, pte); barrier(); pte_clear(mm, vaddr, ptep);
It was observed that the usage of RANDOM_ORVALUE with a valid pte cause kernel crash on riscv. Comment out the usage of random value on riscv Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> --- mm/debug_vm_pgtable.c | 2 ++ 1 file changed, 2 insertions(+)