From: kbuild test robot <lkp@intel.com>
To: Nikolai Merinov <n.merinov@inango-systems.com>
Cc: kbuild-all@01.org, Davidlohr Bueso <dave@stgolabs.net>,
linux-efi@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Nikolai Merinov <n.merinov@inango-systems.com>
Subject: Re: [PATCH] partitions/efi: Fix partition name parsing in GUID partition entry
Date: Mon, 26 Nov 2018 05:16:56 +0800 [thread overview]
Message-ID: <201811260537.CUVznsaN%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181124162123.21300-1-n.merinov@inango-systems.com>
[-- Attachment #1: Type: text/plain, Size: 3474 bytes --]
Hi Nikolai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on v4.20-rc3 next-20181123]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Nikolai-Merinov/partitions-efi-Fix-partition-name-parsing-in-GUID-partition-entry/20181125-060728
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
>> block/partitions/efi.c:732:32: warning: cast to restricted __le16
vim +732 block/partitions/efi.c
672
673 /**
674 * efi_partition(struct parsed_partitions *state)
675 * @state: disk parsed partitions
676 *
677 * Description: called from check.c, if the disk contains GPT
678 * partitions, sets up partition entries in the kernel.
679 *
680 * If the first block on the disk is a legacy MBR,
681 * it will get handled by msdos_partition().
682 * If it's a Protective MBR, we'll handle it here.
683 *
684 * We do not create a Linux partition for GPT, but
685 * only for the actual data partitions.
686 * Returns:
687 * -1 if unable to read the partition table
688 * 0 if this isn't our partition table
689 * 1 if successful
690 *
691 */
692 int efi_partition(struct parsed_partitions *state)
693 {
694 gpt_header *gpt = NULL;
695 gpt_entry *ptes = NULL;
696 u32 i;
697 unsigned ssz = bdev_logical_block_size(state->bdev) / 512;
698
699 if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) {
700 kfree(gpt);
701 kfree(ptes);
702 return 0;
703 }
704
705 pr_debug("GUID Partition Table is valid! Yea!\n");
706
707 for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) && i < state->limit-1; i++) {
708 struct partition_meta_info *info;
709 unsigned label_count = 0;
710 unsigned label_max;
711 u64 start = le64_to_cpu(ptes[i].starting_lba);
712 u64 size = le64_to_cpu(ptes[i].ending_lba) -
713 le64_to_cpu(ptes[i].starting_lba) + 1ULL;
714
715 if (!is_pte_valid(&ptes[i], last_lba(state->bdev)))
716 continue;
717
718 put_partition(state, i+1, start * ssz, size * ssz);
719
720 /* If this is a RAID volume, tell md */
721 if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID))
722 state->parts[i + 1].flags = ADDPART_FLAG_RAID;
723
724 info = &state->parts[i + 1].info;
725 efi_guid_to_str(&ptes[i].unique_partition_guid, info->uuid);
726
727 /* Naively convert UTF16-LE to 7 bits. */
728 label_max = min(ARRAY_SIZE(info->volname) - 1,
729 ARRAY_SIZE(ptes[i].partition_name));
730 info->volname[label_max] = 0;
731 while (label_count < label_max) {
> 732 u8 c = le16_to_cpu(ptes[i].partition_name[label_count]) & 0xff;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66576 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, Davidlohr Bueso <dave@stgolabs.net>,
linux-efi@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Nikolai Merinov <n.merinov@inango-systems.com>
Subject: Re: [PATCH] partitions/efi: Fix partition name parsing in GUID partition entry
Date: Mon, 26 Nov 2018 05:16:56 +0800 [thread overview]
Message-ID: <201811260537.CUVznsaN%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181124162123.21300-1-n.merinov@inango-systems.com>
[-- Attachment #1: Type: text/plain, Size: 3474 bytes --]
Hi Nikolai,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on v4.20-rc3 next-20181123]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Nikolai-Merinov/partitions-efi-Fix-partition-name-parsing-in-GUID-partition-entry/20181125-060728
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
>> block/partitions/efi.c:732:32: warning: cast to restricted __le16
vim +732 block/partitions/efi.c
672
673 /**
674 * efi_partition(struct parsed_partitions *state)
675 * @state: disk parsed partitions
676 *
677 * Description: called from check.c, if the disk contains GPT
678 * partitions, sets up partition entries in the kernel.
679 *
680 * If the first block on the disk is a legacy MBR,
681 * it will get handled by msdos_partition().
682 * If it's a Protective MBR, we'll handle it here.
683 *
684 * We do not create a Linux partition for GPT, but
685 * only for the actual data partitions.
686 * Returns:
687 * -1 if unable to read the partition table
688 * 0 if this isn't our partition table
689 * 1 if successful
690 *
691 */
692 int efi_partition(struct parsed_partitions *state)
693 {
694 gpt_header *gpt = NULL;
695 gpt_entry *ptes = NULL;
696 u32 i;
697 unsigned ssz = bdev_logical_block_size(state->bdev) / 512;
698
699 if (!find_valid_gpt(state, &gpt, &ptes) || !gpt || !ptes) {
700 kfree(gpt);
701 kfree(ptes);
702 return 0;
703 }
704
705 pr_debug("GUID Partition Table is valid! Yea!\n");
706
707 for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) && i < state->limit-1; i++) {
708 struct partition_meta_info *info;
709 unsigned label_count = 0;
710 unsigned label_max;
711 u64 start = le64_to_cpu(ptes[i].starting_lba);
712 u64 size = le64_to_cpu(ptes[i].ending_lba) -
713 le64_to_cpu(ptes[i].starting_lba) + 1ULL;
714
715 if (!is_pte_valid(&ptes[i], last_lba(state->bdev)))
716 continue;
717
718 put_partition(state, i+1, start * ssz, size * ssz);
719
720 /* If this is a RAID volume, tell md */
721 if (!efi_guidcmp(ptes[i].partition_type_guid, PARTITION_LINUX_RAID_GUID))
722 state->parts[i + 1].flags = ADDPART_FLAG_RAID;
723
724 info = &state->parts[i + 1].info;
725 efi_guid_to_str(&ptes[i].unique_partition_guid, info->uuid);
726
727 /* Naively convert UTF16-LE to 7 bits. */
728 label_max = min(ARRAY_SIZE(info->volname) - 1,
729 ARRAY_SIZE(ptes[i].partition_name));
730 info->volname[label_max] = 0;
731 while (label_count < label_max) {
> 732 u8 c = le16_to_cpu(ptes[i].partition_name[label_count]) & 0xff;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66576 bytes --]
next prev parent reply other threads:[~2018-11-25 21:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-24 16:21 [PATCH] partitions/efi: Fix partition name parsing in GUID partition entry Nikolai Merinov
2018-11-25 21:16 ` kbuild test robot [this message]
2018-11-25 21:16 ` kbuild test robot
2019-12-24 9:21 ` [PATCH v2] " Nikolai Merinov
2019-12-24 9:51 ` Ard Biesheuvel
2020-01-08 13:39 ` Christoph Hellwig
2020-01-13 10:27 ` [PATCH v3] " Nikolai Merinov
2020-02-18 13:34 ` Nikolai Merinov
2020-02-18 18:53 ` Christoph Hellwig
2020-02-24 11:38 ` Nikolai Merinov
2020-02-24 17:08 ` hch
2020-03-06 8:43 ` Nikolai Merinov
2020-03-06 9:25 ` Ard Biesheuvel
2020-03-06 10:14 ` Ard Biesheuvel
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=201811260537.CUVznsaN%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=dave@stgolabs.net \
--cc=kbuild-all@01.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=n.merinov@inango-systems.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.