Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6412871imm; Wed, 27 Jun 2018 07:20:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcihh3IQpUnfGYMNLV6d7qPBy34y6aAGNIggDp9ntk1opldRsrJNEKzRU5/Rg6TjxFxte9C X-Received: by 2002:a62:ed13:: with SMTP id u19-v6mr6074327pfh.125.1530109226010; Wed, 27 Jun 2018 07:20:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530109225; cv=none; d=google.com; s=arc-20160816; b=HrHLBXyVvoFhn8vDk1epah0cLSKYuf/OrT+MUj6veVycRged3fC/mpjBTRixHskm1B S/tMaiNtpXG7BxPBVJ+nrVmShcyRtqmNMNZXqE+7K4GZMpl/d/11F7YrsU9LgIRW1XHs FfhhmUUNhdkoXdXZetjwKxC6Clahivm44y5GaXCuwyOsRCZwoEqbac1AIK6W9WjyHmn8 vVHhW2LFTCrsS+ZFagdRH85Mbs2TrxCelDhDDmhMWD69pEQreZjVnZlK/MQXjH9UyhNW U517ai7ktovlU5bABXXNuR3ksBgU2iTk/zYwusRJj5KA1QdKq+fAhzhRfmCulFWXWTR4 q0Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=T3ixyjz4+esgeg595yo5ZrGsOtwDb2/8nWR0T5QimR0=; b=NAkIZLu1m8GNVUrobu9rV3MQNtjGG6jHfY8pngXGL3b8V/EVjojyTsfMQkxUHHf7rT GGIpx02rFzglPqjJ83qGf60vxuMsvBexnLPfPu7HIPtBuYFYkvcegNc0TW7NZqsdYVm9 vQ4+U/8GyaWRfSVSKNadIJKbaUDeGAWS5SnlkoMpE4gFuuBZirh02yn6aj1tKxO9AcXC nuD2+oydx05cgCwqYO04yhg3dvsNMZskJ13GipkZ1bKtaP6nUsjmOtW1BShJQE6X21eP fsc9VRKQGkN833/vlFayZhEolECYcYvHJNWED6X67yzo/EblHxrK9DVrJKJQK0hz4axf KiMA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12-v6si3540112pgf.359.2018.06.27.07.20.11; Wed, 27 Jun 2018 07:20:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965360AbeF0OPv (ORCPT + 99 others); Wed, 27 Jun 2018 10:15:51 -0400 Received: from g4t3425.houston.hpe.com ([15.241.140.78]:29437 "EHLO g4t3425.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934614AbeF0OPr (ORCPT ); Wed, 27 Jun 2018 10:15:47 -0400 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3425.houston.hpe.com (Postfix) with ESMTP id 155018D; Wed, 27 Jun 2018 14:15:46 +0000 (UTC) Received: from misato.americas.hpqcorp.net (unknown [10.34.81.122]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id 2A0814A; Wed, 27 Jun 2018 14:15:45 +0000 (UTC) From: Toshi Kani To: mhocko@suse.com, akpm@linux-foundation.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Cc: cpandya@codeaurora.org, linux-mm@kvack.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/3] fix free pmd/pte page handlings on x86 Date: Wed, 27 Jun 2018 08:13:45 -0600 Message-Id: <20180627141348.21777-1-toshi.kani@hpe.com> X-Mailer: git-send-email 2.14.3 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes two issues in the x86 ioremap free page handlings for pud/pmd mappings. Patch 01 fixes BUG_ON on x86-PAE reported by Joerg. It disables the free page handling on x86-PAE. Patch 02-03 fixes a possible issue with speculation which can cause stale page-directory cache. - Patch 02 is from Chintan's v9 01/04 patch [1], which adds a new arg 'addr', with my merge change to patch 01. - Patch 03 adds a TLB purge (INVLPG) to purge page-structure caches that may be cached by speculation. See the patch descriptions for more detal. The patches are based off from the tip tree. [1] https://patchwork.kernel.org/patch/10371015/ v4: - Re-wrote patch 2/3 description. (v3-UPDATE) - Added NOTE to pud_free_pmd_page(). v3: - Fixed a build error in v2. v2: - Reordered patch-set, so that patch 01 can be applied independently. - Added a NULL pointer check for the page alloc in patch 03. --- Toshi Kani (2): 1/3 x86/mm: disable ioremap free page handling on x86-PAE 3/3 x86/mm: add TLB purge to free pmd/pte page interfaces Chintan Pandya (1): 2/3 ioremap: Update pgtable free interfaces with addr --- arch/arm64/mm/mmu.c | 4 +-- arch/x86/mm/pgtable.c | 61 +++++++++++++++++++++++++++++++++++++------ include/asm-generic/pgtable.h | 8 +++--- lib/ioremap.c | 4 +-- 4 files changed, 61 insertions(+), 16 deletions(-)