Skip to content
Snippets Groups Projects
  1. Feb 23, 2023
    • Marek Vasut's avatar
      env: mmc: Apply GPT only on eMMC user HW partition · 5b4acb0f
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      Apply the GPT U-Boot environment GUID type look up only on eMMC user
      HW partition, do not apply the look up on eMMC boot HW partitions as
      mmc_offset_try_partition() assumes either SD partitions or eMMC user
      HW partition.
      
      This fixes environment operation on systems where CONFIG_SYS_MMC_ENV_PART
      is non-zero and CONFIG_SYS_REDUNDAND_ENVIRONMENT is set.
      
      Fixes: 80105d8f ("env: mmc: select GPT env partition by type guid")
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      5b4acb0f
    • Simon Glass's avatar
      trace: Relax test requirements · c1d266a7
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      We expect the profile and bootstage to agree on timing, but when
      running on slow machines there can be a larger descrepency. Increase the
      tolerance to fix this.
      
      Fixes: 9cea4797 ("trace: Add a test")
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      c1d266a7
    • Tom Rini's avatar
      x86: Pass -z execstack for EFI payload flags · d85bc196
      Tom Rini authored
      
      To match how we link EFI executables elsewhere, and to silence a linker
      warning, pass -z execstack here as well.
      
      Cc: Bin Meng <bmeng.cn@gmail.com>
      Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      d85bc196
    • Tom Rini's avatar
      Makefile: Link with -z noexectack · 57450d86
      Tom Rini authored
      
      When moving to gcc-12.2 we started trying to quiet some of the new
      linker warnings, that are not relevant to us. However, a
      misunderstanding of the mechanics at play meant that I intentionally
      omitted passing -z noexecstack to the linker, when we do need to. Add
      this flag and in turn remove warnings from the linker.
      
      Fixes: 1e1c51f8 ("Makefile: link with --no-warn-rwx-segments")
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      57450d86
    • Qu Wenruo's avatar
      fs: btrfs: limit the mapped length to the original length · 511a1303
      Qu Wenruo authored and Tom Rini's avatar Tom Rini committed
      
      [BUG]
      There is a bug report that btrfs driver caused hang during file read:
      
        This breaks btrfs on the HiFive Unmatched.
      
        => pci enum
        PCIE-0: Link up (Gen1-x8, Bus0)
        => nvme scan
        => load nvme 0:2 0x8c000000 /boot/dtb/sifive/hifive-unmatched-a00.dtb
        [hangs]
      
      [CAUSE]
      The reporter provided some debug output:
      
        read_extent_data: cur=615817216, orig_len=16384, cur_len=16384
        read_extent_data: btrfs_map_block: cur_len=479944704; ret=0
        read_extent_data: ret=0
        read_extent_data: cur=615833600, orig_len=4096, cur_len=4096
        read_extent_data: btrfs_map_block: cur_len=479928320; ret=0
      
      Note the second and the last line, the @cur_len is 450+MiB, which is
      almost a chunk size.
      
      And inside __btrfs_map_block(), we limits the returned value to stripe
      length, but that's depending on the chunk type:
      
      	if (map->type & (BTRFS_BLOCK_GROUP_RAID0 | BTRFS_BLOCK_GROUP_RAID1 |
      			 BTRFS_BLOCK_GROUP_RAID1C3 | BTRFS_BLOCK_GROUP_RAID1C4 |
      			 BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6 |
      			 BTRFS_BLOCK_GROUP_RAID10 |
      			 BTRFS_BLOCK_GROUP_DUP)) {
      		/* we limit the length of each bio to what fits in a stripe */
      		*length = min_t(u64, ce->size - offset,
      			      map->stripe_len - stripe_offset);
      	} else {
      		*length = ce->size - offset;
      	}
      
      This means, if the chunk is SINGLE profile, then we don't limit the
      returned length at all, and even for other profiles, we can still return
      a length much larger than the requested one.
      
      [FIX]
      Properly clamp the returned length, preventing it from returning a much
      larger range than expected.
      
      Reported-by: default avatarAndreas Schwab <schwab@linux-m68k.org>
      Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
      511a1303
  2. Feb 22, 2023
  3. Feb 21, 2023
  4. Feb 19, 2023
  5. Feb 17, 2023
Loading