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 4BB69C433F5 for ; Thu, 9 Sep 2021 17:35:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C4F961108 for ; Thu, 9 Sep 2021 17:35:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236506AbhIIRgY (ORCPT ); Thu, 9 Sep 2021 13:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237190AbhIIRgW (ORCPT ); Thu, 9 Sep 2021 13:36:22 -0400 Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72173C061574 for ; Thu, 9 Sep 2021 10:35:12 -0700 (PDT) Received: by mail-lj1-x22c.google.com with SMTP id l18so4164659lji.12 for ; Thu, 09 Sep 2021 10:35:12 -0700 (PDT) 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=5I/p9vgdVC2lD0iwMlo1HNJ1u/3WVtIOcQkI802FYRs=; b=T7vayAUmpXvqbxqhJLahdGloeJKPXoCKZVVhQ1VK2HqSTvDVA0n8hY4Sw4Tyd3frWM lV2+7TKHSGkxOMhuaLiKg2ehGDHDl66WK0/seFZfwnIOaCMY3dm2g6skqWNZx8XmkwEI apspY5qzRYaHG/duUp7Kh1N3Gga025Ml9knXU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5I/p9vgdVC2lD0iwMlo1HNJ1u/3WVtIOcQkI802FYRs=; b=dKTbp8fczsz/2zfiqCxzGsydtTlsPRby3Xv/oUUzHFSFYZ8RAyU01NMhP5bRv0Uku1 tiL3fGoxfmZ2TtQv46WjB0bB4AhNYUaZOiihtKFS9QfxBsmJdyMHu5DKuIdHxyESD3Wb Q1DK65OEekafzwtNy+27vrMNeJZzGuiUdYNCxuwCmMHlaHROP7QcO2TjkhU6pyqD/IXk tsMvdwcn8l4Q6ftAnIGd2iiwauq4vkklBZcGXrsDJcQksu9M46r8d1t2ZaTZu3qS4pZp pXxpsYlJKE0OsUYbkdfS7nfKuNUR07RxwJha+NVs4J+94u7IfK3y4CV5JfL+ot/ahqjQ 1D4A== X-Gm-Message-State: AOAM531rnyB8aErSsSenySWlxGK1n3wH1DiSM3D1kxvn36inNGJDGoyr M7wNN83e1ygNmbL337QXsyHSUunXevl2r4bppWA= X-Google-Smtp-Source: ABdhPJwH7fmwciU52cmHi/sch+ldG4ytEIEnxsutF+V/WN4YkbDX8+Jfb10DmhUI5xa6lp66aMwImQ== X-Received: by 2002:a2e:99d9:: with SMTP id l25mr796784ljj.217.1631208910592; Thu, 09 Sep 2021 10:35:10 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id d7sm269081ljc.129.2021.09.09.10.35.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 10:35:09 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id r3so4202624ljc.4 for ; Thu, 09 Sep 2021 10:35:09 -0700 (PDT) X-Received: by 2002:a05:651c:94:: with SMTP id 20mr846463ljq.164.1631208909475; Thu, 09 Sep 2021 10:35:09 -0700 (PDT) MIME-Version: 1.0 References: <20210907195226.14b1d22a07c085b22968b933@linux-foundation.org> <20210908025730.S88ylmikU%akpm@linux-foundation.org> In-Reply-To: From: Linus Torvalds Date: Thu, 9 Sep 2021 10:34:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [External] Re: [patch 079/147] fs/proc/kcore.c: add mmap interface To: Feng Zhou Cc: Andrew Morton , Alexey Dobriyan , chenying.kernel@bytedance.com, Linux-MM , mm-commits@vger.kernel.org, Mike Rapoport , Muchun Song , zhouchengming@bytedance.com, zhengqi.arch@bytedance.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org On Thu, Sep 9, 2021 at 10:32 AM Linus Torvalds wrote: > > This is basically a very dangerous interface. The fact that it is > read-only doesn't change that at all. Just to clarify - we've done dangerous interfaces in the past. We probably have tons of them still that I haven't even thought about, and I think I can hear somebody sniggering from miles away about various bugs that cause much more obvious security holes that I didn't think of. But the fact that we might have other holes that can be misused, doesn't mean we have to add new ones that seem to be almost designed for misuse. 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 D23B1C433EF for ; Thu, 9 Sep 2021 17:35:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6F13561131 for ; Thu, 9 Sep 2021 17:35:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6F13561131 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=kvack.org Received: by kanga.kvack.org (Postfix) id ACA386B006C; Thu, 9 Sep 2021 13:35:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A79256B0072; Thu, 9 Sep 2021 13:35:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 91ACF6B0073; Thu, 9 Sep 2021 13:35:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id 7F9556B006C for ; Thu, 9 Sep 2021 13:35:13 -0400 (EDT) Received: from smtpin36.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2DC788249980 for ; Thu, 9 Sep 2021 17:35:13 +0000 (UTC) X-FDA: 78568736106.36.467516F Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf14.hostedemail.com (Postfix) with ESMTP id CB7266001980 for ; Thu, 9 Sep 2021 17:35:12 +0000 (UTC) Received: by mail-lf1-f48.google.com with SMTP id k4so5186882lfj.7 for ; Thu, 09 Sep 2021 10:35:12 -0700 (PDT) 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=5I/p9vgdVC2lD0iwMlo1HNJ1u/3WVtIOcQkI802FYRs=; b=T7vayAUmpXvqbxqhJLahdGloeJKPXoCKZVVhQ1VK2HqSTvDVA0n8hY4Sw4Tyd3frWM lV2+7TKHSGkxOMhuaLiKg2ehGDHDl66WK0/seFZfwnIOaCMY3dm2g6skqWNZx8XmkwEI apspY5qzRYaHG/duUp7Kh1N3Gga025Ml9knXU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5I/p9vgdVC2lD0iwMlo1HNJ1u/3WVtIOcQkI802FYRs=; b=DczSZu2YW2l+feA4kV9rgSLvA9ykFLGL6/qIcdkgFDJsRgzgcozg/B4whQKGq+zZ4y q01j7/LokB6QmlqQfF8pr1X2APUuYPo9HLReatwtvplvIgg5mXxlqkb3UzKKaQNF+0ew vRJ7Zbm9O20Tr8asATZTkSFRhFKPjK6qmpHftCO5ykti+E5yjSLpr4S1xtWqiwteEvzQ hunhCcQSJrHDU29AT1XFDD7vLQIyP8Cx6nuxVTou6QdO68wbCgkcOW3yHxlRewBgJUHW Qv9A8AkEpmcYuPg3BpRhJGIYpf2Ksji35Xdg1frMyOisdx1uUbsOtp0miEDXNhCtoqfC /itA== X-Gm-Message-State: AOAM532H2hBLvFXT44deaV0e3AD0pWeti9MsDisk+o8eILcTDBhOL4Fv z8w1K48drNLov+Gq40bORUl14wWNnyjAfGTPhf8= X-Google-Smtp-Source: ABdhPJwhNWN81jcqqXrgHYd3wzc5SsTcG/8H/bEJENpmO41HHrfq5480kKNbnnwZSKIN6Jk0haT1dQ== X-Received: by 2002:a19:dc0f:: with SMTP id t15mr744161lfg.353.1631208911157; Thu, 09 Sep 2021 10:35:11 -0700 (PDT) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com. [209.85.208.171]) by smtp.gmail.com with ESMTPSA id w16sm262963lfn.83.2021.09.09.10.35.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Sep 2021 10:35:10 -0700 (PDT) Received: by mail-lj1-f171.google.com with SMTP id h1so4197626ljl.9 for ; Thu, 09 Sep 2021 10:35:09 -0700 (PDT) X-Received: by 2002:a05:651c:94:: with SMTP id 20mr846463ljq.164.1631208909475; Thu, 09 Sep 2021 10:35:09 -0700 (PDT) MIME-Version: 1.0 References: <20210907195226.14b1d22a07c085b22968b933@linux-foundation.org> <20210908025730.S88ylmikU%akpm@linux-foundation.org> In-Reply-To: From: Linus Torvalds Date: Thu, 9 Sep 2021 10:34:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [External] Re: [patch 079/147] fs/proc/kcore.c: add mmap interface To: Feng Zhou Cc: Andrew Morton , Alexey Dobriyan , chenying.kernel@bytedance.com, Linux-MM , mm-commits@vger.kernel.org, Mike Rapoport , Muchun Song , zhouchengming@bytedance.com, zhengqi.arch@bytedance.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: CB7266001980 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=T7vayAUm; dmarc=none; spf=pass (imf14.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.48 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Stat-Signature: 6bsoda4gangawxasg3kcuusye56w6p9e X-HE-Tag: 1631208912-309179 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, Sep 9, 2021 at 10:32 AM Linus Torvalds wrote: > > This is basically a very dangerous interface. The fact that it is > read-only doesn't change that at all. Just to clarify - we've done dangerous interfaces in the past. We probably have tons of them still that I haven't even thought about, and I think I can hear somebody sniggering from miles away about various bugs that cause much more obvious security holes that I didn't think of. But the fact that we might have other holes that can be misused, doesn't mean we have to add new ones that seem to be almost designed for misuse. Linus