From patchwork Tue Dec 18 10:34:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin 'ldir' Darbyshire-Bryant X-Patchwork-Id: 1015259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=darbyshire-bryant.me.uk Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XKlHMFh6"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=darbyshire-bryant.me.uk header.i=@darbyshire-bryant.me.uk header.b="KeXuPHm7"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43JvYQ0NHtz9s3q for ; Tue, 18 Dec 2018 21:35:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-ID:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3yzlWDMoqdwI8desSl+cQ4xofgEjnokO2aHIHbxAJq8=; b=XKlHMFh6cCqskx V6icwbOWcSCiOguxVe1UUD9CsG1R0wsPMpTaGGFwK4yrH4/YDCU2YLfdaJ3kmFuDpmcXQUqswCUU4 f6YeNk3Ws1ZXXPijobiXHyAtSh9r0uyv3lqgWm0nbvq21vqtKJKk/HAgWqsfTx0rXDnDIeRBsEX0f AxzH+rd3KxoiYsmEnv0APh1hjqFEjsjHjUr01+mmlONfkxVIwqmDtznv6xVjtvvWRru+tLu66mz2F uhZnyYs8fVnvwYybN5VXaxg8HgX88ixNWcws64QcPoy30r7HVgbzFPaHWwqhIVQ9qJ2bf6BorGnOf hfy13eV5O9N94qKfayfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZCiR-0005de-AM; Tue, 18 Dec 2018 10:35:07 +0000 Received: from mail-eopbgr50041.outbound.protection.outlook.com ([40.107.5.41] helo=EUR03-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZCiO-0005BT-7P for openwrt-devel@lists.openwrt.org; Tue, 18 Dec 2018 10:35:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=darbyshire-bryant.me.uk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1EtbNl5n2xiVPkQqcyp0eJzdsVdEojwmAIm5WNjBgug=; b=KeXuPHm71m41hsMSrycRtDCT7BF5GDMFr1WFjr9avMiW64hraSF5TiHOXGwZroU7+QaKuL/ij1p1JyZ/rSoepw9RdaOhbl5LLJ6hUmWzlMFyw0Gx5/us0Ae0s2g79tvHqdoY8kZs0wPUqKHhmxZUL2ivR+Y+xCl3N8s1Qclmxmg= Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com (10.171.105.143) by VI1PR0302MB2608.eurprd03.prod.outlook.com (10.171.104.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1446.17; Tue, 18 Dec 2018 10:34:35 +0000 Received: from VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::d77:d217:1660:c5d4]) by VI1PR0302MB2750.eurprd03.prod.outlook.com ([fe80::d77:d217:1660:c5d4%2]) with mapi id 15.20.1425.023; Tue, 18 Dec 2018 10:34:35 +0000 From: Kevin 'ldir' Darbyshire-Bryant To: "openwrt-devel@lists.openwrt.org" Thread-Topic: [RFC PATCH] kernel: drop MIPS: fix cache flushing for highmem pages Thread-Index: AQHUlr1Fows04bIlvU+/Z86pXEsS/w== Date: Tue, 18 Dec 2018 10:34:35 +0000 Message-ID: <20181218103420.38148-1-ldir@darbyshire-bryant.me.uk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: LO2P265CA0251.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::23) To VI1PR0302MB2750.eurprd03.prod.outlook.com (2603:10a6:800:e2::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=ldir@darbyshire-bryant.me.uk; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2a02:c7f:1240:ee00::dc83] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0302MB2608; 6:nNtmHkYDtNOj+x/3kne5RA9yLd14KyCdX1oj3WDuRe0aDcK4jmaPLYayCfljF2nO9rB+VvWg5AQafaTPq3BPwvBfajC+MiqaaixhZYi3eNNsRTE6lQuRwYqi4CWSBhlwLAEPZRdblBMxfh7ptcNcDpdJjChugY8GUfvO9H10S9wI588QAdT/Ir7nOCzBV69Zcs843NS5rarhpFNAFwYPiyzUNoH/m5wMp2oD3MvtXEMCGCKcNNZLd+2dgSM+ka1sfy/bjd6xUx3AEeC+c5Lm6uTQR2wk1Nklt6vYlYCKB7nUBqva7jg2KeC+ilqfdgYlflndKb72CPcB/1C3yYRQKR/tVHhpo1Jdha2UdtGgCHLMyOAUJbr7liOepNdxaA2iq7W4284BawUrhF88ZZQBPRBD4y2C7Lgt1TPDlGX+py9mAYKkbG+/Eftbzbe8cb0laGh1NY6zxM3i0O3ioODECA==; 5:Tg/VtnVp/pB8kL0SZgVS/TcpRppb0VycmMC459ZuNjlq7YKlcPyMmu4+Vps7yNWgeMcCYoCKFHP/tqG6gcNjR6egmIBZeULtUVmj3fWURU24YABOF8qwQFRpyd+P5S1aFro26jRwWgKyBCgO87MLW1mc3kDuS1bXVa62oP6rbi4=; 7:7bQMStChKAykeVj9RRNzyMgDnCQ+WIb+MK+ysiE25rIvzyz+jHxeyfYlNet8VxNaSIP0/9ejT8uih19pD9BwEpcCrve8euA1pFhpI05iwdDRBXyiOWxXQxoeVj5vestwe06rD3wMGvVeziD5FstIJA== x-ms-office365-filtering-correlation-id: 531ecf8d-2897-4241-1ed5-08d664d46793 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0302MB2608; x-ms-traffictypediagnostic: VI1PR0302MB2608: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(3230021)(999002)(6040522)(2401047)(5005006)(8121501046)(3231475)(944501520)(52105112)(93006095)(93001095)(10201501046)(3002001)(148016)(149066)(150057)(6041310)(20161123562045)(20161123564045)(2016111802025)(20161123558120)(20161123560045)(6043046)(201708071742011)(7699051)(76991095); SRVR:VI1PR0302MB2608; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0302MB2608; x-forefront-prvs: 08902E536D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39830400003)(396003)(376002)(136003)(366004)(346002)(199004)(189003)(14444005)(508600001)(386003)(52116002)(102836004)(6506007)(256004)(6436002)(4326008)(107886003)(7736002)(186003)(305945005)(46003)(14454004)(6116002)(74482002)(2616005)(476003)(2351001)(486006)(6916009)(25786009)(2906002)(5660300001)(106356001)(8936002)(105586002)(6486002)(8676002)(81156014)(81166006)(71190400001)(36756003)(71200400001)(316002)(68736007)(97736004)(86362001)(2501003)(1076003)(53936002)(6512007)(5640700003)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0302MB2608; H:VI1PR0302MB2750.eurprd03.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: darbyshire-bryant.me.uk does not designate permitted sender hosts) x-microsoft-antispam-message-info: xS0PAdZ2ExAvf4AVZYSqc92dR7U08kDnDFR9W+YavbKp/j3v5sQIDnUZXpQSen2M83yEzwyWCmbpw/mMoabgajgvmpewENXuocB5j245tWMPK6pLBla5xbIe2IU1YKyxVS3zG3LqcGKRtYqJYSglJOLFfMFX6lJToZFuL9iR3hg6ofqpeyeQ2UDl8uZKdvWHBqDF9HI0FN1ie0BipEoQGprrjxRHBb+1OeOWblfcti4ZJNYCGYybCVFSw/j0xqRr7N9qER1Fc8D9xCq4en/si1sz4qsec1IjL/RbSa7EK5MtEYz1GHUxAuiR/FdsOrcb spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: darbyshire-bryant.me.uk X-MS-Exchange-CrossTenant-Network-Message-Id: 531ecf8d-2897-4241-1ed5-08d664d46793 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2018 10:34:35.6636 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9151708b-c553-406f-8e56-694f435154a4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0302MB2608 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181218_023504_326451_92FB8AFF X-CRM114-Status: GOOD ( 11.06 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [40.107.5.41 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [RFC PATCH] kernel: drop MIPS: fix cache flushing for highmem pages X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin 'ldir' Darbyshire-Bryant Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Signed-off-by: Kevin Darbyshire-Bryant --- This patch, in a variety of forms, has been around since beginning 2016 as e756c2bb07, ending up in present form 0aa6c7df60 (kernel 4.4.13 bump) and carried forward ever since. There have been a number of MIPS kernel memory handling changes since, including VDSO fixes that meant openwrt patches have been dropped with no apparent fallout. I'm basically wondering if this patch needs to still exist in the kernel 4.14.88 world? I have been running without this patch for 3+ months on Archer C7 v2 with no obvious ill effects (I'd expect to see "nasty segfaults and kernel crashes") If it does still need to exist, should it go upstream? Thoughts, comments, more testers? ...fix-cache-flushing-for-highmem-pages.patch | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 target/linux/generic/pending-4.14/100-MIPS-fix-cache-flushing-for-highmem-pages.patch diff --git a/target/linux/generic/pending-4.14/100-MIPS-fix-cache-flushing-for-highmem-pages.patch b/target/linux/generic/pending-4.14/100-MIPS-fix-cache-flushing-for-highmem-pages.patch deleted file mode 100644 index b1c65f7cd8..0000000000 --- a/target/linux/generic/pending-4.14/100-MIPS-fix-cache-flushing-for-highmem-pages.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Felix Fietkau -Subject: MIPS: fix cache flushing for highmem pages - -Most cache flush ops were no-op for highmem pages. This led to nasty -segfaults and (in the case of page_address(page) == NULL) kernel -crashes. - -Fix this by always flushing highmem pages using kmap/kunmap_atomic -around the actual cache flush. This might be a bit inefficient, but at -least it's stable. - -Signed-off-by: Felix Fietkau ---- - ---- a/arch/mips/mm/cache.c -+++ b/arch/mips/mm/cache.c -@@ -116,6 +116,13 @@ void __flush_anon_page(struct page *page - { - unsigned long addr = (unsigned long) page_address(page); - -+ if (PageHighMem(page)) { -+ addr = (unsigned long)kmap_atomic(page); -+ flush_data_cache_page(addr); -+ __kunmap_atomic((void *)addr); -+ return; -+ } -+ - if (pages_do_alias(addr, vmaddr)) { - if (page_mapcount(page) && !Page_dcache_dirty(page)) { - void *kaddr;