From: Alex Lemberg <Alex.Lemberg@wdc.com>
To: Harish Jenny K N <harish_kandiga@mentor.com>,
"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"shawn.lin@rock-chips.com" <shawn.lin@rock-chips.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: card: Don't show eMMC RPMB and BOOT areas in /proc/partitions
Date: Tue, 27 Feb 2018 14:56:26 +0000 [thread overview]
Message-ID: <CB89C150-B842-475C-A53A-C6FE7E8A710A@wdc.com> (raw)
In-Reply-To: <1519731229-19141-1-git-send-email-harish_kandiga@mentor.com>
While RPMB partition requires special IOCTL
Thanks,
Alex
On 2/27/18, 1:34 PM, "linux-mmc-owner@vger.kernel.org on behalf of Harish Jenny K N" <linux-mmc-owner@vger.kernel.org on behalf of harish_kandiga@mentor.com> wrote:
From: Andrew Gabbasov <andrew_gabbasov@mentor.com>
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 <andrew_gabbasov@mentor.com>
Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-02-27 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 11:33 [PATCH] mmc: card: Don't show eMMC RPMB and BOOT areas in /proc/partitions Harish Jenny K N
2018-02-27 13:51 ` Shawn Lin
2018-02-27 14:56 ` Alex Lemberg [this message]
2018-02-27 14:58 ` Alex Lemberg
2018-03-01 5:34 ` Harish Jenny K N
2018-03-02 12:53 ` Linus Walleij
2018-03-06 12:47 ` Harish Jenny K N
2018-03-08 20:36 ` Alex Lemberg
2018-03-10 11:59 ` Linus Walleij
2018-03-12 4:44 ` Harish Jenny K N
2018-04-04 12:46 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CB89C150-B842-475C-A53A-C6FE7E8A710A@wdc.com \
--to=alex.lemberg@wdc.com \
--cc=adrian.hunter@intel.com \
--cc=harish_kandiga@mentor.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).