Received: by 10.213.65.68 with SMTP id h4csp692502imn; Wed, 4 Apr 2018 05:47:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx49es7G+8e47C22XZAfVcLHVxqBQ2p5IvUEw8Haf6jy+I1e/rrkTfmcMm+pWxXHyPOjNcKUp X-Received: by 10.98.211.211 with SMTP id z80mr13650994pfk.16.1522846079761; Wed, 04 Apr 2018 05:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522846079; cv=none; d=google.com; s=arc-20160816; b=fynUVA4YL+4ys/HmSF/ApOwldZiFvzirxPhSV/Ud4y5tza+hK8AByMa5gkH9aCa8gn 8FwXJWQGyUZKGfk9D+cZUnd4BAqgGUQmTZExj4JtwzEEWHLmu0t/o+1gMwQFpeQxbV7s iKu5vIYCmYh8uSNPLziYRp0OyI0nOJogJBwhQssMCeScFDyx9NgWHW0VHkE9OonieEV+ lV9lSfMuBFrsEOQKWW6/XgEWMjD0XSiAYhkPKmdRKhvyPsFfvWX6Kxmv/yLHTcVt85oA XDAUblZguCq72o4I4E4UweHK3xQUSlvmv8YMuzNfM70dRZxlhmgITApa5kxk+mRDypos EoXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=rvQP0BIZ+nDxGZiSPHQoCoqxzQfakq7sTpRobzSF7U4=; b=MBlrilzomAExbdOCI6XhBeoKO42jZqCA6MUKWRVIQWB2Q2oyDXB1sPEBmf+Jj+h8a5 BrG1ayjBEPpW1KWzEyrOqfvSnc3kW147GgQrFJYUVQl4sYdjhjEl5QwbKkeDzHEqKTSL sCUAtnPdxxaxr2StG7y0QSP/+U4aVARV6Zk1R4M6UccRb9SXW4Pd6h/Gy91PFwN6Iqi2 cYW/YPM5wAMJKH6i4/y5keDZREogqRz20Edu8S4Go8Bx2eUpceA4RL5EhzTTRQXRYlYf nxuindyczJ5VJRrYExA53DFYZ/Mdk7ulT6MX125KAAS08ampetcNQ7Odf1tTW7lt/vjD aoFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HOrBG2ev; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71-v6si6427953plf.244.2018.04.04.05.47.46; Wed, 04 Apr 2018 05:47:59 -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; dkim=pass header.i=@linaro.org header.s=google header.b=HOrBG2ev; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751779AbeDDMqY (ORCPT + 99 others); Wed, 4 Apr 2018 08:46:24 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:54449 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556AbeDDMqW (ORCPT ); Wed, 4 Apr 2018 08:46:22 -0400 Received: by mail-it0-f67.google.com with SMTP id h143-v6so27956589ita.4 for ; Wed, 04 Apr 2018 05:46:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rvQP0BIZ+nDxGZiSPHQoCoqxzQfakq7sTpRobzSF7U4=; b=HOrBG2evjWyBn6uf38jrt7Fdyg8QQm/e/vv1uBP/aWcft6l0ule/Yi/69WROBdw1JO VhRRQsATMC5gUF2S1NHJr1+BN0GiBgRXmJxpSUP1pF1yGqvIvJiP2P5SvP0vPax9N8MJ 8Owe1iUt6uQ4luAsYaMJq0KVqBTY06hWYHHPU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rvQP0BIZ+nDxGZiSPHQoCoqxzQfakq7sTpRobzSF7U4=; b=ZkX29QUDCdFd3630GsahB6SqeopVWKqT+dyx/H2mYLDqfzzHFK6mYZuln2EHhAKsDU h9jpHo3PR3uXWUgiatZN8J5gm8/O4I4TqC7OwytlNykOwrpvZeUHd9TKEWM1vxKS23jm x0ajTorzg8mUWYwjXKMSoLdt6TC+U4dbp3Y1HSSO7pBKv4H2XKbILLyIB1JJEoeqtzjk NTB4+f13ZtHIVVfG6jYenHfvTQUqwSWtCYhQ6h7UcyT0JlkNq6DfV3P+ZIOp5SgUP/Pa XyG1CwH54jiLMiICkkk/uha6nXwGy0FJCz6BBTwkD/VK37lSX5bok9BmsUJbLfZ6sRBc ST3g== X-Gm-Message-State: ALQs6tBK3HttbmumsHd4e5Dn3vTvUDUtR2TJOjCOcAufs5DYoGk5eWuZ 1/MrxuzG0UUsQA1aFFt90baW5OE34sVwLKK+PVNAww== X-Received: by 2002:a24:338c:: with SMTP id k134-v6mr8997005itk.86.1522845981526; Wed, 04 Apr 2018 05:46:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.101.23 with HTTP; Wed, 4 Apr 2018 05:46:21 -0700 (PDT) In-Reply-To: <1519731229-19141-1-git-send-email-harish_kandiga@mentor.com> References: <1519731229-19141-1-git-send-email-harish_kandiga@mentor.com> From: Ulf Hansson Date: Wed, 4 Apr 2018 14:46:21 +0200 Message-ID: Subject: Re: [PATCH] mmc: card: Don't show eMMC RPMB and BOOT areas in /proc/partitions To: Harish Jenny K N Cc: Linus Walleij , Adrian Hunter , Shawn Lin , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27 February 2018 at 12:33, Harish Jenny K N wrote: > From: Andrew Gabbasov > > Since RPMB area is accessible via special ioctl only and boot areas > are unlikely to contain any partitions, exclude them all from listing > in /proc/partitions. This will hide them from various user-level > software (e.g. fdisk), thus avoiding unnecessary access attempts. > > Signed-off-by: Andrew Gabbasov > Signed-off-by: Harish Jenny K N Queued up for 3.18, thanks! Kind regards Uffe > --- > drivers/mmc/core/block.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c > index 20135a5..376e47e 100644 > --- a/drivers/mmc/core/block.c > +++ b/drivers/mmc/core/block.c > @@ -2341,7 +2341,8 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, > set_disk_ro(md->disk, md->read_only || default_ro); > md->disk->flags = GENHD_FL_EXT_DEVT; > if (area_type & (MMC_BLK_DATA_AREA_RPMB | MMC_BLK_DATA_AREA_BOOT)) > - md->disk->flags |= GENHD_FL_NO_PART_SCAN; > + md->disk->flags |= GENHD_FL_NO_PART_SCAN > + | GENHD_FL_SUPPRESS_PARTITION_INFO; > > /* > * As discussed on lkml, GENHD_FL_REMOVABLE should: > -- > 1.9.1 >