From patchwork Wed Jul 17 07:14:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 11047367 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3138138D for ; Wed, 17 Jul 2019 07:15:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE6D2205A8 for ; Wed, 17 Jul 2019 07:15:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B25AA2859F; Wed, 17 Jul 2019 07:15:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B773205A8 for ; Wed, 17 Jul 2019 07:15:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 952148E0001; Wed, 17 Jul 2019 03:14:54 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 834E46B000C; Wed, 17 Jul 2019 03:14:54 -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 60E8B6B0005; Wed, 17 Jul 2019 03:14:54 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by kanga.kvack.org (Postfix) with ESMTP id 1B8F66B0008 for ; Wed, 17 Jul 2019 03:14:54 -0400 (EDT) Received: by mail-ed1-f71.google.com with SMTP id d27so17430477eda.9 for ; Wed, 17 Jul 2019 00:14:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=gFaB4qI89d5CVVD3UTO1uMfi3o5ZKfpFbRPaT+kpMG0=; b=fPA6Y6DGqX+ayc2kRy0hgbRomtiCwZyFh1I9uBWeB7vTUO427ulGIbA7VJIHNo6aIz RQqQ5SEVyBPsYpf69A9/1s9g8PCQG4ATbSVJytsoz5bZSpqbMPMd/Whb3XliBcZ4fZJ0 5vo80To4Nd5Gpeynj8oL6V8lFjWmqMbTiTyZA23sr34ljQH3WER5jVivj0IGqLQvITy7 e5+VjhlkImOGmL8ZXNz1SGlauVNxYMuA5no6XdecnVS2rztzy0KYFIYGrjECqG2SHrpA yvAAB36cMdAwBmBAimPea8/foTAIDR9mqhJH7wAis7dqewbR1BEvhCn3tyLqaDgXBtrh R6Dg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of joro@8bytes.org designates 2a01:238:4383:600:38bc:a715:4b6d:a889 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org X-Gm-Message-State: APjAAAXzyFVjT60wSi/Tfe2qE4o0P1NMgXnKB7GAPYN6fLB+vS6VLXkO vA98h/0e4iZfcxBBmupJE7K/MjVbeeaudxld/veKupjod90//oJ8k7ar4jKzyEWEbcFts/nZN7X pshZzXNstUgMrrgv1paC7ActUMKxSDCLsTNt0cKSxhCz6C/3QwUPbtn6tbmpyECO3UQ== X-Received: by 2002:a17:906:69c4:: with SMTP id g4mr30072281ejs.9.1563347693708; Wed, 17 Jul 2019 00:14:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXAW1YUb8xacKIUgQADingUx04h8JIQgWUv4plR9jamwVZ2FUIlwW275Som46r2iT8jotX X-Received: by 2002:a17:906:69c4:: with SMTP id g4mr30072216ejs.9.1563347692575; Wed, 17 Jul 2019 00:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563347692; cv=none; d=google.com; s=arc-20160816; b=Jm3mYEs2xpFa2BJvZT3aOVGE9B8n9jPCKdYax+FB0WVZ0x41EJ6jJVbkxHlrw2ZAEy GYB0gLJssWo5/6R/el2wasRue1X0IwlwwusPSIvOfQDCW2DYs0rkn9J6Nv0G9+SOUCDB w2W/QLiIYVY2gGwQIyduvnGJGLvjRPGnpbeLHPImMaj9dkhfg9UVS5958gT5Q/oMUy6I 4lRMuftgvlNp5AuExvOwEuGPgresX/g3Y9ZdsspaC8kS8aRCT+bmIctW2fRnJdqczm4a t2KZT9xwVafUReAi2TGOT3cHIxyYb512g7eeNrjsu+PXBwgVN6caPc3mrokpIkCUFvZ7 bm9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=gFaB4qI89d5CVVD3UTO1uMfi3o5ZKfpFbRPaT+kpMG0=; b=KPhuiaSZVVwXcTS4AAA5wXXG4OOCIaMC8Liu4eZVSlBapw8vcXKOlGZ8TEIAkrH3KS 2J8i3VGPoOudCXyR/79hvnarwwQbXO2kQN5omZAO9jva1gEqFk91KnagIPpPudRK1e13 e66MCOb1ZHK02MZPpscG66w4iQKm7AkoQh1yT9zDs3OrY5uWlySEvqPo+v8av7yzCtyi Q13tWaDy+O6O3Wvxb16WKyb9TXDRLhEJqdgIg/4egyiYdAxI1JSwLo+aDhmqz+TQYSEv +v8dzWvfrPnFe35EXV1eJ+8OJu+5L64n/c4TFUg4iPzSlB9ucg/EG7gc14EpqqKQnisH lAWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of joro@8bytes.org designates 2a01:238:4383:600:38bc:a715:4b6d:a889 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: from theia.8bytes.org (8bytes.org. [2a01:238:4383:600:38bc:a715:4b6d:a889]) by mx.google.com with ESMTPS id x58si14146778eda.238.2019.07.17.00.14.52 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 00:14:52 -0700 (PDT) Received-SPF: pass (google.com: domain of joro@8bytes.org designates 2a01:238:4383:600:38bc:a715:4b6d:a889 as permitted sender) client-ip=2a01:238:4383:600:38bc:a715:4b6d:a889; Authentication-Results: mx.google.com; spf=pass (google.com: domain of joro@8bytes.org designates 2a01:238:4383:600:38bc:a715:4b6d:a889 as permitted sender) smtp.mailfrom=joro@8bytes.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: by theia.8bytes.org (Postfix, from userid 1000) id C5C11284; Wed, 17 Jul 2019 09:14:51 +0200 (CEST) From: Joerg Roedel To: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Joerg Roedel Subject: [PATCH 0/3 v2] Sync unmappings in vmalloc/ioremap areas Date: Wed, 17 Jul 2019 09:14:36 +0200 Message-Id: <20190717071439.14261-1-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 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: X-Virus-Scanned: ClamAV using ClamSMTP Hi, here is a small patch-set to sync unmappings in the vmalloc/ioremap areas between page-tables in the system. This is only needed x86-32 with !SHARED_KERNEL_PMD, which is the case on a PAE kernel with PTI enabled. On affected systems the missing sync causes old mappings to persist in some page-tables, causing data corruption and other undefined behavior. Please review. Thanks, Joerg Changes since v1: - Added correct Fixes-tags to all patches Joerg Roedel (3): x86/mm: Check for pfn instead of page in vmalloc_sync_one() x86/mm: Sync also unmappings in vmalloc_sync_one() mm/vmalloc: Sync unmappings in vunmap_page_range() arch/x86/mm/fault.c | 9 +++++---- mm/vmalloc.c | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-)