summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-03-29kdbus: build and package kdbus-testssandbox/lstelmach/rpi3-kdbusŁukasz Stelmach1-0/+27
Change-Id: Icfcecc2780e6c5cdddaad0440b731ebb9dc49446 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26kdbus: test suite changed to common formatKonrad Lipinski31-3776/+3066
This commit adapts the kdbus test suite to use with dbus-integration-tests. Change-Id: Ifee21253f4e3c732b27517a0c566d4b9a569d5af Origin: commit:2c0f308e6d963987fcb4e5754f504028d4511629 Signed-off-by: Adrian Szyndela <adrian.s@samsung.com> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26ARM/ARM64: Enable KDBUS in tizen defconfigsŁukasz Stelmach2-0/+2
Change-Id: Ib1680e530acf3cb9161cdb53b5db5ef87f51df8c Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26kdbus: porting to to 4.19Łukasz Stelmach1-2/+2
The following changes were made to adapt kdbus driver to 4.19 kernel - use memfd_fcntl() instead of shmem_get_seals() Change-Id: Iff24cd3c429310c3af748657a24a5e35db738635 Fixes: 5aadc431a593 ("shmem: rename functions that are memfd-related") Fixes: 5d752600a8c3 ("mm: restructure memfd code") Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26kdbus: Revert "fs: unexport poll_schedule_timeout"Łukasz Stelmach2-1/+4
This reverts commit 8f546ae1fc5ce8396827d4868c7eee1f1cc6947a. Change-Id: I5429471eeb092c55a50e37c0b642d50d69daebc7 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26kdbus: porting to 4.14Adrian Szyndela12-30/+54
This commit makes kdbus driver working with kernel 4.14. It also enabled compilation of the driver if enabled in config. The list of changes needed to make it compile with kernel 4.14: - Add missing includes for <linux/cred.h> - put inode_lock()/inode_unlock() in place of explicit mutex locking - replace CURRENT_TIME with proper call to current_time() - replace PAGE_CACHE_* with PAGE_* - replace GFP_TEMPORARY with GFP_KERNEL - use kvecs for kernel memory, iovec for user memory instead of only iovec for both - fix usage of task_cgroup_path() - replace GROUP_AT usage with 'gid' field dereference - add 0 as an argument to init_name_hash - add 0 as flags as an argument to vfs_iter_write - replace __vfs_read with kernel_read to allow compilation into module Change-Id: Ifed3a6d3a37082a900a64316af1c8a21ab30e84e Origin: commit:846051292431cc81adb852c2b0cbbfddac4a3d48 Signed-off-by: Adrian Szyndela <adrian.s@samsung.com> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26kdbus: the driver, original and non-workingAdrian Szyndela90-1/+34531
[based on commit 216823ac83c0ab89348e2ed6f66179f53626586e] Introduce the kdbus driver again. This driver worked previously on kernel 4.1. This is the source code taken from the working driver. It is non-working and disabled. It is a base for porting. The documentation is moved from Documentation to ipc/kdbus/Documentation. The references to kdbus source code are commented out or removed in Makefiles. Original authors of the files are those from commit 216823ac83c0ab8934. Cherry-picked from 5.4 commit e2d621efdb4f1c1a6e782121d95b62ea249828f2 Change-Id: If8baeb585b5ecedd4286553405c3a8d24fed9c3a Signed-off-by: Adrian Szyndela <adrian.s@samsung.com> Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26spec: set CONFIG_LOCALVERSIONŁukasz Stelmach1-3/+3
Set CONFIG_LOCALVERSION insetad of EXTRAVERSION in Makefile to carry information about the platform variant. Change-Id: I72986cb618b998983f1e9f6eccba7d6e4603248f Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26spec: support gbs(1) incremental buildsŁukasz Stelmach1-24/+27
gbs(1) enable incremental builds that are significantly faster, hoewever, spec files need some adjustments. + You can't use -n <name> with %setup + use rsync(1) instead of cp(1)+find(1) to copy devel files Other changes are: + add _smp_mflags to make(1) things faster Change-Id: I18c47b59b1bfef17501ab57f39f93d7185592f13 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26WIPŁukasz Stelmach1-0/+0
Change-Id: Ie223000a1904a789942979e39e88c9af99a55feb
2021-03-26script: adjust ccache supportŁukasz Stelmach1-4/+4
Change-Id: Ia37a450bccf93ddf3daaca442be4d221df0d4036 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26script: Reformat to align with build-rpi4.shŁukasz Stelmach1-5/+12
Reformat the script to bring it into alignment with build-rpi4.sh for easier maintenance. Change-Id: Ie97a1acc28486e62630062587a30689a9f19e085 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26script: Detect number of CPUsŁukasz Stelmach1-2/+5
Automatically determine the number of parallel make(1) processes to run. Change-Id: I0ce778e5c15ceb8cf80bbfc2f4bb58c937630ba3 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-03-26WIPŁukasz Stelmach1-0/+0
Change-Id: I765977ba57c0c6ddbf35e6d6ff070309488a8bf3
2021-03-11packaging: not delete the vmlinux file to debugsubmit/tizen/20210311.062002accepted/tizen/unified/20210311.151443Jaehoon Chung1-1/+0
To debug with T32, it needs to use vmlinux file. Incldue its file in devel package. Change-Id: Ib01d80a99e08e99ecbdaa3a6e0787ac5dbe0e372 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-02-17ARM/ARM64: defconfig: disable SECURITY_SMACK_NETFILTER configsubmit/tizen/20210217.042922accepted/tizen/unified/20210217.120508Jaehoon Chung2-2/+0
Disable SECURITY_SMACK_NETFILTER configuration. Change-Id: Idcc1175672ea2c86c232d834589c1a7c364636aa Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-01-25ARM: tizen_bcm2709_defconfig: Enable OVERLAY_FSsubmit/tizen/20210125.080748accepted/tizen/unified/20210126.141632Seung-Woo Kim1-0/+1
Enable CONFIG_OVERLAY_FS for tizen application space. Change-Id: I79add9d8b79281074ae1dd1d12a9c65fa422410b Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2021-01-25ARM64: tizen_bcmrpi3_defconfig: Enable OVERLAY_FSSeung-Woo Kim1-0/+1
Enable CONFIG_OVERLAY_FS for tizen application space. Change-Id: I8c61e997c504467c0204d6e29b1c1f3ebac1c379 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-10-28ARM64: configs: tizen_bcmrpi3_defconfig: Enable BCM_VCIOsubmit/tizen/20201029.033227accepted/tizen/unified/20201029.124758Seung-Woo Kim1-0/+2
Enable userland broadcom mailbox support, CONFIG_BCM_VCIO, as like 32bit config. Change-Id: Ic0e33aaa2ed4040db57e8e48e2dabb2197cf9e4e Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-08-21Revert "WORKAROUND: security: smack: Allow ptracing even processes in ↵tizen_6.0.m2_releasesubmit/tizen_6.0_hotfix/20201103.115101submit/tizen_6.0_hotfix/20201102.192901submit/tizen_6.0/20201029.205501submit/tizen/20200820.145124accepted/tizen/unified/20200824.030014accepted/tizen/6.0/unified/hotfix/20201103.000028accepted/tizen/6.0/unified/20201030.104525tizen_6.0_hotfixtizen_6.0accepted/tizen_6.0_unified_hotfixaccepted/tizen_6.0_unifiedSeung-Woo Kim1-2/+0
onlycap set" This reverts commit 718567d336d0b0943385905bb12707552d8bef66. Now crash-worker has System::Privileged privilege, so not anymore ptrace related workaround is necessary. So revert the workaround. Change-Id: I42b535e4152eb742df011a5a08324764b49f989a Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-08-10WORKAROUND: security: smack: Allow ptracing even processes in onlycap setsubmit/tizen/20200810.050403accepted/tizen/unified/20200810.123103Karol Lewandowski1-0/+2
Change-Id: I708d19703da0f1b83950454fda1362bec7369b5c Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-08-03Revert "brcmfmac: move configuration of probe request IEs"submit/tizen/20200803.071449accepted/tizen/unified/20200803.122234Jaehoon Chung2-7/+4
This reverts commit bd99a3013bdc00f8fc7534c657b39616792b4467. It doesn't find any p2p-device with wpa_supplicant on Tien. - After reverted this, it's working fine. Change-Id: I1cd77e65ad17078370116473dd46adc7338d6695 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-07-17ARM64: configs: tizen_bcmrpi3_defconfig: Enable FUSE_FSsubmit/tizen/20200717.080515accepted/tizen/unified/20200720.125614Seung-Woo Kim1-0/+1
Tizen requires CONFIG_FUSE_FS for user space filesystem. Enable the option. Change-Id: Ia4eefdcd95b5be4944a9717e69a4ce2deb31a081 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-07-17ARM: configs: tizen_bcm2709_defconfig: Enable FUSE_FSSeung-Woo Kim1-0/+1
Tizen requires CONFIG_FUSE_FS for user space filesystem. Enable the option. Change-Id: Icf66feb085fee5ab30e3b680d1914a51f276d9bd Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-06-25ARM: configs: tizen_bcm2709: revert BLK_DEV_RAM_COUNT to 16submit/tizen/20200625.095326accepted/tizen/unified/20200626.133447Jaehoon Chung1-1/+0
Revert BLK_DEV_RAM_COUNT to 16 - default value. Becaues there is timing issue about booting fail, use default value. Change-Id: Ida3985e9a48863abbc2bd14476edb146c3f5744f Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-06-25ARM64: configs: tizen_bcmrpi3: revert BLK_DEV_RAM_COUNT to 16Jaehoon Chung1-1/+0
Revert BLK_DEV_RAM_COUNT to 16 - default value. Becaues there is timing issue about booting fail, use default value. Change-Id: I1bec8f42fc719522510971ad5ec25512e57ee8aa Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-06-22ARM: configs: tizen_bcm2709: change BLK_DEV_RAM_SIZE to 32MBsubmit/tizen/20200622.213607accepted/tizen/unified/20200623.080553Jaehoon Chung1-1/+2
Change BLK_DEV_RAM_SIZE from 12MB to 32MB. And also change BLK_DEV_RAM_COUNT from 16 to 2. It doesn't need to keep /dev/ram0-16. Change-Id: If6acb3813061827a260e5b6414a34e06cfc0965b Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-06-22ARM64: configs: tizen_bcmrpi3: change BLK_DEV_RAM_SIZE to 32MBJaehoon Chung1-1/+2
Change BLK_DEV_RAM_SIZE from 12MB to 32MB. And also change BLK_DEV_RAM_COUNT from 16 to 2. It doesn't need to keep /dev/ram0-16. Change-Id: I598dba4abc102a7ba51f5419ad6871875b73165c Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-04-20packaging: Add build perf with unwind call-graph supportsubmit/tizen/20200421.025351accepted/tizen/unified/20200422.032151Seung-Woo Kim1-3/+10
To support perf unwind call-graph, add BuildRequires for unwind, dw, elfutils and other related devel packages. Also add definition to remove not necessary perl dependency Change-Id: I8e94ec4642026841255bbec08ae3dea2a8f5b531 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-04-20perf version: Fix segfault due to missing OPT_END()Ravi Bangoria1-0/+1
'perf version' on powerpc segfaults when used with non-supported option: # perf version -a Segmentation fault (core dumped) Fix this. Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Tested-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/20190611030109.20228-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> [sw0312.kim: cherry-pick mainline commit 916c31fff946 to fix possible seg.fault in Tizen armv7l] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: If19720350e2992d1f5e58711f1f708a4d4ec5683
2020-03-27brcmfmac: support firmware reporting 160 MHz channelsRafał Miłecki1-1/+3
So far 160 MHz channels were treated as 20 MHz ones which was breaking support for 40/80 MHz due to the brcmf_construct_chaninfo() logic and its assumptions. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> [sw0312.kim: backport mainline commit 30519cbe339a to show more 5G channels properly] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I62ca12dfd97d0cd3233840d5b569e768dc4a1672
2020-03-16rpi3: config_64bit: boot from u-boot instead of splsubmit/tizen/20200320.002931submit/tizen/20200319.052222submit/tizen/20200317.014342accepted/tizen/unified/20200320.074825Seung-Woo Kim1-3/+3
Now, Tizen does not support OPTEE by default, so u-boot-spl is not required. Boot from u-boot instead of u-boot-spl. Change-Id: Iadaee5290ede214b4f85487eea8e9151f9ea98f9 Ref: https://bugs.tizen.org/browse/TRE-2318 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-03-16ARM64: tizen_bcmrpi3_defconfig: Disable OPTEESeung-Woo Kim1-1/+0
Now, Tizen does not support OPTEE by default. Disable OPTEE config options. Change-Id: I424d38f42ad0e3199bd84517fb477dc212785be8 Ref: https://bugs.tizen.org/browse/TRE-2318 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-03-16ARM: dts: bcm2710-rpi-3: Change build macro for opteeSeung-Woo Kim3-3/+5
Now, Tizen does not support optee by default. Change build macro for optee related nodes in default case. Change-Id: Ib925414ba6fd96099ca984cc8b665263812b9538 Ref: https://bugs.tizen.org/browse/TRE-2318 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-01-20ARM64: tizen_bcmrpi3_defconfig: Disable RAID6_PQ_BENCHMARKsubmit/tizen/20200121.011335accepted/tizen/unified/20200121.121402Junghoon Kim1-0/+1
Skip the algorithm benchmarking process of RAID6 for the fast kernel startup. The option is not crucial for the rpi boards. Change-Id: I9c959bcf2bbb178e72bc4315a0734d8059ebd46b Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
2020-01-20ARM: tizen_bcm2709_defconfig: Disable RAID6_PQ_BENCHMARKJunghoon Kim1-0/+1
Skip the algorithm benchmarking process of RAID6 for the fast kernel startup. The option is not crucial for the rpi boards. Change-Id: If0a4748febb2fad3349b4327624943bdf42454d4 Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
2020-01-20lib/raid6: add option to skip algo benchmarkingDaniel Verkamp3-0/+16
This is helpful for systems where fast startup time is important. It is especially nice to avoid benchmarking RAID functions that are never used (for example, BTRFS selects RAID6_PQ even if the parity RAID mode is not in use). This saves 250+ milliseconds of boot time on modern x86 and ARM systems with a dozen or more available implementations. The new option is defaulted to 'y' to match the previous behavior of always benchmarking on init. Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Signed-off-by: Shaohua Li <shli@fb.com> [jhoon20.kim: backport from mainline for the fast kernel startup] Change-Id: I38c270c413d60de65f27cf9c95d44bb2e2d07ac2 Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
2020-01-06ARM: configs: tizen_bcm2709_defconfig: Enable missing NETFILTER options for ↵submit/tizen/20200108.013416accepted/tizen/unified/20200108.131400Seung-Woo Kim1-11/+54
nether To properly support nether rules, netfilter options are required including udplite, raw, mangle and others. Enable the missing NETFILTER options for nether. Ref: nether rule in https://git.tizen.org/cgit/platform/core/security/nether/tree/conf/nether.rules?h=tizen Change-Id: I7cb0b1f669e412540085a05fcbb95d5fc7afaffc Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-01-06ARM64: configs: tizen_bcmrpi3_defconfig: Enable missing NETFILTER options ↵Seung-Woo Kim1-9/+54
for nether To properly support nether rules, netfilter options are required including udplite, raw, mangle and others. Enable the missing NETFILTER options for nether. Ref: nether rule in https://git.tizen.org/cgit/platform/core/security/nether/tree/conf/nether.rules?h=tizen Change-Id: I9017da2dc9bc74a83488f8b74e843d2ff23395a2 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-01-06ARM: configs: tizen_bcm2709_defconfig: Enable USB SERIAL drivers for modemSeung-Woo Kim1-0/+8
To support usb modem dongle and related devices, enable USB SERIAL drivers and ppp network interface to support the modem. Change-Id: I0f496f38e20f6816653dad354efde1519a54670c Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-01-06ARM64: configs: tizen_bcmrpi3_defconfig: Enable USB SERIAL drivers for modemSeung-Woo Kim1-0/+10
To support usb modem dongle and related devices, enable USB SERIAL drivers and ppp network interface to support the modem. Change-Id: I3caf00b94edc0ad98ae95687bfc8d0b845413cfb Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-12-31arm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGSsubmit/tizen/20200102.014302accepted/tizen/unified/20200102.220851Nathan Chancellor1-1/+1
commit fa63da2ab046b885a7f70291aafc4e8ce015429b upstream. This is a GCC only option, which warns about ABI changes within GCC, so unconditionally adding it breaks Clang with tons of: warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option] and link time failures: ld.lld: error: undefined symbol: __efistub___stack_chk_guard >>> referenced by arm-stub.c:73 (/home/nathan/cbl/linux/drivers/firmware/efi/libstub/arm-stub.c:73) >>> arm-stub.stub.o:(__efistub_install_memreserve_table) in archive ./drivers/firmware/efi/libstub/lib.a These failures come from the lack of -fno-stack-protector, which is added via cc-option in drivers/firmware/efi/libstub/Makefile. When an unknown flag is added to KBUILD_CFLAGS, clang will noisily warn that it is ignoring the option like above, unlike gcc, who will just error. $ echo "int main() { return 0; }" > tmp.c $ clang -Wno-psabi tmp.c; echo $? warning: unknown warning option '-Wno-psabi' [-Wunknown-warning-option] 1 warning generated. 0 $ gcc -Wsometimes-uninitialized tmp.c; echo $? gcc: error: unrecognized command line option ‘-Wsometimes-uninitialized’; did you mean ‘-Wmaybe-uninitialized’? 1 For cc-option to work properly with clang and behave like gcc, -Werror is needed, which was done in commit c3f0d0bc5b01 ("kbuild, LLVMLinux: Add -Werror to cc-option to support clang"). $ clang -Werror -Wno-psabi tmp.c; echo $? error: unknown warning option '-Wno-psabi' [-Werror,-Wunknown-warning-option] 1 As a consequence of this, when an unknown flag is unconditionally added to KBUILD_CFLAGS, it will cause cc-option to always fail and those flags will never get added: $ clang -Werror -Wno-psabi -fno-stack-protector tmp.c; echo $? error: unknown warning option '-Wno-psabi' [-Werror,-Wunknown-warning-option] 1 This can be seen when compiling the whole kernel as some warnings that are normally disabled (see below) show up. The full list of flags missing from drivers/firmware/efi/libstub are the following (gathered from diffing .arm64-stub.o.cmd): -fno-delete-null-pointer-checks -Wno-address-of-packed-member -Wframe-larger-than=2048 -Wno-unused-const-variable -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -ffreestanding -fno-stack-protector Use cc-disable-warning so that it gets disabled for GCC and does nothing for Clang. Fixes: ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift") Link: https://github.com/ClangBuiltLinux/linux/issues/511 Reported-by: Qian Cai <cai@lca.pw> Acked-by: Dave Martin <Dave.Martin@arm.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: cherry-pick from stable linux-4.19.y commit 85a3b1ef969b for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I264a7663478de10d196d8550349098552fe02544
2019-12-31arm64: Silence gcc warnings about arch ABI driftDave Martin1-0/+1
[ Upstream commit ebcc5928c5d925b1c8d968d9c89cdb0d0186db17 ] Since GCC 9, the compiler warns about evolution of the platform-specific ABI, in particular relating for the marshaling of certain structures involving bitfields. The kernel is a standalone binary, and of course nobody would be so stupid as to expose structs containing bitfields as function arguments in ABI. (Passing a pointer to such a struct, however inadvisable, should be unaffected by this change. perf and various drivers rely on that.) So these warnings do more harm than good: turn them off. We may miss warnings about future ABI drift, but that's too bad. Future ABI breaks of this class will have to be debugged and fixed the traditional way unless the compiler evolves finer-grained diagnostics. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org> [sw0312.kim: cherry-pick from stable linux-4.19.y commit 71d019a6dae9 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I6a6ca56261860468207555d869f5a90882565c4b
2019-12-31tracing: Silence GCC 9 array bounds warningMiguel Ojeda3-10/+20
commit 0c97bf863efce63d6ab7971dad811601e6171d2f upstream. Starting with GCC 9, -Warray-bounds detects cases when memset is called starting on a member of a struct but the size to be cleared ends up writing over further members. Such a call happens in the trace code to clear, at once, all members after and including `seq` on struct trace_iterator: In function 'memset', inlined from 'ftrace_dump' at kernel/trace/trace.c:8914:3: ./include/linux/string.h:344:9: warning: '__builtin_memset' offset [8505, 8560] from the object at 'iter' is out of the bounds of referenced subobject 'seq' with type 'struct trace_seq' at offset 4368 [-Warray-bounds] 344 | return __builtin_memset(p, c, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to avoid GCC complaining about it, we compute the address ourselves by adding the offsetof distance instead of referring directly to the member. Since there are two places doing this clear (trace.c and trace_kdb.c), take the chance to move the workaround into a single place in the internal header. Link: http://lkml.kernel.org/r/20190523124535.GA12931@gmail.com Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> [ Removed unnecessary parenthesis around "iter" ] Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: cherry-pick stable linux-4.19.y commit c493ead38adb for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I660c183206836972e5e39ff54ccfdd23517b5295
2019-12-31gcc-9: don't warn about uninitialized variableLinus Torvalds1-1/+1
commit cf676908846a06443fa5e6724ca3f5dd7460eca1 upstream. I'm not sure what made gcc warn about this code now. The 'ret' variable does end up initialized in all cases, but it's definitely not obvious, so the compiler is quite reasonable to warn about this. So just add initialization to make it all much more obvious both to compilers and to humans. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: cherry-pick from stable linux-4.19.y commit a152a7b411a5 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I9ffd18114904d32ebb631680c7ac40d9771771c2
2019-12-31gcc-9: silence 'address-of-packed-member' warningLinus Torvalds1-1/+1
commit 6f303d60534c46aa1a239f29c321f95c83dda748 upstream. We already did this for clang, but now gcc has that warning too. Yes, yes, the address may be unaligned. And that's kind of the point. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: cherry-pick from stable linux-4.19.y commit 76343a1363f8 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ia29a74ee9de68e0518c46e7cc0affad1f07d5f10
2019-12-31tools include uapi: Update linux/mmap.h copyArnaldo Carvalho de Melo1-0/+2
To pick up the changes from: 20916d4636a9 ("mm/hugetlb: add mmap() encodings for 32MB and 512MB page sizes") That do not entail changes in in tools, this just shows that we have to consider bits [26:31] of flags to beautify that in tools like 'perf trace' This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h' diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-3rvc39lon93kgt5pl31d8g4x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> [sw0312.kim: cherry-pick mainline commit 685626dc26bd for perf build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ifcded1bb028928b2d32c3c315c7bfa8cfd0a9d58
2019-12-31tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'Arnaldo Carvalho de Melo1-1/+2
To bring in the change made in this cset: b69656fa7ea2 ("x86/uaccess: Fix up the fixup") Silencing this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S' diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S No changes in the tooling using this, that was just to ease some objtool return checking. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/n/tip-j0mxgqkuibhw5qid9saaspdu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> [sw0312.kim: cherry-pick mainline commit a021b5400111 for perf build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Icc22d689c8a1beacb4caa574c0a71bbd1b20f951
2019-12-31tools arch uapi: Sync the x86 kvm.h copyArnaldo Carvalho de Melo1-0/+1
To get the changes in: 59073aaf6de0 ("kvm: x86: Add exception payload fields to kvm_vcpu_events") This silences the following perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h The changes in this file are in something not used at this time in any tools/perf/ tool. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jim Mattson <jmattson@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Link: https://lkml.kernel.org/n/tip-6uh8tpraons0h22dmxgfyony@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> [sw0312.kim: cherry-pick mainline commit f98f10f35257 for perf build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: If00ae735efa27c7bad8a1f2cd5893b919cfc809d
2019-12-31tools arch x86: Sync asm/cpufeatures.h with the with the kernelArnaldo Carvalho de Melo1-0/+3
To pick up the changes in: ed5194c2732c ("x86/speculation/mds: Add basic bug infrastructure for MDS") e261f209c366 ("x86/speculation/mds: Add BUG_MSBDS_ONLY") That don't affect anything in tools/. This silences this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/n/tip-jp1afecx3ql1jkuirpgkqfad@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> [sw0312.kim: cherry-pick mainline commit b979540a7522 for perf build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I879810548387101141f808c1c972f691c906c3e1