From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 8371EC6369E for ; Thu, 19 Nov 2020 17:20:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E90D246F3 for ; Thu, 19 Nov 2020 17:20:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="KtKkL/bD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728987AbgKSRUH (ORCPT ); Thu, 19 Nov 2020 12:20:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727677AbgKSRUH (ORCPT ); Thu, 19 Nov 2020 12:20:07 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CC27C0613CF for ; Thu, 19 Nov 2020 09:20:07 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id l11so9419177lfg.0 for ; Thu, 19 Nov 2020 09:20:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kdtThT2vJGo6Wdq53TPlyIKnQQ6EAzbrw7SbM7qAaa4=; b=KtKkL/bDLeFxOu5LQGzpdhHGbQcQiZojE1Hwikc0m0D212LbNnl+k45phZKTDGy1eB 96t/WiI8l4XGutRfemSkL6TPvDyFyWWNpvGV5SPJIJZa3sFF0WeQwNdrSR4OGyrEHFFp mLVxA8UY9dwUahqDuuxY6hmT6SvIWpNxxB4w4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kdtThT2vJGo6Wdq53TPlyIKnQQ6EAzbrw7SbM7qAaa4=; b=VdVItZADSqlhus/kvVzZ5FHIXK+NN8axs2CuaXJx1rsueI17uCx9ORkSYG3Usgl7JY 6ZpbsBDnbeMbUM6pnISjZuQwD35lPH5g30XB8Du7A1uIsrPezJDpqK72oakEdxpsY3IF Fp7zcBc9t9/7mtT0eBbXP/lfCA4Rb0aoVX2ODfvpxyjYLHlkmGll720Elo10r1rP2Nz+ 9h+L/y6munYpEmHAX8QZGbk6MRp31MdN0jojZ7jcBv1liN4U3KV+IoDZyqzgGCm7gYiv 9oaBHInKImU+BhuYDO0xS+zhNpUGPNpMxGjXWbo7KlV648OVpZa1i9k+pvtTsmDH6fhM pI/Q== X-Gm-Message-State: AOAM533wqH21hcs1lBWwL6de2f8IQMLLVQLd01bQM+m91t33YLWxkBeE d4gNXxQkSlIJ/V31e1T4G8sUre/0hHrOzA== X-Google-Smtp-Source: ABdhPJyK4N2sVtSk0e4Aq5btYjbasUTeqpdWY3OngrkivsALxTM2f2vJe7pE8YpfIjdYzWXZL8VUaQ== X-Received: by 2002:a19:8346:: with SMTP id f67mr7499300lfd.569.1605806404853; Thu, 19 Nov 2020 09:20:04 -0800 (PST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id y12sm27016lfh.120.2020.11.19.09.20.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Nov 2020 09:20:03 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id y16so7107366ljk.1 for ; Thu, 19 Nov 2020 09:20:02 -0800 (PST) X-Received: by 2002:a2e:8e33:: with SMTP id r19mr5940506ljk.102.1605806402308; Thu, 19 Nov 2020 09:20:02 -0800 (PST) MIME-Version: 1.0 References: <20201118194838.753436396@linutronix.de> <20201118204007.028261233@linutronix.de> <20201119084601.GG3306@suse.de> In-Reply-To: <20201119084601.GG3306@suse.de> From: Linus Torvalds Date: Thu, 19 Nov 2020 09:19:46 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch V4 2/8] mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP To: Mel Gorman Cc: Thomas Gleixner , LKML , "the arch/x86 maintainers" , Christoph Hellwig , Matthew Wilcox , Daniel Vetter , Andrew Morton , Linux-MM , Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 19, 2020 at 12:46 AM Mel Gorman wrote: > > And not start thinking it as a security hardening option. It's probably the reverse of a hardening option, since it will cause mapping of stuff in known and controllable virtual addresses. Although any kmap'able page is likely to already be something you can read anyway (ie page cache long after security checks have been done). So it probably really doesn't matter either way. The only thing that is certain is that it's going to slow down important code-paths. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 A8E87C63697 for ; Thu, 19 Nov 2020 17:20:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EAF2B2469D for ; Thu, 19 Nov 2020 17:20:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="KtKkL/bD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAF2B2469D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D7D506B0036; Thu, 19 Nov 2020 12:20:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D2D996B005D; Thu, 19 Nov 2020 12:20:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C42B66B0068; Thu, 19 Nov 2020 12:20:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 948E96B0036 for ; Thu, 19 Nov 2020 12:20:08 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 254073649 for ; Thu, 19 Nov 2020 17:20:08 +0000 (UTC) X-FDA: 77501830896.10.alarm66_45175bd27344 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 00F8516A4AD for ; Thu, 19 Nov 2020 17:20:07 +0000 (UTC) X-HE-Tag: alarm66_45175bd27344 X-Filterd-Recvd-Size: 4366 Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Thu, 19 Nov 2020 17:20:07 +0000 (UTC) Received: by mail-lj1-f194.google.com with SMTP id 142so7066459ljj.10 for ; Thu, 19 Nov 2020 09:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kdtThT2vJGo6Wdq53TPlyIKnQQ6EAzbrw7SbM7qAaa4=; b=KtKkL/bDLeFxOu5LQGzpdhHGbQcQiZojE1Hwikc0m0D212LbNnl+k45phZKTDGy1eB 96t/WiI8l4XGutRfemSkL6TPvDyFyWWNpvGV5SPJIJZa3sFF0WeQwNdrSR4OGyrEHFFp mLVxA8UY9dwUahqDuuxY6hmT6SvIWpNxxB4w4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kdtThT2vJGo6Wdq53TPlyIKnQQ6EAzbrw7SbM7qAaa4=; b=ZKlOajoGGJ8WwKpFEdds1rBakXhdSH3vHMoqoNIeKxIvlJbjYY448dg4VWNSzBih5Y GRgZfSWFxdniHL15Luf2asWlF+rTW2GDvvBdg9wh0WGGsfxcVcU8NYW9umC2f+UEmV+4 ctkrUfnlQjTQ9eXA2+5h2WONKSvu+2HcUKl+ia3Q0MACm3DUDkeTFfmQEOsK6k5rINmn 791OgBMZKY75PfRnhnUzqvga7s3n7N1Li4dtfyY81lR+ftrVBOgR/3iS3fF35Hbagmil ufsAWKNaHCMAOHhBG0rP44PAZYK9QBq6SWLb02Oki7fFOQtOsJyYVCpaUdr84AM+ciNT L7zw== X-Gm-Message-State: AOAM533aBP0rGzqnb3CsIHfuIlppMG99veSQKrOoPJDge5hMmSsXHyIH NFhKvu7S7MbtOM7SthOuedV7jTOIK3Ft7w== X-Google-Smtp-Source: ABdhPJyQMIdk5oeQXVSJkW8ZAqjYGeLzMiVlZTx8VN6J/xHx0R3SIxuvc1YcWTHjcDRBWGS0l3snSg== X-Received: by 2002:a2e:8808:: with SMTP id x8mr5954839ljh.384.1605806405526; Thu, 19 Nov 2020 09:20:05 -0800 (PST) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id w22sm16379ljm.20.2020.11.19.09.20.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Nov 2020 09:20:03 -0800 (PST) Received: by mail-lj1-f181.google.com with SMTP id b17so7029813ljf.12 for ; Thu, 19 Nov 2020 09:20:02 -0800 (PST) X-Received: by 2002:a2e:8e33:: with SMTP id r19mr5940506ljk.102.1605806402308; Thu, 19 Nov 2020 09:20:02 -0800 (PST) MIME-Version: 1.0 References: <20201118194838.753436396@linutronix.de> <20201118204007.028261233@linutronix.de> <20201119084601.GG3306@suse.de> In-Reply-To: <20201119084601.GG3306@suse.de> From: Linus Torvalds Date: Thu, 19 Nov 2020 09:19:46 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch V4 2/8] mm/highmem: Provide CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP To: Mel Gorman Cc: Thomas Gleixner , LKML , "the arch/x86 maintainers" , Christoph Hellwig , Matthew Wilcox , Daniel Vetter , Andrew Morton , Linux-MM , Peter Zijlstra , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira Content-Type: text/plain; charset="UTF-8" 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: On Thu, Nov 19, 2020 at 12:46 AM Mel Gorman wrote: > > And not start thinking it as a security hardening option. It's probably the reverse of a hardening option, since it will cause mapping of stuff in known and controllable virtual addresses. Although any kmap'able page is likely to already be something you can read anyway (ie page cache long after security checks have been done). So it probably really doesn't matter either way. The only thing that is certain is that it's going to slow down important code-paths. Linus