lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 5 Oct 2011 08:33:53 -0700 (PDT)
From:	Andrei Warkentin <awarkentin@...are.com>
To:	Namjae Jeon <linkinjeon@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	adrian hunter <adrian.hunter@...el.com>,
	linus walleij <linus.walleij@...aro.org>,
	james p freyensee <james_p_freyensee@...ux.intel.com>,
	sebras@...il.com, Ulf Hansson <Ulf.Hansson@...ricsson.com>,
	stefan xk nilsson <stefan.xk.nilsson@...ricsson.com>,
	per forlin <per.forlin@...ricsson.com>,
	johan rudholm <johan.rudholm@...ricsson.com>, cjb@...top.org,
	linux-mmc@...r.kernel.org
Subject: Re: [PATCH v11] mmc : general purpose partition support.

Hi,

----- Original Message -----
> From: "Namjae Jeon" <linkinjeon@...il.com>
> To: cjb@...top.org, linux-mmc@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org, awarkentin@...are.com, "adrian hunter" <adrian.hunter@...el.com>, "linus walleij"
> <linus.walleij@...aro.org>, "james p freyensee" <james_p_freyensee@...ux.intel.com>, sebras@...il.com, "Ulf Hansson"
> <Ulf.Hansson@...ricsson.com>, "stefan xk nilsson" <stefan.xk.nilsson@...ricsson.com>, "per forlin"
> <per.forlin@...ricsson.com>, "johan rudholm" <johan.rudholm@...ricsson.com>, "Namjae Jeon" <linkinjeon@...il.com>
> Sent: Wednesday, October 5, 2011 10:45:45 AM
> Subject: [PATCH v11] mmc : general purpose partition support.
> 
> It allows gerneral purpose partitions in MMC Device.
> And I try to simpliy make mmc_blk_alloc_parts using mmc_part
> structure suggested by Andrei Warkentin.
> After patching, we can see general purpose partitions like this.
> > cat /proc/partitions
>           179 0 847872 mmcblk0
>           179 192 4096 mmcblk0gp3
>           179 160 4096 mmcblk0gp2
>           179 128 4096 mmcblk0gp1
>           179 96  1052672 mmcblk0gp0
>           179 64  1024 mmcblk0boot1
>           179 32  1024 mmcblk0boot0
> 
> Signed-off-by: Namjae Jeon <linkinjeon@...il.com>
> ---
>  drivers/mmc/card/block.c |   41 +++++++++++++++++++++++------------
>  drivers/mmc/core/mmc.c   |   52
>  ++++++++++++++++++++++++++++++++++++++++++---
>  include/linux/mmc/card.h |   34 +++++++++++++++++++++++++++++-
>  include/linux/mmc/mmc.h  |    5 +++-
>  4 files changed, 112 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> +	for (idx = 0; idx < card->nr_parts; idx++) {
> +		if (mmc_is_boot_partition(&card->part[idx]) &&
> +			!mmc_boot_partition_access(card->host))
> +			continue;
> +		if (card->part[idx].size) {
> +			ret = mmc_blk_alloc_part(card, md,
> +				card->part[idx].part_cfg,
> +				card->part[idx].size >> 9,
> +				card->part[idx].force_ro,
> +				card->part[idx].name);
> +			if (ret)
> +				return ret;
> +		}
>  	}

Is there any reason for putting the mmc_boot_partition_access() logic here? If
boot partitions are not allowed by host, then just don't add the mmc_parts to
the parts array, no? Such minutae should belong in core mmc code, not block driver, IMHO.

A
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ