mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-19 17:59:18 +01:00
project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
@@ -592,15 +592,39 @@ static int ntfs_attr_find(const ATTR_TYPE type, const ntfschar *name,
|
||||
a = (ATTR_RECORD*)((u8*)ctx->attr +
|
||||
le32_to_cpu(ctx->attr->length));
|
||||
for (;; a = (ATTR_RECORD*)((u8*)a + le32_to_cpu(a->length))) {
|
||||
if ((u8*)a < (u8*)ctx->mrec || (u8*)a > (u8*)ctx->mrec +
|
||||
le32_to_cpu(ctx->mrec->bytes_allocated))
|
||||
u8 *mrec_end = (u8 *)ctx->mrec +
|
||||
le32_to_cpu(ctx->mrec->bytes_allocated);
|
||||
u8 *name_end;
|
||||
|
||||
/* check whether ATTR_RECORD wrap */
|
||||
if ((u8 *)a < (u8 *)ctx->mrec)
|
||||
break;
|
||||
|
||||
/* check whether Attribute Record Header is within bounds */
|
||||
if ((u8 *)a > mrec_end ||
|
||||
(u8 *)a + sizeof(ATTR_RECORD) > mrec_end)
|
||||
break;
|
||||
|
||||
/* check whether ATTR_RECORD's name is within bounds */
|
||||
name_end = (u8 *)a + le16_to_cpu(a->name_offset) +
|
||||
a->name_length * sizeof(ntfschar);
|
||||
if (name_end > mrec_end)
|
||||
break;
|
||||
|
||||
ctx->attr = a;
|
||||
if (unlikely(le32_to_cpu(a->type) > le32_to_cpu(type) ||
|
||||
a->type == AT_END))
|
||||
return -ENOENT;
|
||||
if (unlikely(!a->length))
|
||||
break;
|
||||
|
||||
/* check whether ATTR_RECORD's length wrap */
|
||||
if ((u8 *)a + le32_to_cpu(a->length) < (u8 *)a)
|
||||
break;
|
||||
/* check whether ATTR_RECORD's length is within bounds */
|
||||
if ((u8 *)a + le32_to_cpu(a->length) > mrec_end)
|
||||
break;
|
||||
|
||||
if (a->type != type)
|
||||
continue;
|
||||
/*
|
||||
|
||||
@@ -1829,6 +1829,13 @@ int ntfs_read_inode_mount(struct inode *vi)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
/* Sanity check offset to the first attribute */
|
||||
if (le16_to_cpu(m->attrs_offset) >= le32_to_cpu(m->bytes_allocated)) {
|
||||
ntfs_error(sb, "Incorrect mft offset to the first attribute %u in superblock.",
|
||||
le16_to_cpu(m->attrs_offset));
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
/* Need this to sanity check attribute list references to $MFT. */
|
||||
vi->i_generation = ni->seq_no = le16_to_cpu(m->sequence_number);
|
||||
|
||||
|
||||
@@ -2092,7 +2092,8 @@ get_ctx_vol_failed:
|
||||
// TODO: Initialize security.
|
||||
/* Get the extended system files' directory inode. */
|
||||
vol->extend_ino = ntfs_iget(sb, FILE_Extend);
|
||||
if (IS_ERR(vol->extend_ino) || is_bad_inode(vol->extend_ino)) {
|
||||
if (IS_ERR(vol->extend_ino) || is_bad_inode(vol->extend_ino) ||
|
||||
!S_ISDIR(vol->extend_ino->i_mode)) {
|
||||
if (!IS_ERR(vol->extend_ino))
|
||||
iput(vol->extend_ino);
|
||||
ntfs_error(sb, "Failed to load $Extend.");
|
||||
|
||||
Reference in New Issue
Block a user