Skip to content
This repository was archived by the owner on Oct 30, 2021. It is now read-only.

Sunfish bringup #1

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
fc65efd
avoid Android build system conflicts
paintedman Jun 6, 2020
c2ceea8
sunfish: disable module support
randomhydrosol Sep 28, 2020
215c258
add qcacld submodules
randomhydrosol Sep 28, 2020
8fc1d0a
add qcacld-3.0 driver to staging
thestinger Mar 29, 2019
d9bd41c
defconfig: sunfish: enable qcacld driver
randomhydrosol Sep 28, 2020
1e8740f
remove techpack gitignore rules
thestinger Sep 10, 2020
25112eb
add techpack/audio submodule
randomhydrosol Sep 28, 2020
71481d5
add fts_touch submodule
randomhydrosol Sep 28, 2020
6ee5d64
add fts_touch driver to input/touchscreen
paintedman Jun 9, 2020
65429b6
defconfig: sunfish: enable FTS_TOUCH
randomhydrosol Sep 28, 2020
3a85774
add build script
thestinger Jul 11, 2020
0735121
mark qcedev data const
thestinger Feb 7, 2018
b372d2f
disable SLAB_MERGE_DEFAULT
randomhydrosol Sep 28, 2020
3c6ee94
add toggle for disabling newly added USB devices
thestinger May 16, 2017
81b5365
replace SECURITY_SMACK with SECURITY_NETWORK
randomhydrosol Sep 28, 2020
ee15111
enable SLAB_FREELIST_RANDOM
randomhydrosol Sep 28, 2020
d77a8cf
enable SLAB_FREELIST_HARDENED
randomhydrosol Sep 28, 2020
a499553
add a SLAB_HARDENED configuration option
thestinger May 3, 2017
bba9691
add missing cache_from_obj !PageSlab check
thestinger May 3, 2017
a11b645
real slab_equal_or_root check for !MEMCG_KMEM
thestinger Mar 31, 2017
eceda94
bug on kmem_cache_free with the wrong cache
thestinger May 3, 2017
1716401
always perform cache_from_obj consistency checks
thestinger May 3, 2017
5b04189
bug on !PageSlab && !PageCompound in ksize
thestinger May 3, 2017
330c9b1
enable DEBUG_SG
randomhydrosol Sep 28, 2020
e58e5dd
enable DEBUG_NOTIFIERS
randomhydrosol Sep 28, 2020
eb4189d
enable DEBUG_CREDENTIALS
randomhydrosol Sep 28, 2020
f3e8672
mm: add support for verifying page sanitization
thestinger May 4, 2017
f6c07d9
slub: Extend init_on_free to slab caches with constructors
tsautereau-anssi Sep 20, 2019
abdfe32
slub: Add support for verifying slab sanitization
thestinger May 4, 2017
343581c
slub: Extend init_on_alloc to slab caches with constructors
tsautereau-anssi Nov 29, 2019
7f72d6e
slub: add multi-purpose random canaries
thestinger Sep 10, 2020
4c421af
Revert "slub: add multi-purpose random canaries"
randomhydrosol Jul 12, 2020
baaf147
enable -ftrivial-auto-var-init=zero
thestinger Apr 8, 2020
f931405
drivers: mark tsens_mtc_reset_history_counter as __maybe_unused
randomhydrosol Jun 8, 2020
875eb2f
add kmalloc/krealloc alloc_size attributes
thestinger May 3, 2017
b4d1a46
add vmalloc alloc_size attributes
thestinger May 3, 2017
9e83d5f
add kvmalloc alloc_size attribute
thestinger Jul 4, 2017
276225e
add percpu alloc_size attributes
thestinger May 14, 2017
19a8631
add alloc_pages_exact alloc_size attributes
thestinger May 14, 2017
e53affb
FORTIFY_SOURCE intra-object overflow checking
thestinger Jun 3, 2017
8b7693b
arm64: determine stack entropy based on mmap entropy
thestinger May 22, 2017
c35fecc
randomize lower bits of the argument block
thestinger May 11, 2017
7bbb0e5
support randomizing the lower bits of brk
thestinger May 30, 2017
f203ace
arm64: randomize lower bits of brk
thestinger Jun 1, 2017
c06071d
arm64: guarantee brk gap is at least one page
thestinger Jun 1, 2017
8605887
enable UNMAP_KERNEL_AT_EL0
randomhydrosol Sep 28, 2020
11c22a0
enable ARM64_SSBD
randomhydrosol Sep 28, 2020
4b5d799
enable PANIC_ON_OOPS
randomhydrosol Sep 28, 2020
4e228fd
set PANIC_TIMEOUT to -1
randomhydrosol Sep 28, 2020
36a8224
disable SECURITY_SELINUX_DEVELOP
randomhydrosol Sep 28, 2020
e29b016
use max mmap entropy by default to cover init
randomhydrosol Sep 28, 2020
8881d23
add __read_only for non-init related usage
thestinger May 7, 2017
2d62914
make sysctl constants read-only
thestinger May 7, 2017
17b4d3f
mark slub runtime configuration as __ro_after_init
thestinger May 14, 2017
01d30f3
add __ro_after_init to slab_nomerge and slab_state
thestinger May 3, 2017
5895720
mark size_index as __ro_after_init
thestinger May 28, 2017
9c84346
mark kmem_cache as __ro_after_init
thestinger May 28, 2017
c6d01df
mark softirq_vec as __ro_after_init
thestinger Jul 4, 2017
d677788
Make more sysctl constants read-only
madaidan May 12, 2020
71ffc37
sunfish: defconfig: enable all memory initialization options
randomhydrosol Sep 28, 2020
eff0ccb
enable FORTIFY_SOURCE_STRICT_STRING
randomhydrosol Sep 28, 2020
a7c19b4
remove unnecessary file from the tree
randomhydrosol Sep 10, 2020
2afe01c
cnss_utils: don't error on unused functions
randomhydrosol Sep 10, 2020
ce4af5a
Makefile: set -fvisibility=hidden when thinlto is disabled
randomhydrosol Sep 10, 2020
9c1a611
Revert "enable ARM64_SSBD"
randomhydrosol Sep 28, 2020
aec01f2
Revert "enable UNMAP_KERNEL_AT_EL0"
randomhydrosol Sep 28, 2020
604ff26
update techpack submodule to fix boot failure
randomhydrosol Oct 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ all.config
# fetched Android config fragments
kernel/configs/android-*.cfg

# Qualcomm out-of-tree audio drivers
/techpack/audio

#
#Ignoring Android.bp link file
#
Expand Down
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "drivers/staging/fw-api"]
path = drivers/staging/fw-api
url = https://android.googlesource.com/kernel/msm-modules/wlan-fw-api
[submodule "drivers/staging/qca-wifi-host-cmn"]
path = drivers/staging/qca-wifi-host-cmn
url = https://android.googlesource.com/kernel/msm-modules/qca-wfi-host-cmn
[submodule "drivers/staging/qcacld-3.0"]
path = drivers/staging/qcacld-3.0
url = https://github.com/GrapheneOS/kernel_google_sunfish_drivers_staging_qcacld-3.0
[submodule "techpack/audio"]
path = techpack/audio
url = https://github.com/GrapheneOS/kernel_google_sunfish_techpack_audio
[submodule "drivers/input/touchscreen/fts_touch"]
path = drivers/input/touchscreen/fts_touch
url = https://android.googlesource.com/kernel/msm-modules/fts_touch
File renamed without changes.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ endif

# Initialize all stack variables with a pattern, if desired.
ifdef CONFIG_INIT_STACK_ALL
KBUILD_CFLAGS += -ftrivial-auto-var-init=pattern
KBUILD_CFLAGS += -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
endif

KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
Expand Down Expand Up @@ -870,12 +870,12 @@ endif

ifdef CONFIG_LTO_CLANG
ifdef CONFIG_THINLTO
lto-clang-flags := -flto=thin
lto-clang-flags := -flto=thin -fvisibility=default
LDFLAGS += --thinlto-cache-dir=.thinlto-cache
else
lto-clang-flags := -flto
lto-clang-flags := -flto -fvisibility=hidden
endif
lto-clang-flags += -fvisibility=default $(call cc-option, -fsplit-lto-unit)
lto-clang-flags += $(call cc-option, -fsplit-lto-unit)

# Limit inlining across translation units to reduce binary size
LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5
Expand Down
42 changes: 26 additions & 16 deletions arch/arm64/configs/sunfish_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,18 @@ CONFIG_KALLSYMS_ALL=y
CONFIG_BPF_SYSCALL=y
CONFIG_EMBEDDED=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB_MERGE_DEFAULT is not set
CONFIG_SLAB_FREELIST_RANDOM=y
CONFIG_SLAB_FREELIST_HARDENED=y
CONFIG_PROFILING=y
CONFIG_JUMP_LABEL=y
CONFIG_CC_STACKPROTECTOR_STRONG=y
# CONFIG_THINLTO is not set
CONFIG_LTO_CLANG=y
CONFIG_CFI_CLANG=y
CONFIG_SHADOW_CALL_STACK=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_ARCH_MMAP_RND_BITS=24
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=16
# CONFIG_BLK_DEV_BSG is not set
CONFIG_PARTITION_ADVANCED=y
# CONFIG_IOSCHED_DEADLINE is not set
Expand Down Expand Up @@ -133,6 +134,7 @@ CONFIG_IPV6_MIP6=y
CONFIG_IPV6_VTI=y
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_NETLABEL=y
CONFIG_NETFILTER=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_SECMARK=y
Expand Down Expand Up @@ -333,11 +335,11 @@ CONFIG_JOYSTICK_XPAD_LEDS=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v27=y
CONFIG_TOUCHSCREEN_TBN=y
CONFIG_TOUCHSCREEN_HEATMAP=m
CONFIG_TOUCHSCREEN_FTS=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_QPNP_POWER_ON=y
CONFIG_INPUT_UINPUT=y
CONFIG_INPUT_DRV2624_HAPTICS=m
CONFIG_INPUT_DRV2624_HAPTICS=y
CONFIG_FPC_FINGERPRINT=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_VT is not set
Expand All @@ -347,13 +349,12 @@ CONFIG_SERIAL_MSM_GENI=y
CONFIG_SERIAL_MSM_GENI_CONSOLE=y
CONFIG_SERIAL_DEV_BUS=y
CONFIG_TTY_PRINTK=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_MSM_LEGACY=y
# CONFIG_DEVPORT is not set
CONFIG_DIAG_CHAR=y
CONFIG_MSM_FASTCVPD=y
CONFIG_MSM_ADSPRPC=y
CONFIG_MSM_RDBG=m
CONFIG_MSM_RDBG=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_I2C_QCOM_GENI=y
Expand Down Expand Up @@ -430,8 +431,8 @@ CONFIG_MSM_VIDC_V4L2=y
CONFIG_MSM_VIDC_GOVERNORS=y
CONFIG_MSM_SDE_ROTATOR=y
CONFIG_MSM_NPU=y
CONFIG_DVB_MPQ=m
CONFIG_DVB_MPQ_DEMUX=m
CONFIG_DVB_MPQ=y
CONFIG_DVB_MPQ_DEMUX=y
CONFIG_DVB_MPQ_SW=y
CONFIG_CAMERA_FW_UPDATE=y
CONFIG_CAMERA_ACT_READ_LENS=y
Expand All @@ -442,7 +443,6 @@ CONFIG_DRM_ANALOGIX_ANX7625=y
CONFIG_DRM_LT_LT9611=y
CONFIG_FB_VIRTUAL=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_QCOM_SPMI_WLED=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
Expand Down Expand Up @@ -538,6 +538,7 @@ CONFIG_ASHMEM=y
CONFIG_ION=y
CONFIG_ION_DEFER_FREE_NO_SCHED_IDLE=y
CONFIG_GOOGLE_WLAN_MAC=y
CONFIG_QCA_CLD_WLAN=y
CONFIG_QCOM_GENI_SE=y
CONFIG_QPNP_REVID=y
CONFIG_SPS=y
Expand All @@ -549,7 +550,7 @@ CONFIG_RMNET_IPA3=y
CONFIG_RMNET_IPA3_TX_TIMEOUT_DETECT=y
CONFIG_RNDIS_IPA=y
CONFIG_IPA_UT=y
CONFIG_MSM_11AD=m
CONFIG_MSM_11AD=y
CONFIG_QCOM_MDSS_PLL=y
CONFIG_SPMI_PMIC_CLKDIV=y
CONFIG_MSM_CLK_AOP_QMP=y
Expand Down Expand Up @@ -588,7 +589,7 @@ CONFIG_QCOM_RUN_QUEUE_STATS=y
CONFIG_QCOM_LLCC=y
CONFIG_QCOM_SM6150_LLCC=y
CONFIG_QCOM_SDMMAGPIE_LLCC=y
CONFIG_QCOM_LLCC_PERFMON=m
CONFIG_QCOM_LLCC_PERFMON=y
CONFIG_QCOM_QMI_HELPERS=y
CONFIG_QCOM_SMEM=y
CONFIG_QCOM_MEMORY_DUMP_V2=y
Expand Down Expand Up @@ -678,7 +679,7 @@ CONFIG_QUOTA_NETLINK_INTERFACE=y
CONFIG_QFMT_V2=y
CONFIG_FUSE_FS=y
CONFIG_OVERLAY_FS=y
CONFIG_INCREMENTAL_FS=m
CONFIG_INCREMENTAL_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_ECRYPT_FS=y
Expand All @@ -701,10 +702,14 @@ CONFIG_FRAME_WARN=3072
CONFIG_MAGIC_SYSRQ=y
CONFIG_SOFTLOCKUP_DETECTOR=y
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
CONFIG_PANIC_TIMEOUT=5
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=-1
CONFIG_SCHEDSTATS=y
CONFIG_SCHED_STACK_END_CHECK=y
# CONFIG_DEBUG_PREEMPT is not set
CONFIG_DEBUG_SG=y
CONFIG_DEBUG_NOTIFIERS=y
CONFIG_DEBUG_CREDENTIALS=y
CONFIG_RCU_PANIC_ON_STALL=1
CONFIG_IPC_LOGGING=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
Expand All @@ -714,11 +719,16 @@ CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE=y
CONFIG_PFK=y
CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
CONFIG_HARDENED_USERCOPY=y
CONFIG_HARDENED_USERCOPY_PAGESPAN=y
CONFIG_FORTIFY_SOURCE=y
CONFIG_FORTIFY_SOURCE_STRICT_STRING=y
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SMACK=y
# CONFIG_SECURITY_SELINUX_DEVELOP is not set
CONFIG_INIT_STACK_ALL=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
CONFIG_INIT_ON_FREE_DEFAULT_ON=y
CONFIG_CRYPTO_NIAP_FPT_TST_EXT_11=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_XCBC=y
Expand Down
6 changes: 3 additions & 3 deletions arch/arm64/include/asm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,
/* 1GB of VA */
#ifdef CONFIG_COMPAT
#define STACK_RND_MASK (test_thread_flag(TIF_32BIT) ? \
0x7ff >> (PAGE_SHIFT - 12) : \
0x3ffff >> (PAGE_SHIFT - 12))
((1UL << mmap_rnd_compat_bits) - 1) >> (PAGE_SHIFT - 12) : \
((1UL << mmap_rnd_bits) - 1) >> (PAGE_SHIFT - 12))
#else
#define STACK_RND_MASK (0x3ffff >> (PAGE_SHIFT - 12))
#define STACK_RND_MASK (((1UL << mmap_rnd_bits) - 1) >> (PAGE_SHIFT - 12))
#endif

#ifdef __AARCH64EB__
Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,9 @@ unsigned long arch_align_stack(unsigned long sp)
unsigned long arch_randomize_brk(struct mm_struct *mm)
{
if (is_compat_task())
return randomize_page(mm->brk, SZ_32M);
return mm->brk + get_random_long() % SZ_32M + PAGE_SIZE;
else
return randomize_page(mm->brk, SZ_1G);
return mm->brk + get_random_long() % SZ_1G + PAGE_SIZE;
}

/*
Expand Down
52 changes: 52 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

set -o errexit -o pipefail

[[ $# -eq 0 ]] || exit 1

ROOT_DIR=$(realpath ../../..)

export KBUILD_BUILD_VERSION=1
export KBUILD_BUILD_USER=grapheneos
export KBUILD_BUILD_HOST=grapheneos
export KBUILD_BUILD_TIMESTAMP="$(date -d "@$(git --no-pager show -s --format=%ct)")"

PATH="$ROOT_DIR/prebuilts/build-tools/linux-x86/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/build-tools/path/linux-x86:$PATH"
PATH="$ROOT_DIR/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/clang/host/linux-x86/clang-r383902/bin:$PATH"
PATH="$ROOT_DIR/prebuilts/misc/linux-x86/lz4:$PATH"
PATH="$ROOT_DIR/prebuilts/misc/linux-x86/dtc:$PATH"
PATH="$ROOT_DIR/prebuilts/misc/linux-x86/libufdt:$PATH"
export LD_LIBRARY_PATH="$ROOT_DIR/prebuilts/clang/host/linux-x86/clang-r383902/bin:$LD_LIBRARY_PATH"
export DTC_EXT="$ROOT_DIR/prebuilts/misc/linux-x86/dtc/dtc"
export DTC_OVERLAY_TEST_EXT="$ROOT_DIR/prebuilts/misc/linux-x86/libufdt/ufdt_apply_overlay"

chrt -bp 0 $$

make \
O=out \
ARCH=arm64 \
CC=clang \
LD=ld.lld \
HOSTCC=clang \
HOSTCXX=clang++ \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi- \
sunfish_defconfig

make -j$(nproc) \
O=out \
ARCH=arm64 \
CC=clang \
LD=ld.lld \
HOSTCC=clang \
HOSTCXX=clang++ \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi-

cp out/arch/arm64/boot/{dtbo.img,Image.lz4} "$ROOT_DIR/device/google/sunfish-kernel"
cp out/arch/arm64/boot/dts/google/qcom-base/sdmmagpie.dtb "$ROOT_DIR/device/google/sunfish-kernel"
4 changes: 2 additions & 2 deletions drivers/crypto/msm/qcedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
#define CACHE_LINE_SIZE 32
#define CE_SHA_BLOCK_SIZE SHA256_BLOCK_SIZE

static uint8_t _std_init_vector_sha1_uint8[] = {
static const uint8_t _std_init_vector_sha1_uint8[] = {
0x67, 0x45, 0x23, 0x01, 0xEF, 0xCD, 0xAB, 0x89,
0x98, 0xBA, 0xDC, 0xFE, 0x10, 0x32, 0x54, 0x76,
0xC3, 0xD2, 0xE1, 0xF0
};
/* standard initialization vector for SHA-256, source: FIPS 180-2 */
static uint8_t _std_init_vector_sha256_uint8[] = {
static const uint8_t _std_init_vector_sha256_uint8[] = {
0x6A, 0x09, 0xE6, 0x67, 0xBB, 0x67, 0xAE, 0x85,
0x3C, 0x6E, 0xF3, 0x72, 0xA5, 0x4F, 0xF5, 0x3A,
0x51, 0x0E, 0x52, 0x7F, 0x9B, 0x05, 0x68, 0x8C,
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1321,4 +1321,6 @@ config TOUCHSCREEN_SYNAPTICS_TCM

source "drivers/input/touchscreen/synaptics_tcm/Kconfig"

source "drivers/input/touchscreen/fts_touch/Kconfig"

endif
1 change: 1 addition & 0 deletions drivers/input/touchscreen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ obj-$(CONFIG_TOUCHSCREEN_SEC_TS) += sec_ts/
obj-$(CONFIG_TOUCHSCREEN_HIMAX_CHIPSET)» += hxchipset/
obj-$(CONFIG_TOUCHSCREEN_TBN) += qmi_tbn_v01.o touch_bus_negotiator.o
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_TCM) += synaptics_tcm/
obj-$(CONFIG_TOUCHSCREEN_FTS) += fts_touch/
1 change: 1 addition & 0 deletions drivers/input/touchscreen/fts_touch
Submodule fts_touch added at 0e5e23
4 changes: 2 additions & 2 deletions drivers/net/wireless/cnss_utils/cnss_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ static void cnss_utils_stop_avtimer(void)
pr_err("AV Timer is not supported\n");
}
#else
static void cnss_utils_start_avtimer(void)
static void __maybe_unused cnss_utils_start_avtimer(void)
{
pr_err("AV Timer is not supported\n");
}
EXPORT_SYMBOL(cnss_utils_start_avtimer);

static void cnss_utils_stop_avtimer(void)
static void __maybe_unused cnss_utils_stop_avtimer(void)
{
pr_err("AV Timer is not supported\n");
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,6 @@ source "drivers/staging/s2mpg01/Kconfig"

source "drivers/staging/wlan_mac/Kconfig"

source "drivers/staging/qcacld-3.0/Kconfig"

endif # STAGING
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_PI433) += pi433/
obj-$(CONFIG_S2MPG01) += s2mpg01/
obj-$(CONFIG_GOOGLE_WLAN_MAC) += wlan_mac/
obj-$(CONFIG_QCA_CLD_WLAN) += qcacld-3.0/
1 change: 1 addition & 0 deletions drivers/staging/fw-api
Submodule fw-api added at 0e771a
1 change: 1 addition & 0 deletions drivers/staging/qca-wifi-host-cmn
Submodule qca-wifi-host-cmn added at 4f14fd
1 change: 1 addition & 0 deletions drivers/staging/qcacld-3.0
Submodule qcacld-3.0 added at c0a059
2 changes: 1 addition & 1 deletion drivers/thermal/tsens-mtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct tsens_device *tsens_controller_is_present(void)
}
EXPORT_SYMBOL(tsens_controller_is_present);

static int tsens_mtc_reset_history_counter(unsigned int zone)
static int __maybe_unused tsens_mtc_reset_history_counter(unsigned int zone)
{
unsigned int reg_cntl, is_valid;
void __iomem *sensor_addr;
Expand Down
8 changes: 8 additions & 0 deletions drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#define USB_VENDOR_GENESYS_LOGIC 0x05e3
#define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01

extern int deny_new_usb;

/* Protect struct usb_device->state and ->children members
* Note: Both are also protected by ->dev.sem, except that ->state can
* change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
Expand Down Expand Up @@ -4868,6 +4870,12 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
goto done;
return;
}

if (deny_new_usb) {
dev_err(&port_dev->dev, "denied insert of USB device on port %d\n", port1);
goto done;
}

if (hub_is_superspeed(hub->hdev))
unit_load = 150;
else
Expand Down
3 changes: 3 additions & 0 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include <linux/oom.h>
#include <linux/compat.h>
#include <linux/vmalloc.h>
#include <linux/random.h>

#include <linux/uaccess.h>
#include <asm/mmu_context.h>
Expand Down Expand Up @@ -321,6 +322,8 @@ static int __bprm_mm_init(struct linux_binprm *bprm)
arch_bprm_mm_init(mm, vma);
up_write(&mm->mmap_sem);
bprm->p = vma->vm_end - sizeof(void *);
if (randomize_va_space)
bprm->p ^= get_random_int() & ~PAGE_MASK;
return 0;
err:
up_write(&mm->mmap_sem);
Expand Down
2 changes: 1 addition & 1 deletion fs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ unsigned int pipe_max_size = 1048576;
/*
* Minimum pipe size, as required by POSIX
*/
unsigned int pipe_min_size = PAGE_SIZE;
unsigned int pipe_min_size __read_only = PAGE_SIZE;

/* Maximum allocatable pages per user. Hard limit is unset by default, soft
* matches default values.
Expand Down
Loading