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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 15 May 2020 04:41:38 +0300 From: Dmitry Osipenko <digetx@...il.com> To: Jens Axboe <axboe@...nel.dk>, Thierry Reding <thierry.reding@...il.com>, Jonathan Hunter <jonathanh@...dia.com>, Michał Mirosław <mirq-linux@...e.qmqm.pl>, David Heidelberg <david@...t.cz>, Peter Geis <pgwipeout@...il.com>, Stephen Warren <swarren@...dotorg.org>, Nicolas Chauvet <kwizart@...il.com>, Ulf Hansson <ulf.hansson@...aro.org>, Adrian Hunter <adrian.hunter@...el.com>, Billy Laws <blaws05@...il.com>, Nils Östlund <nils@...tan.com>, Christoph Hellwig <hch@...radead.org>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, Davidlohr Bueso <dave@...olabs.net> Cc: linux-tegra@...r.kernel.org, linux-block@...r.kernel.org, Andrey Danin <danindrey@...l.ru>, Gilles Grandou <gilles@...ndou.net>, Ryan Grachek <ryan@...ted.us>, linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org, linux-efi <linux-efi@...r.kernel.org> Subject: [PATCH v4 1/6] mmc: core: Add raw_boot_mult field to mmc_ext_csd In order to support parsing of NVIDIA Tegra Partition Table format, we need to know the BOOT_SIZE_MULT value of the Extended CSD register because NVIDIA's bootloader linearizes the boot0/boot1/main partitions into a single virtual space, and thus, all partition addresses are shifted by the size of boot0 + boot1 partitions. Signed-off-by: Dmitry Osipenko <digetx@...il.com> --- drivers/mmc/core/mmc.c | 2 ++ include/linux/mmc/card.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 4203303f946a..112edfb1eb1d 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -417,6 +417,8 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd) ext_csd[EXT_CSD_ERASE_TIMEOUT_MULT]; card->ext_csd.raw_hc_erase_grp_size = ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]; + card->ext_csd.raw_boot_mult = + ext_csd[EXT_CSD_BOOT_MULT]; if (card->ext_csd.rev >= 3) { u8 sa_shift = ext_csd[EXT_CSD_S_A_TIMEOUT]; card->ext_csd.part_config = ext_csd[EXT_CSD_PART_CONFIG]; diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 7d46411ffaa2..cd6b58b66010 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -109,6 +109,7 @@ struct mmc_ext_csd { u8 raw_hc_erase_gap_size; /* 221 */ u8 raw_erase_timeout_mult; /* 223 */ u8 raw_hc_erase_grp_size; /* 224 */ + u8 raw_boot_mult; /* 226 */ u8 raw_sec_trim_mult; /* 229 */ u8 raw_sec_erase_mult; /* 230 */ u8 raw_sec_feature_support;/* 231 */ -- 2.26.0
Powered by blists - more mailing lists