Loading android/configs/android-base.cfg +4 −0 Original line number Diff line number Diff line Loading @@ -138,7 +138,11 @@ CONFIG_PPP_BSDCOMP=y CONFIG_PPP_DEFLATE=y CONFIG_PPP_MPPE=y CONFIG_PREEMPT=y CONFIG_QFMT_V2=y CONFIG_QUOTA=y CONFIG_QUOTA_NETLINK_INTERFACE=y CONFIG_QUOTA_TREE=y CONFIG_QUOTACTL=y CONFIG_RESOURCE_COUNTERS=y CONFIG_RTC_CLASS=y CONFIG_RT_GROUP_SCHED=y Loading arch/arm64/kernel/vdso/vdso.S +1 −2 Original line number Diff line number Diff line Loading @@ -21,9 +21,8 @@ #include <linux/const.h> #include <asm/page.h> __PAGE_ALIGNED_DATA .globl vdso_start, vdso_end .section .rodata .balign PAGE_SIZE vdso_start: .incbin "arch/arm64/kernel/vdso/vdso.so" Loading drivers/md/Kconfig +16 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,21 @@ config DM_VERITY If unsure, say N. config DM_VERITY_HASH_PREFETCH_MIN_SIZE_128 bool "Prefetch size 128" config DM_VERITY_HASH_PREFETCH_MIN_SIZE int "Verity hash prefetch minimum size" depends on DM_VERITY range 1 4096 default 128 if DM_VERITY_HASH_PREFETCH_MIN_SIZE_128 default 1 ---help--- This sets minimum number of hash blocks to prefetch for dm-verity. For devices like eMMC, having larger prefetch size like 128 can improve performance with increased memory consumption for keeping more hashes in RAM. config DM_ANDROID_VERITY tristate "Android verity target support" depends on DM_VERITY Loading @@ -428,6 +443,7 @@ config DM_ANDROID_VERITY depends on ASYMMETRIC_KEY_TYPE depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE depends on MD_LINEAR select DM_VERITY_HASH_PREFETCH_MIN_SIZE_128 ---help--- This device-mapper target is virtually a VERITY target. This target is setup by reading the metadata contents piggybacked Loading drivers/md/dm-verity-target.c +8 −1 Original line number Diff line number Diff line Loading @@ -501,6 +501,7 @@ static void verity_prefetch_io(struct work_struct *work) container_of(work, struct dm_verity_prefetch_work, work); struct dm_verity *v = pw->v; int i; sector_t prefetch_size; for (i = v->levels - 2; i >= 0; i--) { sector_t hash_block_start; Loading @@ -523,8 +524,14 @@ static void verity_prefetch_io(struct work_struct *work) hash_block_end = v->hash_blocks - 1; } no_prefetch_cluster: dm_bufio_prefetch(v->bufio, hash_block_start, // for emmc, it is more efficient to send bigger read prefetch_size = max((sector_t)CONFIG_DM_VERITY_HASH_PREFETCH_MIN_SIZE, hash_block_end - hash_block_start + 1); if ((hash_block_start + prefetch_size) >= (v->hash_start + v->hash_blocks)) { prefetch_size = hash_block_end - hash_block_start + 1; } dm_bufio_prefetch(v->bufio, hash_block_start, prefetch_size); } kfree(pw); Loading fs/sdcardfs/derived_perm.c +15 −21 Original line number Diff line number Diff line Loading @@ -141,32 +141,26 @@ void fixup_perms_recursive(struct dentry *dentry, const char* name, size_t len) info = SDCARDFS_I(dentry->d_inode); if (needs_fixup(info->perm)) { /* We need permission to fix up these values. * Since permissions are based of of the mount, and * we are accessing without the mount point, we create * a fake mount with the permissions we will be using. */ struct vfsmount fakemnt; struct sdcardfs_vfsmount_options opts; fakemnt.data = &opts; opts.gid = AID_SDCARD_RW; opts.mask = 0; mutex_lock(&dentry->d_inode->i_mutex); child = lookup_one_len2(name, &fakemnt, dentry, len); mutex_unlock(&dentry->d_inode->i_mutex); if (!IS_ERR(child)) { spin_lock(&dentry->d_lock); list_for_each_entry(child, &dentry->d_subdirs, d_child) { dget(child); if (!strncasecmp(child->d_name.name, name, len)) { if (child->d_inode) { get_derived_permission(dentry, child); fixup_tmp_permissions(child->d_inode); dput(child); break; } } dput(child); } spin_unlock(&dentry->d_lock); } else if (descendant_may_need_fixup(info->perm)) { mutex_lock(&dentry->d_inode->i_mutex); spin_lock(&dentry->d_lock); list_for_each_entry(child, &dentry->d_subdirs, d_child) { fixup_perms_recursive(child, name, len); } mutex_unlock(&dentry->d_inode->i_mutex); spin_unlock(&dentry->d_lock); } dput(dentry); } Loading Loading
android/configs/android-base.cfg +4 −0 Original line number Diff line number Diff line Loading @@ -138,7 +138,11 @@ CONFIG_PPP_BSDCOMP=y CONFIG_PPP_DEFLATE=y CONFIG_PPP_MPPE=y CONFIG_PREEMPT=y CONFIG_QFMT_V2=y CONFIG_QUOTA=y CONFIG_QUOTA_NETLINK_INTERFACE=y CONFIG_QUOTA_TREE=y CONFIG_QUOTACTL=y CONFIG_RESOURCE_COUNTERS=y CONFIG_RTC_CLASS=y CONFIG_RT_GROUP_SCHED=y Loading
arch/arm64/kernel/vdso/vdso.S +1 −2 Original line number Diff line number Diff line Loading @@ -21,9 +21,8 @@ #include <linux/const.h> #include <asm/page.h> __PAGE_ALIGNED_DATA .globl vdso_start, vdso_end .section .rodata .balign PAGE_SIZE vdso_start: .incbin "arch/arm64/kernel/vdso/vdso.so" Loading
drivers/md/Kconfig +16 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,21 @@ config DM_VERITY If unsure, say N. config DM_VERITY_HASH_PREFETCH_MIN_SIZE_128 bool "Prefetch size 128" config DM_VERITY_HASH_PREFETCH_MIN_SIZE int "Verity hash prefetch minimum size" depends on DM_VERITY range 1 4096 default 128 if DM_VERITY_HASH_PREFETCH_MIN_SIZE_128 default 1 ---help--- This sets minimum number of hash blocks to prefetch for dm-verity. For devices like eMMC, having larger prefetch size like 128 can improve performance with increased memory consumption for keeping more hashes in RAM. config DM_ANDROID_VERITY tristate "Android verity target support" depends on DM_VERITY Loading @@ -428,6 +443,7 @@ config DM_ANDROID_VERITY depends on ASYMMETRIC_KEY_TYPE depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE depends on MD_LINEAR select DM_VERITY_HASH_PREFETCH_MIN_SIZE_128 ---help--- This device-mapper target is virtually a VERITY target. This target is setup by reading the metadata contents piggybacked Loading
drivers/md/dm-verity-target.c +8 −1 Original line number Diff line number Diff line Loading @@ -501,6 +501,7 @@ static void verity_prefetch_io(struct work_struct *work) container_of(work, struct dm_verity_prefetch_work, work); struct dm_verity *v = pw->v; int i; sector_t prefetch_size; for (i = v->levels - 2; i >= 0; i--) { sector_t hash_block_start; Loading @@ -523,8 +524,14 @@ static void verity_prefetch_io(struct work_struct *work) hash_block_end = v->hash_blocks - 1; } no_prefetch_cluster: dm_bufio_prefetch(v->bufio, hash_block_start, // for emmc, it is more efficient to send bigger read prefetch_size = max((sector_t)CONFIG_DM_VERITY_HASH_PREFETCH_MIN_SIZE, hash_block_end - hash_block_start + 1); if ((hash_block_start + prefetch_size) >= (v->hash_start + v->hash_blocks)) { prefetch_size = hash_block_end - hash_block_start + 1; } dm_bufio_prefetch(v->bufio, hash_block_start, prefetch_size); } kfree(pw); Loading
fs/sdcardfs/derived_perm.c +15 −21 Original line number Diff line number Diff line Loading @@ -141,32 +141,26 @@ void fixup_perms_recursive(struct dentry *dentry, const char* name, size_t len) info = SDCARDFS_I(dentry->d_inode); if (needs_fixup(info->perm)) { /* We need permission to fix up these values. * Since permissions are based of of the mount, and * we are accessing without the mount point, we create * a fake mount with the permissions we will be using. */ struct vfsmount fakemnt; struct sdcardfs_vfsmount_options opts; fakemnt.data = &opts; opts.gid = AID_SDCARD_RW; opts.mask = 0; mutex_lock(&dentry->d_inode->i_mutex); child = lookup_one_len2(name, &fakemnt, dentry, len); mutex_unlock(&dentry->d_inode->i_mutex); if (!IS_ERR(child)) { spin_lock(&dentry->d_lock); list_for_each_entry(child, &dentry->d_subdirs, d_child) { dget(child); if (!strncasecmp(child->d_name.name, name, len)) { if (child->d_inode) { get_derived_permission(dentry, child); fixup_tmp_permissions(child->d_inode); dput(child); break; } } dput(child); } spin_unlock(&dentry->d_lock); } else if (descendant_may_need_fixup(info->perm)) { mutex_lock(&dentry->d_inode->i_mutex); spin_lock(&dentry->d_lock); list_for_each_entry(child, &dentry->d_subdirs, d_child) { fixup_perms_recursive(child, name, len); } mutex_unlock(&dentry->d_inode->i_mutex); spin_unlock(&dentry->d_lock); } dput(dentry); } Loading