Skip to content

Commit

Permalink
Merge cm-14.1 commits into mainline linux kernel v3.11.3
Browse files Browse the repository at this point in the history
* We added:
- sdcardfs
- selinux support
- new defconfig (msm8909w) support
* with this commit.
  • Loading branch information
NotNoelChannel authored Oct 5, 2024
2 parents 3c6ca51 + cd8dd89 commit fe3e9e7
Show file tree
Hide file tree
Showing 160 changed files with 7,869 additions and 1,061 deletions.
3 changes: 3 additions & 0 deletions Documentation/filesystems/porting
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,6 @@ object doesn't exist. It's remote/distributed ones that might care...
[mandatory]
FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate()
in your dentry operations instead.
--
[mandatory]
vfs_readdir() is gone; switch to iterate_dir() instead
29 changes: 29 additions & 0 deletions Documentation/sysctl/vm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Currently, these files are in /proc/sys/vm:
- min_slab_ratio
- min_unmapped_ratio
- mmap_min_addr
- mmap_rnd_bits
- mmap_rnd_compat_bits
- nr_hugepages
- nr_overcommit_hugepages
- nr_trim_pages (only if CONFIG_MMU=n)
Expand Down Expand Up @@ -455,6 +457,33 @@ against future potential kernel bugs.

==============================================================

mmap_rnd_bits:

This value can be used to select the number of bits to use to
determine the random offset to the base address of vma regions
resulting from mmap allocations on architectures which support
tuning address space randomization. This value will be bounded
by the architecture's minimum and maximum supported values.

This value can be changed after boot using the
/proc/sys/vm/mmap_rnd_bits tunable

==============================================================

mmap_rnd_compat_bits:

This value can be used to select the number of bits to use to
determine the random offset to the base address of vma regions
resulting from mmap allocations for applications run in
compatibility mode on architectures which support tuning address
space randomization. This value will be bounded by the
architecture's minimum and maximum supported values.

This value can be changed after boot using the
/proc/sys/vm/mmap_rnd_compat_bits tunable

==============================================================

nr_hugepages

Change the minimum size of the hugepage pool.
Expand Down
68 changes: 68 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,74 @@ config HAVE_UNDERSCORE_SYMBOL_PREFIX
Some architectures generate an _ in front of C symbols; things like
module loading and assembly files need to know about this.

config HAVE_ARCH_MMAP_RND_BITS
bool
help
An arch should select this symbol if it supports setting a variable
number of bits for use in establishing the base address for mmap
allocations, has MMU enabled and provides values for both:
- ARCH_MMAP_RND_BITS_MIN
- ARCH_MMAP_RND_BITS_MAX

config ARCH_MMAP_RND_BITS_MIN
int

config ARCH_MMAP_RND_BITS_MAX
int

config ARCH_MMAP_RND_BITS_DEFAULT
int

config ARCH_MMAP_RND_BITS
int "Number of bits to use for ASLR of mmap base address" if EXPERT
range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
default ARCH_MMAP_RND_BITS_MIN
depends on HAVE_ARCH_MMAP_RND_BITS
help
This value can be used to select the number of bits to use to
determine the random offset to the base address of vma regions
resulting from mmap allocations. This value will be bounded
by the architecture's minimum and maximum supported values.

This value can be changed after boot using the
/proc/sys/vm/mmap_rnd_bits tunable

config HAVE_ARCH_MMAP_RND_COMPAT_BITS
bool
help
An arch should select this symbol if it supports running applications
in compatibility mode, supports setting a variable number of bits for
use in establishing the base address for mmap allocations, has MMU
enabled and provides values for both:
- ARCH_MMAP_RND_COMPAT_BITS_MIN
- ARCH_MMAP_RND_COMPAT_BITS_MAX

config ARCH_MMAP_RND_COMPAT_BITS_MIN
int

config ARCH_MMAP_RND_COMPAT_BITS_MAX
int

config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
int

config ARCH_MMAP_RND_COMPAT_BITS
int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
default ARCH_MMAP_RND_COMPAT_BITS_MIN
depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
help
This value can be used to select the number of bits to use to
determine the random offset to the base address of vma regions
resulting from mmap allocations for compatible applications This
value will be bounded by the architecture's minimum and maximum
supported values.

This value can be changed after boot using the
/proc/sys/vm/mmap_rnd_compat_bits tunable

#
# ABI hall of shame
#
Expand Down
15 changes: 8 additions & 7 deletions arch/alpha/kernel/osf_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ struct osf_dirent {
};

struct osf_dirent_callback {
struct dir_context ctx;
struct osf_dirent __user *dirent;
long __user *basep;
unsigned int count;
Expand Down Expand Up @@ -146,17 +147,17 @@ SYSCALL_DEFINE4(osf_getdirentries, unsigned int, fd,
{
int error;
struct fd arg = fdget(fd);
struct osf_dirent_callback buf;
struct osf_dirent_callback buf = {
.ctx.actor = osf_filldir,
.dirent = dirent,
.basep = basep,
.count = count
};

if (!arg.file)
return -EBADF;

buf.dirent = dirent;
buf.basep = basep;
buf.count = count;
buf.error = 0;

error = vfs_readdir(arg.file, osf_filldir, &buf);
error = iterate_dir(arg.file, &buf.ctx);
if (error >= 0)
error = buf.error;
if (count != buf.count)
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config ARM
select HARDIRQS_SW_RESEND
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
select HAVE_ARCH_KGDB
select HAVE_ARCH_MMAP_RND_BITS if MMU
select HAVE_ARCH_SECCOMP_FILTER
select HAVE_ARCH_TRACEHOOK
select HAVE_BPF_JIT
Expand Down Expand Up @@ -301,6 +302,14 @@ config MMU
Select if you want MMU-based virtualised addressing space
support by paged memory management. If unsure, say 'Y'.

config ARCH_MMAP_RND_BITS_MIN
default 8

config ARCH_MMAP_RND_BITS_MAX
default 14 if PAGE_OFFSET=0x40000000
default 15 if PAGE_OFFSET=0x80000000
default 16

#
# The "ARM system type" choice list is ordered alphabetically by option
# text. Please add new entries in the option alphabetic order.
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
ifneq ($(MACHINE),)
include $(srctree)/$(MACHINE)/Makefile.boot
endif
include $(srctree)/arch/arm/boot/dts/Makefile

include $(srctree)/arch/arm/boot/dts/Makefile
include $(srctree)/arch/arm/boot/dts/qcom/Makefile
ifneq ($(DTSSUBDIR),)
DTSSUBDIR_INCS=$(foreach DIR, $(DTSSUBDIR), $(addsuffix /Makefile, $(addprefix $(srctree)/arch/arm/boot/dts/, $(DIR))))
include $(DTSSUBDIR_INCS)
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,6 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
wm8850-w70v2.dtb
dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb

DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES))
ifneq ($(DTB_NAMES),)
DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
else
DTB_LIST := $(dtb-y)
endif

targets += dtbs
targets += $(DTB_LIST)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/msm8909-1gb-LMT-perf_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -574,3 +574,4 @@ CONFIG_MSM_CORE_CTL_HELPER=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y
CONFIG_UID_CPUTIME=y
6 changes: 5 additions & 1 deletion arch/arm/configs/msm8909-1gb-perf_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ CONFIG_SMP=y
CONFIG_SCHED_MC=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
CONFIG_BALANCE_ANON_FILE_RECLAIM=y
CONFIG_HIGHMEM=y
CONFIG_CC_STACKPROTECTOR_REGULAR=y
Expand Down Expand Up @@ -314,6 +315,7 @@ CONFIG_SENSORS_LTR553=y
CONFIG_SENSORS_MPU6050=y
CONFIG_SENSORS_MMC3416X=y
CONFIG_SENSORS_AKM8963=y
CONFIG_SENSORS_AKM09911=y
CONFIG_SENSORS_BMA2X2=y
CONFIG_SENSORS_AP3426=y
CONFIG_SENSORS_HALL=y
Expand Down Expand Up @@ -342,6 +344,7 @@ CONFIG_DEBUG_GPIO=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_QPNP_PIN=y
CONFIG_POWER_SUPPLY=y
CONFIG_SMB358_CHARGER=y
CONFIG_SMB135X_CHARGER=y
CONFIG_SMB1360_CHARGER_FG=y
CONFIG_BATTERY_BCL=y
Expand Down Expand Up @@ -566,7 +569,7 @@ CONFIG_QMI_ENCDEC=y
CONFIG_MSM_BUSPM_DEV=m
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_RADIO_IRIS=y
CONFIG_RADIO_IRIS_TRANSPORT=m
CONFIG_RADIO_IRIS_TRANSPORT=y
CONFIG_MSM_PERFORMANCE=y
CONFIG_MSM_PERFORMANCE_HOTPLUG_ON=n
CONFIG_DEVFREQ_SPDM=y
Expand All @@ -575,3 +578,4 @@ CONFIG_MSM_CORE_CTL_HELPER=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y
CONFIG_UID_CPUTIME=y
6 changes: 5 additions & 1 deletion arch/arm/configs/msm8909-1gb_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ CONFIG_SMP=y
CONFIG_SCHED_MC=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
CONFIG_BALANCE_ANON_FILE_RECLAIM=y
CONFIG_HIGHMEM=y
CONFIG_CC_STACKPROTECTOR_REGULAR=y
Expand Down Expand Up @@ -321,6 +322,7 @@ CONFIG_SENSORS_LTR553=y
CONFIG_SENSORS_MPU6050=y
CONFIG_SENSORS_MMC3416X=y
CONFIG_SENSORS_AKM8963=y
CONFIG_SENSORS_AKM09911=y
CONFIG_SENSORS_BMA2X2=y
CONFIG_SENSORS_AP3426=y
CONFIG_SENSORS_HALL=y
Expand Down Expand Up @@ -349,6 +351,7 @@ CONFIG_DEBUG_GPIO=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_QPNP_PIN=y
CONFIG_POWER_SUPPLY=y
CONFIG_SMB358_CHARGER=y
CONFIG_SMB135X_CHARGER=y
CONFIG_SMB1360_CHARGER_FG=y
CONFIG_BATTERY_BCL=y
Expand Down Expand Up @@ -605,7 +608,7 @@ CONFIG_QMI_ENCDEC=y
CONFIG_MSM_BUSPM_DEV=m
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_RADIO_IRIS=y
CONFIG_RADIO_IRIS_TRANSPORT=m
CONFIG_RADIO_IRIS_TRANSPORT=y
CONFIG_MSM_PERFORMANCE=y
CONFIG_MSM_PERFORMANCE_HOTPLUG_ON=n
CONFIG_DEVFREQ_SPDM=y
Expand All @@ -614,3 +617,4 @@ CONFIG_MSM_CORE_CTL_HELPER=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y
CONFIG_UID_CPUTIME=y
2 changes: 2 additions & 0 deletions arch/arm/configs/msm8909-perf_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ CONFIG_DEBUG_GPIO=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_QPNP_PIN=y
CONFIG_POWER_SUPPLY=y
CONFIG_SMB358_CHARGER=y
CONFIG_SMB135X_CHARGER=y
CONFIG_SMB1360_CHARGER_FG=y
CONFIG_BATTERY_BCL=y
Expand Down Expand Up @@ -557,3 +558,4 @@ CONFIG_MSM_CORE_CTL_HELPER=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y
CONFIG_UID_CPUTIME=y
10 changes: 8 additions & 2 deletions arch/arm/configs/msm8909-y560-u23_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_BITS_MAX=16
CONFIG_ARCH_MMAP_RND_BITS=16
CONFIG_CLONE_BACKWARDS=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_OLD_SIGACTION=y
Expand Down Expand Up @@ -663,6 +667,7 @@ CONFIG_INET_XFRM_MODE_BEET=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_INET_UDP_DIAG is not set
CONFIG_INET_DIAG_DESTROY=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
Expand Down Expand Up @@ -842,7 +847,7 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_ECN=y
# CONFIG_IP_NF_MATCH_RPFILTER is not set
CONFIG_IP_NF_MATCH_RPFILTER=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
Expand Down Expand Up @@ -879,7 +884,7 @@ CONFIG_IP6_NF_IPTABLES=y
# CONFIG_IP6_NF_MATCH_HL is not set
# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
# CONFIG_IP6_NF_MATCH_MH is not set
# CONFIG_IP6_NF_MATCH_RPFILTER is not set
CONFIG_IP6_NF_MATCH_RPFILTER=y
# CONFIG_IP6_NF_MATCH_RT is not set
# CONFIG_IP6_NF_TARGET_HL is not set
CONFIG_IP6_NF_FILTER=y
Expand Down Expand Up @@ -3438,6 +3443,7 @@ CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
CONFIG_SDCARD_FS=y
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
Expand Down
10 changes: 8 additions & 2 deletions arch/arm/configs/msm8909-y560_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ CONFIG_HAVE_CONTEXT_TRACKING=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_MODULES_USE_ELF_REL=y
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_BITS_MAX=16
CONFIG_ARCH_MMAP_RND_BITS=16
CONFIG_CLONE_BACKWARDS=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_OLD_SIGACTION=y
Expand Down Expand Up @@ -663,6 +667,7 @@ CONFIG_INET_XFRM_MODE_BEET=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_INET_UDP_DIAG is not set
CONFIG_INET_DIAG_DESTROY=y
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
Expand Down Expand Up @@ -842,7 +847,7 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_ECN=y
# CONFIG_IP_NF_MATCH_RPFILTER is not set
CONFIG_IP_NF_MATCH_RPFILTER=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
Expand Down Expand Up @@ -879,7 +884,7 @@ CONFIG_IP6_NF_IPTABLES=y
# CONFIG_IP6_NF_MATCH_HL is not set
# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set
# CONFIG_IP6_NF_MATCH_MH is not set
# CONFIG_IP6_NF_MATCH_RPFILTER is not set
CONFIG_IP6_NF_MATCH_RPFILTER=y
# CONFIG_IP6_NF_MATCH_RT is not set
# CONFIG_IP6_NF_TARGET_HL is not set
CONFIG_IP6_NF_FILTER=y
Expand Down Expand Up @@ -3438,6 +3443,7 @@ CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
CONFIG_SDCARD_FS=y
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
Expand Down
Loading

0 comments on commit fe3e9e7

Please sign in to comment.