summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* thermal: tsens: Avoid implicit enum conversions in th_state fieldslineage-18.1Nathan Chancellor2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang warns: ../drivers/thermal/msm-tsens.c:998:41: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.crit_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1012:41: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.high_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1028:40: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.low_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1074:42: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.high_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1085:41: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.low_th_state = mode; ~ ^~~~ 5 warnings generated. Fixes: 2021d15137a3 ("thermal: tsens: Enable TSENS") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Change-Id: Ib06c8a57d7227da64684c4fa21ac2b9828034e28
* configs: z2: Enable CRYPTO_SHA512Davide Garberi2021-10-07
| | | | | | * This is a requirement when setting manifest level 3 Change-Id: I718c74467da82c08752a39d40f4f6387e2b29ea7
* Revert "msm: kgsl: Mark the scratch buffer as privileged"LuK13372021-10-07
| | | | | | | | * Requires new GPU firmware This reverts commit adec4f93e1705640e7b03d33394224ff5d835280. Change-Id: I747c00bff92f6e793f207839a7ad0a61b2656f96
* msm:ADSPRPC :Fix to avoid Use after free in fastrpc_internal_munmapVamsi krishna Gattupalli2021-10-07
| | | | | | | | | Added a check to validate map before freeing it to avoid Use after free scenario. Change-Id: Ic723a4fe964a4909119663500018f2a07976105b Signed-off-by: Vamsi krishna Gattupalli <vgattupa@codeaurora.org> CVE-2021-1927
* msm: adsprpc: Add secure flag to justice if use secure_domain or notzhaochen2021-10-07
| | | | | | | | | Reslove the problem of kernel log print continuous when do not use secure_domain feature in fastrpc. Change-Id: I3f0c13ea104b21670a5639bb13ebfd07a5ec59a6 Signed-off-by: zhaochen <zhaochen@codeaurora.org> Signed-off-by: Arian <arian.kulmer@web.de>
* of: batterydata: add a relaxed version of battery resistance checksYaroslav Furman2021-10-07
| | | | | | | | | | There are some replacement batteries that have higher than 100 kohm. They are """fine""" to use since they have the same capacity and seem to have the same name as the latest battery revision for Z2 from lenovo. Let's allow people to use those batteries. Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Change-Id: I2605d127e0b0a80b469fdfb6519c19dc25f05569
* usb_bam: Fix enum conversion warningsNathan Chancellor2021-10-07
| | | | Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* staging: ion: Fix enum conversion warningsNathan Chancellor2021-10-07
| | | | | | | | | Clang complains about converting between ion_heap_type and msm_ion_heap_type. They ultimately don't conflict with each other as msm_ion_heap_type supplements ion_heap_type but Clang can't see that. Just change type into a int. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* thermal: tsens: Fix enum conversion warningsNathan Chancellor2021-10-07
| | | | Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* ASoC: msm: qdsp6v2: Fix non-literal-null-conversion warningyarost122021-10-07
| | | | | | | | | | | ../sound/soc/msm/qdsp6v2/q6lsm.c:255:33: error: expression which evaluates to zero treated as a null pointer constant of type 'struct lsm_client *' [-Werror,-Wnon-literal-null-conversion] lsm_session[client->session] = LSM_INVALID_SESSION_ID; ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: yarost12 <yaro330@gmail.com> Signed-off-by: Albert I <krascgq@outlook.co.id> [nathanchance: Improve changelog text] Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* fbdev: lcd_effect: Fix a self-assign warningDavide Garberi2021-10-07
| | | | | | | | | | drivers/video/fbdev/msm/lcd_effect.c:689:15: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] mode_index=mode_index; ~~~~~~~~~~^~~~~~~~~~~ 1 warning generated. Change-Id: I7775e0004e32e649d2c9934cc7acc134941839ae
* qseecom_legacy: Fix ignored-attributes warningsDavide Garberi2021-10-07
| | | | | | | | drivers/misc/qseecom_legacy.h:36:1: warning: attribute 'packed' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes] __packed struct qse_pr_init_sb_req_s { ^ Change-Id: I06c1fb4f0a9d63453857342861123caea7edbb05
* sched/sysctl: Fix one more attribute on extern declarationNathan Chancellor2021-10-07
| | | | Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* icnss: Fix enum-conversion warning from ClangNathan Chancellor2021-10-07
| | | | | | | | | | | ../drivers/soc/qcom/icnss.c:3154:37: warning: implicit conversion from enumeration type 'enum icnss_driver_mode' to different enumeration type 'enum wlfw_driver_mode_enum_v01' [-Wenum-conversion] ret = wlfw_wlan_mode_send_sync_msg(mode); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~ 1 warning generated. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* Partially revert "kernel: Fix build errors with LLVM"Michael Bestas2021-10-07
| | | | | | | | Not necessary since we used the proper upstream commits. This partially reverts commit 6dbab77b6ddda309f56027f135f1eede33b76c2c. Change-Id: I305812d2d82a603197383cb4eff6fae91352378b
* cfg80211: Support backport of removing ieee80211Srinivas Girigowda2021-10-07
| | | | | | | Bug: 62058353 Change-Id: Id8725947048bb4ba461dcb77b7b9023991a304be Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* BACKPORT: cfg80211: remove enum ieee80211_bandJohannes Berg2021-10-07
| | | | | | | | | | | | | This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Change-Id: Ifc56e6297146c9095432b757fabd0c463d7cc583 Signed-off-by: Johannes Berg <johannes.berg@intel.com> Bug: 62057517 Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* drivers: soc: qcom: fix register names on ARM64Greg Hackmann2021-10-07
| | | | | | | | | | | | gcc apparently lets you use r0, r1, etc. as register names even in aarch64 mode. clang does not. This change has no impact on the code generated by gcc (confirmed by disassembling scm.o with and without the patch). Change-Id: I8a7103738bb6603693287afd22c0346cb397458e Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* sched/core: Properly fix constant logical operand Clang warningSultan Alsawaf2021-10-07
| | | | | | | | When sched_feat(NONTASK_CAPACITY) evaluates to a constant at compile time, Clang is unhappy. Use a double negation to make the constant boolean so that Clang is happy. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
* scripts/dtc: Remove redundant YYLOC global declarationDirk Mueller2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e33a814e772cdc36436c8c188d8c42d019fda639 upstream. gcc 10 will default to -fno-common, which causes this error at link time: (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here This is because both dtc-lexer as well as dtc-parser define the same global symbol yyloc. Before with -fcommon those were merged into one defintion. The proper solution would be to to mark this as "extern", however that leads to: dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls] 26 | extern YYLTYPE yylloc; | ^~~~~~ In file included from dtc-lexer.l:24: dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here 127 | extern YYLTYPE yylloc; | ^~~~~~ cc1: all warnings being treated as errors which means the declaration is completely redundant and can just be dropped. Signed-off-by: Dirk Mueller <dmueller@suse.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [robh: cherry-pick from upstream] Cc: stable@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> [nc: Also apply to dtc-lexer.lex.c_shipped due to a lack of e039139be8c2, where dtc-lexer.l started being used] Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Makefile: Use cc-option to disable Qualcomm defined featuresPrasad Sodagudi2021-10-07
| | | | | | | | | | | undefined-optimized and tautological and Qualcomm defined features. To disable these compiler options use cc-option instead of disabling directly. Without using cc-options upsteam clang would complain about undefined-optimized and tautological options. Change-Id: I9507600a9286ec6aff42160d2d77733594b891de Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
* ANDROID: Kbuild, LLVMLinux: disable clang -Wpointer-bool-conversionGreg Hackmann2021-10-07
| | | | | | | | | | | | clang warns when converting the address of an array or function to boolean, since it can never be NULL. The kernel relies on gcc silently optimizing these checks away, like when dealing with cpumask_var_t (which can be either a pointer or an array object, depending on the value of CONFIG_CPUMASK_OFFSTACK). Change-Id: I322568a6e467d7278f065503f37dd1dddd340ef4 Signed-off-by: Greg Hackmann <ghackmann@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
* scripts: Remove gcc-wrapperDavide Garberi2021-10-07
| | | | | | This reverts commit cc95d2b6c234982b6b54a0b82e0ca5c5c1361f57. Change-Id: Iec442fe259029482bf94e517fe825af5e6f1b1dd
* FROMLIST: arm64: Build vDSO with -ffixed-x18Peter Collingbourne2021-10-07
| | | | | | | | | | | | | | | | | | | | | | The vDSO needs to be build with x18 reserved in order to accommodate userspace platform ABIs built on top of Linux that use the register to carry inter-procedural state, as provided for by the AAPCS. An example of such a platform ABI is the one that will be used by an upcoming version of Android. Although this change is currently a no-op due to the fact that the vDSO is currently implemented in pure assembly on arm64, it is necessary in order to prepare for another change [1] that will add C code to the vDSO. [1] https://patchwork.kernel.org/patch/10044501/ Change-Id: Icaac4b1c9127d81d754d3b8688274e9afc781760 Signed-off-by: Peter Collingbourne <pcc@google.com> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Cc: Mark Salyzyn <salyzyn@google.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-arm-kernel@lists.infradead.org
* ANDROID: CROSS_COMPILE_ARM32 must work if CONFIG_COMPAT_VDSOMark Salyzyn2021-10-07
| | | | | | | | | | Prevent surprise loss of vdso32 support. Signed-off-by: Mark Salyzyn <salyzyn@google.com> Bug: 63737556 Bug: 20045882 Bug: 19198045 Change-Id: I8b381f7649b95b298ea9e1a99aa3794c7bc08d09
* FROMLIST: BACKPORT: [PATCH 6/6] arm64: Wire up and expose the new compat vDSOKevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10060447/) Expose the new compat vDSO via the COMPAT_VDSO config option. The option is not enabled in defconfig because we really need a 32-bit compiler this time, and we rely on the user to provide it themselves by setting CROSS_COMPILE_ARM32. Therefore enabling the option by default would make little sense, since the user must explicitly set a non-standard environment variable anyway. CONFIG_COMPAT_VDSO is not directly used in the code, because we want to ignore it (build as if it were not set) if the user didn't set CROSS_COMPILE_ARM32. If the variable has been set to a valid prefix, CONFIG_VDSO32 will be set; this is the option that the code and Makefiles test. For more flexibility, like CROSS_COMPILE, CROSS_COMPILE_ARM32 can also be set via CONFIG_CROSS_COMPILE_ARM32 (the environment variable overrides the config option, as expected). Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Also needs to set CONFIG_ARM_ARCH_TIMER_VCT_ACCESS when CONFIG_VDSO32 is selected. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Dave Martin <Dave.Martin@arm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Bug: 63737556 Bug: 20045882 Change-Id: Ie8a7d6c2b5ba3edca591a9a953ce99ec792da882
* FROMLIST: BACKPORT: [PATCH 5/6] arm64: compat: 32-bit vDSO setupKevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10060459/) If the compat vDSO is enabled, install it in compat processes. In this case, the compat vDSO replaces the sigreturn page (it provides its own sigreturn trampolines). Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Dave Martin <Dave.Martin@arm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Bug: 63737556 Bug: 20045882 Change-Id: Ia6acf4c3ffea636bc750ac00853ea762c182e5b5
* FROMLIST: [PATCH 4/6] arm64: compat: Add a 32-bit vDSOKevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10060445/) Provide the files necessary for building a compat (AArch32) vDSO in kernel/vdso32. This is mostly an adaptation of the arm vDSO. The most significant change in vgettimeofday.c is the use of the arm64 vdso_data struct, allowing the vDSO data page to be shared between the 32 and 64-bit vDSOs. Additionally, a different set of barrier macros is used (see aarch32-barrier.h), as we want to support old 32-bit compilers that may not support ARMv8 and its new barrier arguments (*ld). In addition to the time functions, sigreturn trampolines are also provided, aiming at replacing those in the sigreturn page as the latter don't provide any unwinding information (and it's easier to have just one "user code" page). arm-specific unwinding directives are used, based on glibc's implementation. Symbol offsets are made available to the kernel using the same method as the 64-bit vDSO. There is unfortunately an important caveat: we cannot get away with hand-coding 32-bit instructions like in kernel/kuser32.S, this time we really need a 32-bit compiler. The compat vDSO Makefile relies on CROSS_COMPILE_ARM32 to provide a 32-bit compiler, appropriate logic will be added to the arm64 Makefile later on to ensure that an attempt to build the compat vDSO is made only if this variable has been set properly. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Dave Martin <Dave.Martin@arm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Bug: 63737556 Bug: 20045882 Change-Id: I3fb9d21b29bd9fec1408f2274d090e6def546b0d
* FROMLIST: [PATCH 3/6] arm64: Refactor vDSO init/setupKevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10060439/) Move the logic for setting up mappings and pages for the vDSO into static functions. This makes the vDSO setup code more consistent with the compat side and will allow to reuse it for the future compat vDSO. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Dave Martin <Dave.Martin@arm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Bug: 63737556 Bug: 20045882 Change-Id: I13e84479591091669190360f2a7f4d04462e6344
* FROMLIST: [PATCH 2/6] arm64: elf: Set AT_SYSINFO_EHDR in compat processesKevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10060431/) If the compat vDSO is enabled, we need to set AT_SYSINFO_EHDR in the auxiliary vector of compat processes to the address of the vDSO code page, so that the dynamic linker can find it (just like the regular vDSO). Note that we cast context.vdso to Elf64_Off, instead of elf_addr_t, because elf_addr_t is Elf32_Off in compat_binfmt_elf.c, and casting context.vdso to u32 would trigger a pointer narrowing warning. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Dave Martin <Dave.Martin@arm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Bug: 63737556 Bug: 20045882 Change-Id: I5d0b191d3b2f4c0b2ec31fe9faef0246253635ce
* FROMLIST: [PATCH 1/6] arm64: compat: Use vDSO sigreturn trampolines if availableKevin Brodsky2021-10-07
| | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10060449/) If the compat vDSO is enabled, it replaces the sigreturn page. Therefore, we use the sigreturn trampolines the vDSO provides instead. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Bug: 63737556 Bug: 20045882 Change-Id: Ic0933741e321e1bf66409b7e190a776f12948024
* FROMLIST: lib: vdso: add support for timeMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10053549/) Add time() vdso support to match up with existing support in the x86's vdso. Currently benefitting arm and arm64 which uses the common vgettimeofday.c implementation. On arm provides about a ~14 fold improvement in speed over the straight syscall, and about a ~5 fold improvement in speed over an alternate library implementation that relies on the vdso call to gettimeofday to fulfill the request. We can provide __vdso_time even if we can not provide a speed enhanced __vdso_gettimeofday. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Bug: 63737556 Bug: 20045882 Change-Id: I0bb3c6bafe57f9ed69350e2dd54edaae58316e8f
* FROMLIST: [PATCH] arm64: compat: Expose offset to registers in sigframesKevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from url https://patchwork.kernel.org/patch/10006025/) This will be needed to provide unwinding information in compat sigreturn trampolines, part of the future compat vDSO. There is no obvious header the compat_sig* struct's should be moved to, so let's put them in signal32.h. Also fix minor style issues reported by checkpatch. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Andy Gross <andy.gross@linaro.org> Cc: Dave Martin <Dave.Martin@arm.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Bug: 63737556 Bug: 20045882 Change-Id: I9c23dd6b56ca48c0953cbf78ccb7b49ded906052
* FROMLIST: [PATCH v5 12/12] lib: vdso: do not expose gettimeofday, if no arch ↵Mark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | supported timer (cherry pick from url https://patchwork.kernel.org/patch/10044539/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. If ARCH_PROVIDES_TIMER is not defined, do not expose gettimeofday. libc will default directly to syscall. Also ifdef clock_gettime switch cases and stubs if not supported and other unused components. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I362a7114db0aac800e16eb90d14a8739e18f42e4
* FROMLIST: [PATCH v5 11/12] lib: vdso: Add support for CLOCK_BOOTTIMEMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10044503/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Add a case for CLOCK_BOOTTIME as it is popular for measuring relative time on systems expected to suspend() or hibernate(). Android uses CLOCK_BOOTTIME for all relative time measurements and timeouts. Switching to vdso reduced CPU utilization and improves accuracy. There is also a desire by some partners to switch all logging over to CLOCK_BOOTTIME, and thus this operation alone would contribute to a near percentile CPU load. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I76c26b054baf7f1100e03c65d6b16fe649b883b1
* FROMLIST: [PATCH v5 10/12] arm64: vdso: replace gettimeofday.S with global ↵Mark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vgettimeofday.C (cherry picked from url https://patchwork.kernel.org/patch/10044501/) Take an effort from the previous 9 patches to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. apinski@cavium.com makes the following claims in the original patch: This allows the compiler to optimize the divide by 1000 and remove the other divides. On ThunderX, gettimeofday improves by 32%. On ThunderX 2, gettimeofday improves by 18%. Note I noticed a bug in the old (arm64) implementation of __kernel_clock_getres; it was checking only the lower 32bits of the pointer; this would work for most cases but could fail in a few. <end of claim> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I71ff27ff5bfa323354fda6867b01ec908d8d6cbd
* FROMLIST: [PATCH v5 09/12] arm: vdso: move vgettimeofday.c to lib/vdso/Mark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10044497/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Declare arch/arm/vdso/vgettimeofday.c to be a candidate for a global implementation of the vdso timer calls. The hope is that new architectures can take advantage of the current unification of arm and arm64 implementations. We urge future efforts to merge their implementations into the global vgettimeofday.c file and thus provide functional parity. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: If7da1d8144684d52ed9520a581e6023c623df931
* FROMLIST: [PATCH v5 08/12] arm: vdso: Add ARCH_CLOCK_FIXED_MASKMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from url https://patchwork.kernel.org/patch/10044543/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Add ARCH_CLOCK_FIXED_MASK as an efficiency since arm64 has no purpose for cs_mask vdso_data variable. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20057882 Change-Id: Iadf94bed6166d2ee43bb46bdf54636618e4b8854
* FROMLIST: [PATCH v5 07/12] arm: vdso: disable profilingMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10044491/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Make sure kasan and ubsan profiling, and kcov instrumentation, is turned off for VDSO code. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I2b44c1edd81665b8bb235a65ba642767c35f1e61
* FROMLIST: [PATCH v5 06/12] arm: vdso: add support for clock_getresMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from url https://patchwork.kernel.org/patch/10044545/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Add clock_getres vdso support to match up with existing support in the arm64's vdso. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: Ie37bf76d2992027f06a2cdd001d8654a860d2aac
* FROMLIST: [PATCH v6 05/12] arm: vdso: Add support for CLOCK_MONOTONIC_RAWMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from url https://patchwork.kernel.org/patch/10052099/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Add a case for CLOCK_MONOTONIC_RAW to match up with support that is available in arm64's vdso. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: If9c09d131e236ba4a483dbc122e6b876f471df72
* FROMLIST: [PATCH v5 04/12] arm: vdso: do calculations outside reader loopsMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from url https://patchwork.kernel.org/patch/10044477/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. In variable timer reading loops, pick up just the values until all are synchronized, then outside of loop pick up cntvct and perform calculations to determine final offset, shifted and multiplied output value. This replaces get_ns with get_clock_shifted_nsec as cntvct reader. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I8008197f08485ef89b267128e41624ff69c33f6b
* FROMLIST: [PATCH v5 03/12] arm: vdso: inline assembler operations to compiler.hMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit https://patchwork.kernel.org/patch/10044507/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Move compiler-specific code to a local compiler.h file: - CONFIG_AEABI dependency check. - System call fallback functions standardized into a DEFINE_FALLBACK macro. - Replace arch_counter_get_cntvct() with arch_vdso_read_counter. - Deal with architecture specific unresolved references emitted by GCC. - Optimize handling of fallback calls in callers. - For time functions that always return success, do not waste time checking return value for switch to fallback. - Optimize unlikely nullptr checking in __vdso_gettimeofday, if tv null no need to proceed to fallback, as vdso is still capable of filling in the tv values. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I468e4c32b5136d199982bf25df8967321e384d90
* FROMLIST: [PATCH v5 02/12] arm: vdso: add include file defining __get_datapage()Mark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from url https://patchwork.kernel.org/patch/10044481/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Define the prototype for __get_datapage() in local datapage.h header. Rename all vdata variable that point to the datapage shortened to vd to relect a consistent and concise style. Make sure that all references to the datapage in vdso operations are readonly (const). Make sure datapage is first parameter to all subroutines to also be consistent. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I9512b49d36d53ca1b71d3ff82219a7c64e0fc613
* FROMLIST: [PATCH v5 01/12] arm: vdso: rename vdso_datapage variablesMark Salyzyn2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from url https://patchwork.kernel.org/patch/10044505/) Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski <apinski@cavium.com>, rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. Rename seq_count to tb_seq_count. Rename tk_is_cntvct to use_syscall. Rename cs_mult to cs_mono_mult. All to align with the variables in the arm64 vdso datapage. Rework vdso_read_begin() and vdso_read_retry() functions to reflect modern access patterns for tb_seq_count field. Update copyright message to reflect the start of the contributions in this series. Signed-off-by: Mark Salyzyn <salyzyn@android.com> Cc: James Morse <james.morse@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Laura Abbott <labbott@redhat.com> Cc: Kees Cook <keescook@chromium.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Andy Gross <andy.gross@linaro.org> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Andrew Pinski <apinski@cavium.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Bug: 63737556 Bug: 20045882 Change-Id: I13f16e71b1ecba3d72b999caafef72e3c7f48dfe
* FROMLIST: [PATCH v2 3/3] arm64: compat: Add CONFIG_KUSER_HELPERSKevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | (cherry picked from url http://lkml.iu.edu/hypermail/linux/kernel/1709.1/01903.html) Make it possible to disable the kuser helpers by adding a KUSER_HELPERS config option (enabled by default). When disabled, all kuser helpers-related code is removed from the kernel and no mapping is done at the fixed high address (0xffff0000); any attempt to use a kuser helper from a 32-bit process will result in a segfault. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Bug: 9674955 Bug: 63737556 Bug: 20045882 Change-Id: Ie8c543301d39bfe88ef71fb6a669e571914b117b
* FROMLIST: [PATCH v2 2/3] arm64: compat: Split the sigreturn trampolines and ↵Kevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kuser helpers (assembler sources) (cherry picked from url http://lkml.iu.edu/hypermail/linux/kernel/1709.1/01902.html) AArch32 processes are currently installed a special [vectors] page that contains the sigreturn trampolines and the kuser helpers, at the fixed address mandated by the kuser helpers ABI. Having both functionalities in the same page has become problematic, because: * It makes it impossible to disable the kuser helpers (the sigreturn trampolines cannot be removed), which is possible on arm. * A future 32-bit vDSO would provide the sigreturn trampolines itself, making those in [vectors] redundant. This patch addresses the problem by moving the sigreturn trampolines sources to its own file. Wrapped the comments to reduce the wrath of checkpatch.pl. Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Bug: 9674955 Bug: 63737556 Bug: 20045882 Change-Id: I1d7b96e7cfbe979ecf4cb4996befd1f3ae0e64fd
* FROMLIST: [PATCH v2 1/3] arm64: compat: Split the sigreturn trampolines and ↵Kevin Brodsky2021-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kuser helpers (C sources) (cherry picked from url http://lkml.iu.edu/hypermail/linux/kernel/1709.1/01901.html) AArch32 processes are currently installed a special [vectors] page that contains the sigreturn trampolines and the kuser helpers, at the fixed address mandated by the kuser helpers ABI. Having both functionalities in the same page has become problematic, because: * It makes it impossible to disable the kuser helpers (the sigreturn trampolines cannot be removed), which is possible on arm. * A future 32-bit vDSO would provide the sigreturn trampolines itself, making those in [vectors] redundant. This patch addresses the problem by moving the sigreturn trampolines to a separate [sigpage] page, mirroring [sigpage] on arm. Even though [vectors] has always been a misnomer on arm64/compat, as there is no AArch32 vector there (and now only the kuser helpers), its name has been left unchanged, for compatibility with arm (there are reports of software relying on [vectors] being there as the last mapping in /proc/maps). mm->context.vdso used to point to the [vectors] page, which is unnecessary (as its address is fixed). It now points to the [sigpage] page (whose address is randomized like a vDSO). Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com> Signed-off-by: Mark Salyzyn <salyzyn@android.com> Bug: 9674955 Bug: 63737556 Bug: 20045882 Change-Id: I52a56ea71d7326df8c784f90eb73b5c324fe9d20
* configs: Update scheduler optionsDavide Garberi2021-10-07
| | | | | | | | | * Enable BFQ and CFQ * Set noop as default for the bootup * Disable the iosched test, just useless Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Change-Id: I6247ddc569f116d7aeb7b929f0d6bb3c5eee5e31
* blk-iosched: fix compilationYaroslav Furman2021-10-07
| | | | | | | | | | Patch "block: do not merge requests without consulting with io scheduler" is backported from 4.8 (if I'm not mistaken) when bfq wasn't merged in mainline Linux, so this patch wasn't applied for it. Do it. Signed-off-by: Yaroslav Furman <yaro330@gmail.com>