summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-07-09ARM: artik533_raptor_defconfig: set cma size to 256MBsandbox/opensw0312/vpu-updateSeung-Woo Kim1-0/+4851
Change-Id: Iaeb36c8dd72ab751bade94695c17fd9432a68d50 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-07-09Revert "media: nxp-vpu: modify memory stride policy."Seung-Woo Kim1-19/+25
This reverts commit c52de721864b8f0999373e7f2ef462d72c829380.
2020-07-09Revert "media: nxp-vpu: support various output format."Seung-Woo Kim2-41/+69
This reverts commit 048525047499c9c711e2cf378bcf5b05bc0170c2. Change-Id: If0f081adad394e248f5a9f139ffd41e4fe8f440e
2020-07-09Revert "media: nxp-vpu: modify memory stride policy in encoder."Seung-Woo Kim2-181/+52
This reverts commit d6b753497aa965c1a839e795450eb8280f01dafc.
2020-07-09nx-vpu: add disabling function for video output reordering.HeynChul Jun3-0/+18
This patch adds disabling function for video output reordering. "disable-video-out-reorder" is used only when there is no B frame. Signed-off-by: HeynChul Jun <hcjun@nexell.co.kr> Change-Id: I04f2f628006faf73384655cee7358cad5d850578 Reviewed-on: https://review.gerrithub.io/c/NexellCorp/linux_kernel-4.4.x/+/491105 Reviewed-by: SeongO Park <ray@nexell.co.kr> Tested-by: SeongO Park <ray@nexell.co.kr>
2020-07-09media:nx-vpu: bug fix height alignHeynChul Jun1-4/+3
1.This patch fixes height aligin 31 to 32. 2.This patch adds width and height information to the error message. Signed-off-by: HeynChul Jun <hcjun@nexell.co.kr> Change-Id: I30caddcb1720a8bde6d3520553c3d0083c230f76 Reviewed-on: https://review.gerrithub.io/c/NexellCorp/linux_kernel-4.4.x/+/488394 Reviewed-by: SeongO Park <ray@nexell.co.kr> Tested-by: SeongO Park <ray@nexell.co.kr>
2020-07-09media: nx-vpu: bug fix memory corruptionHeynChul Jun1-1/+1
This patch fixes memory corruption. The MAX_REG_FRAME changed from 31 to 32 Because in VPU_DecRegisterFrameBufCommand() frameAddr[MAX_REG_FRAME] is an odd array. In swap_endian(), two addresses are stored. So, memory corruption occurs. Signed-off-by: HeynChul Jun <hcjun@nexell.co.kr> Change-Id: I1278447fd32f4a72ac7667702476f0b2c42d969f Reviewed-on: https://review.gerrithub.io/c/NexellCorp/linux_kernel-4.4.x/+/450443 Tested-by: Nexell Jenkins <jenkins@nexell.co.kr> Reviewed-by: SeongO Park <ray@nexell.co.kr>
2020-07-09arm: dtsi: change compatible name of vpuSungwon Jo1-1/+1
This patch change generic compatible name of vpu. Signed-off-by: Sungwon Jo <doriya@nexell.co.kr> Change-Id: I295cdc3248fe2d111de1d6453c256195e3b25f4b Reviewed-on: https://review.gerrithub.io/c/438943 Tested-by: Nexell Jenkins <jenkins@nexell.co.kr> Reviewed-by: <ray@nexell.co.kr>
2020-07-09media: nx-vpu: add compatible vpu driverSungwon Jo25-895/+15737
This patch adds compatible vpu driver. This driver is based on nxp3220 device driver. Signed-off-by: Sungwon Jo <doriya@nexell.co.kr> Change-Id: I1791f326a31276423c395d7bac72de7bb827a24b Reviewed-on: https://review.gerrithub.io/c/438942 Tested-by: Nexell Jenkins <jenkins@nexell.co.kr> Tested-by: <ray@nexell.co.kr> Reviewed-by: <ray@nexell.co.kr>
2020-07-08media: nexell: Add for the modules of the VPUJongshin Park1-10/+27
This patch add for the modules of the VPU. Change-Id: Ib883e30f13da1f47c892d644bd3d41ff1354ecfd Signed-off-by: Jongshin Park <pjsin865@nexell.co.kr> Reviewed-on: http://git.nexell.co.kr:8080/2462 Reviewed-on: https://review.gerrithub.io/434990 Reviewed-by: Sungwoo Park <swpark@nexell.co.kr> Tested-by: Sungwoo Park <swpark@nexell.co.kr>
2020-07-08media: nxp-vpu: Add CONFIG_V4L2_INIT_LEVEL_UPJonghsin Park1-0/+14
This patch added CONFIG_V4L2_INIT_LEVEL_UP. Change-Id: I15d161227d7297f9cda357c509af13c97df857e0 Signed-off-by: Jonghsin Park <pjsin865@nexell.co.kr> Reviewed-on: http://git.nexell.co.kr:8080/2311 Reviewed-by: SeongO Park <ray@nexell.co.kr> Reviewed-on: https://review.gerrithub.io/434976 Reviewed-by: Sungwoo Park <swpark@nexell.co.kr> Tested-by: Sungwoo Park <swpark@nexell.co.kr>
2020-07-08nx-vpu: decoder: fix up bug related eos flags.Sungwon Jo1-1/+2
This patch fixes up bug realted eos flags. Change-Id: Ie3365aa6b84be636d75b3c43c330ab2e2f04da3a Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: modify memory stride policy in encoder.Sungwon Jo2-52/+181
This patch modify memory stride policy in encoder. This modify to get stride information from user space. This patch is supported following format. -. V4L2_PIX_FMT_GREY -. V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_YUV420M -. V4L2_PIX_FMT_YVU420, V4L2_PIX_FMT_YVU420M -. V4L2_PIX_FTM_NV12, V4L2_PIX_FMT_NV12M Change-Id: I980337875e9a90d1a26a44e410ebafbfb5fd56c8 Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: change coherent value of arch_setup_dma_ops().Sungwon Jo1-1/+1
This patch changes coherent value of arch_setup_dma_ops(). The coherent value of arch_setup_dma_ops() do not need to be true because nexell ion device is already coherent device. Change-Id: Idacf0888e4b4a4b99328eda61d7f5fa74b59ea79 Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: change output image size from crop size to real size.Sungwon Jo1-2/+2
This patch changes output image size from crop size to real size. This information can be known in sequence data parsing. Change-Id: If2924d732dc6184ef2960fc9076e8b7575154ede Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: fix up memory leakage.Sungwon Jo1-5/+5
This patch fixes up memory leakage. Change-Id: If9509ec1d79beb23739010981e427475d94e74c2 Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: fix up warning related ENABLE_POWER_SAVING.Sungwon Jo1-0/+2
This patch fixes up warning related ENABLE_POWER_SAVING. Change-Id: I7b9078ab411e237a6d473eef1ab15c3285d988cb Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: fix up bug related dma_ops in drm allocator.Sungwon Jo1-0/+2
This patch fixes up bug related dam_ops in drm allocator. Change-Id: I2cdd00c45dddc9ad0a8c35417c3caef3acd73060 Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: support various output format.Sungwon Jo2-69/+41
This patch support various output format. Supported format is as follows: - Continuous planes( V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_YVU420 ) - Non-continuous planes( V4L2_PIX_FMT_YUV420M, V4L2_PIX_FMT_YVU420M ) Change-Id: I3ba28a58a147e6c8cc577c34c0ad0a38692be3c6 Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: modify memory stride policy.Sungwon Jo1-25/+19
This patch modify memory stride policy. This modify to get stride information from user space. Change-Id: I7c10e21b89f8b1595e29cdaac7f2ee25314cd6a9 Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-08media: nxp-vpu: add to support ion allocator.Sungwon Jo1-0/+2
This patch add to support ion allocator. Change-Id: I5d8989a677decab6f937186e16a7f2d977efe98b Signed-off-by: Sungwon Jo <doriya@nexell.co.kr>
2020-07-06pwm: Send a uevent on the pwmchip device upon channel sysfs (un)exportsubmit/tizen/20200707.000734accepted/tizen/unified/20200707.140914Fabrice Gasnier1-0/+11
This patch sends a uevent (KOBJ_CHANGE) on the pwmchipN device, everytime a pwmX channel has been exported/unexported via sysfs. This allows udev to implement rules on such events, like: SUBSYSTEM=="pwm*", PROGRAM="/bin/sh -c '\ chown -R root:gpio /sys/class/pwm && chmod -R 770 /sys/class/pwm;\ chown -R root:gpio /sys/devices/platform/soc/*.pwm/pwm/pwmchip* && chmod -R 770 /sys/devices/platform/soc/*.pwm/pwm/pwmchip*\ '" This is a replacement patch for commit 7e5d1fd75c3d ("pwm: Set class for exported channels in sysfs"), see [1]. basic testing: $ udevadm monitor --environment & $ echo 0 > /sys/class/pwm/pwmchip0/export KERNEL[197.321736] change /devices/.../pwm/pwmchip0 (pwm) ACTION=change DEVPATH=/devices/.../pwm/pwmchip0 EXPORT=pwm0 SEQNUM=2045 SUBSYSTEM=pwm [1] https://lkml.org/lkml/2018/9/25/713 Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Tested-by: Gottfried Haider <gottfried.haider@gmail.com> Tested-by: Michal Vokáč <michal.vokac@ysoft.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> [sw0312.kim: cherry-pick mainline commit 552c02e3e7cf to send uevent for pwm export] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ia08c557357f3a92478a14e53bbff5e61c56785a5
2020-03-12ARM: dts: artik533-compy: change HW overlay's prioritysubmit/tizen/20200312.055423accepted/tizen/unified/20200312.131046Seung-Woo Kim1-2/+2
In Tizen, display video layer should have lower priority than graphics layers to show video and UI images together on display. Change HW overlay's priority. Note: change as like s5p4418-artik530-raptor-common.dtsi. Change-Id: Ic4e1d2184cd5be363a87206884e46ceec0a49337 Ref: commit a6a16ea9c26c ("ARM: dts: artik530_raptor: change HW overlay's priority") Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-03-06ARM: dts: artik533-compy: Change extcon parameter of usb controllersubmit/tizen/20200306.041705accepted/tizen/unified/20200306.125000Dongwoo Lee1-1/+1
Instead of using g-extcon-notify, g-extcon-always-on is used for maintaining static state as always connected. Change-Id: I02c7334d1004f8d3574e0fada15b594a89ac1cfc Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
2020-02-18 ARM64: dts: artik710_raptor: Set extcon state for dwc2 cable as always truesubmit/tizen/20200221.073300accepted/tizen/unified/20200224.081509Dongwoo Lee1-0/+1
Since this, extcon state for dwc2 udc becomes always 'USB=1'. Change-Id: Ibda892bf860bbfee21210681370fd658eeb55199 Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
2020-02-18arm: dts: artik530_raptor: Set extcon state for dwc2 cable as always trueDongwoo Lee1-0/+1
Since this, extcon state for dwc2 udc becomes always 'USB=1'. Change-Id: I54aad1019910b879685673a37f271d494ca53fcd Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
2020-02-18usb: dwc2: gadget: Set extcon state for usb cable as always trueDongwoo Lee2-0/+27
To inform to userspace as enable usb features always, set extcon state for usb cable as connected permanently. To enable this, add "g-extcon-always-on" property on dt. Change-Id: I687ca1b098d007a5d0ca7ddf6d552605195cafcf Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
2020-02-18usb: dwc2: Remove support for usb cable detectionDongwoo Lee4-121/+0
Detection of usb cable is no longer used, thus this eliminates all relevant codes. Change-Id: I2dc226bc21dafa486e87e40ccb03b5242af774dc Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
2020-01-21drm/nexell: Add nx gem flags for DRM_NX_GEM_GET ioctlsubmit/tizen/20200121.011335accepted/tizen/unified/20200121.121352Seung-Woo Kim1-0/+1
From the struct element comment for DRM_NX_GEM_GET, the driver should fill struct nx_gem_info::flags but it did not. Add nx gem flags for DRM_NX_GEM_GET ioctl as its description. Change-Id: If2c1a72077b4ab85786f2c71b0c27502bd86e4b1 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-01-02arm64: relocatable: fix inconsistencies in linker script and optionssubmit/tizen/20200102.014302accepted/tizen/unified/20200102.220841Ard Biesheuvel1-0/+1
commit 3bbd3db86470c701091fb1d67f1fab6621debf50 upstream. readelf complains about the section layout of vmlinux when building with CONFIG_RELOCATABLE=y (for KASLR): readelf: Warning: [21]: Link field (0) should index a symtab section. readelf: Warning: [21]: Info field (0) should index a relocatable section. Also, it seems that our use of '-pie -shared' is contradictory, and thus ambiguous. In general, the way KASLR is wired up at the moment is highly tailored to how ld.bfd happens to implement (and conflate) PIE executables and shared libraries, so given the current effort to support other toolchains, let's fix some of these issues as well. - Drop the -pie linker argument and just leave -shared. In ld.bfd, the differences between them are unclear (except for the ELF type of the produced image [0]) but lld chokes on seeing both at the same time. - Rename the .rela output section to .rela.dyn, as is customary for shared libraries and PIE executables, so that it is not misidentified by readelf as a static relocation section (producing the warnings above). - Pass the -z notext and -z norelro options to explicitly instruct the linker to permit text relocations, and to omit the RELRO program header (which requires a certain section layout that we don't adhere to in the kernel). These are the defaults for current versions of ld.bfd. - Discard .eh_frame and .gnu.hash sections to avoid them from being emitted between .head.text and .text, screwing up the section layout. These changes only affect the ELF image, and produce the same binary image. [0] b9dce7f1ba01 ("arm64: kernel: force ET_DYN ELF type for ...") Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Peter Smith <peter.smith@linaro.org> Tested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [ Found solution for Tizen 6.0 toolchain by Mikhail Kashkarov <m.kashkarov@partner.samsung.com> ] [sw0312.kim: backport stable linux-4.14.y commit f21ce3cdff2f for gcc 9 built image - only apply only section discarding part] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I0ddfedad20188dcd9d7b416370e95d175b595db0
2019-12-31arm64: Don't unconditionally add -Wno-psabi to KBUILD_CFLAGSsubmit/tizen/20191231.055421accepted/tizen/unified/20200101.120528Nathan Chancellor1-1/+1
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> [sw0312.kim: backport mainline commit fa63da2ab046 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I516368053a9f95bc1ddce0e7ea2c802afe201cef
2019-12-31arm64: Silence gcc warnings about arch ABI driftDave Martin1-0/+1
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> [sw0312.kim: backport mainline commit ebcc5928c5d9 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I2ef030a3eb5aa37486d642161588f48fb69875f5
2019-12-30net: wireless: sd8977: Fix stringop-overlfow build warningsSeung-Woo Kim3-11/+8
Not really need to check strlen() of source for strncpy() and it causes stringop-overlfow build warnings. If terminate character is required, fix the warnings by using strlcpy(). Otherwise, fix by using fixed number less than destination buffer size instead of source length for strncpy(). Change-Id: Ie1fcef44362c1ac6afa21d79b5eefaf5e7cdea75 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-12-30DT configfs: Fix build errors on other platformsPhil Elwell1-1/+2
Signed-off-by: Phil Elwell <phil@raspberrypi.org> [sw0312.kim: cherry-pick raspbian linux stable rpi-4.5.y commit 769a44b60edd to remove build warning] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I76067ec8cd676523eab6d9581afc2c860a443d18
2019-12-30arm64: don't zero in __copy_from_user{,_inatomic}Al Viro2-10/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [sw0312.kim: backport mainline commit 4855bd255f9f for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I5674ec6ac6f669acb4c5efef92d3db813acf109b
2019-12-30arm64, vdso: Define vdso_{start,end} as arrayKees Cook1-5/+5
Commit dbbb08f500d6146398b794fdc68a8e811366b451 upstream. Adjust vdso_{start|end} to be char arrays to avoid compile-time analysis that flags "too large" memcmp() calls with CONFIG_FORTIFY_SOURCE. Cc: Jisheng Zhang <jszhang@marvell.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Sasha Levin <sashal@kernel.org> [sw0312.kim: cherry-pick from stable linux-4.4.y commit c0309c7835cd for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ibfe172ae0aaa6a308d562339aeabb74a50258874
2019-12-30ath10k: avoid possible string overflowArnd Bergmann1-1/+1
commit 6707ba0105a2d350710bc0a537a98f49eb4b895d upstream. The way that 'strncat' is used here raised a warning in gcc-8: drivers/net/wireless/ath/ath10k/wmi.c: In function 'ath10k_wmi_tpc_stats_final_disp_tables': drivers/net/wireless/ath/ath10k/wmi.c:4649:4: error: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation] Effectively, this is simply a strcat() but the use of strncat() suggests some form of overflow check. Regardless of whether this might actually overflow, using strlcat() instead of strncat() avoids the warning and makes the code more robust. Fixes: bc64d05220f3 ("ath10k: debugfs support to get final TPC stats for 10.4 variants") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: cherry-pick from stable linux-4.4.y commit a1402232e193 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Idd3506f5ee90d7ff4811294d8590478a28d5ea1e
2019-12-30sockfs: getxattr: Fail with -EOPNOTSUPP for invalid attribute namesAndreas Gruenbacher1-18/+6
commit 971df15bd54ad46e907046ff33750a137b2f0096 upstream. The standard return value for unsupported attribute names is -EOPNOTSUPP, as opposed to undefined but supported attributes (-ENODATA). Also, fail for attribute names like "system.sockprotonameXXX" and simplify the code a bit. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [removes a build warning on 4.4.y - gregkh] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: cherry-pick from stable linux-4.4.y commit c776cff6de52 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I86795bc2eb5eac9498341d6778a1a2195272f82a
2019-12-30tracing: 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 from stable linux-4.4.y commit f7247666a71a for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I40614f52191f6ce8ca3c5f8e334867feaf8aac5f
2019-12-30gcc-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.4.y commit 9efccd7745a1 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I1a6ea66a5214bed3371e92686b00f870e5c678f0
2019-12-30include/linux/module.h: copy __init/__exit attrs to init/cleanup_moduleMiguel Ojeda1-2/+2
[ Upstream commit a6e60d84989fa0e91db7f236eda40453b0e44afa ] The upcoming GCC 9 release extends the -Wmissing-attributes warnings (enabled by -Wall) to C and aliases: it warns when particular function attributes are missing in the aliases but not in their target. In particular, it triggers for all the init/cleanup_module aliases in the kernel (defined by the module_init/exit macros), ending up being very noisy. These aliases point to the __init/__exit functions of a module, which are defined as __cold (among other attributes). However, the aliases themselves do not have the __cold attribute. Since the compiler behaves differently when compiling a __cold function as well as when compiling paths leading to calls to __cold functions, the warning is trying to point out the possibly-forgotten attribute in the alias. In order to keep the warning enabled, we decided to silence this case. Ideally, we would mark the aliases directly as __init/__exit. However, there are currently around 132 modules in the kernel which are missing __init/__exit in their init/cleanup functions (either because they are missing, or for other reasons, e.g. the functions being called from somewhere else); and a section mismatch is a hard error. A conservative alternative was to mark the aliases as __cold only. However, since we would like to eventually enforce __init/__exit to be always marked, we chose to use the new __copy function attribute (introduced by GCC 9 as well to deal with this). With it, we copy the attributes used by the target functions into the aliases. This way, functions that were not marked as __init/__exit won't have their aliases marked either, and therefore there won't be a section mismatch. Note that the warning would go away marking either the extern declaration, the definition, or both. However, we only mark the definition of the alias, since we do not want callers (which only see the declaration) to be compiled as if the function was __cold (and therefore the paths leading to those calls would be assumed to be unlikely). Link: https://lore.kernel.org/lkml/20190123173707.GA16603@gmail.com/ Link: https://lore.kernel.org/lkml/20190206175627.GA20399@gmail.com/ Suggested-by: Martin Sebor <msebor@gcc.gnu.org> Acked-by: Jessica Yu <jeyu@kernel.org> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org> [sw0312.kim: cherry-pick from stable linux-4.4.y commit 170051d60cf0 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I4ee108ed0db47475bf27f285695be57a2a58642f
2019-12-30Backport minimal compiler_attributes.h to support GCC 9Miguel Ojeda1-0/+16
This adds support for __copy to v4.9.y so that we can use it in init/exit_module to avoid -Werror=missing-attributes errors on GCC 9. Link: https://lore.kernel.org/lkml/259986242.BvXPX32bHu@devpool35/ Cc: <stable@vger.kernel.org> Suggested-by: Rolf Eike Beer <eb@emlix.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org> [sw0312.kim: cherry-pick from stable linux-4.4.y commit edc966de8725 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I78e4df7e07fa807302876d9baf5fb0de4a7fb0bb
2019-07-31ARM: artik530_raptor_defconfig: Enable NETFILTER_XT_MATCH_OWNER config optiontizen_5.5.m2_releasesubmit/tizen_5.5_mobile_hotfix/20201026.185109submit/tizen_5.5/20191031.000013submit/tizen_5.5/20191031.000011submit/tizen_5.5/20191031.000010submit/tizen/20190801.010047accepted/tizen/unified/20190801.113434accepted/tizen/5.5/unified/mobile/hotfix/20201027.070457accepted/tizen/5.5/unified/20191031.032438tizen_5.5_tvtizen_5.5_mobile_hotfixaccepted/tizen_5.5_unified_mobile_hotfixSeung-Woo Kim1-1/+1
Enable the NETFILTER_XT_MATCH_OWNER config option to use xt_owner supplementary groups. Change-Id: Id36610567dedf2da808e0b59efe9430ad68df899 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-07-31ARM64: artik710_raptor_defconfig: Enable NETFILTER_XT_MATCH_OWNER config optionSeung-Woo Kim1-1/+1
Enable the NETFILTER_XT_MATCH_OWNER config option to use xt_owner supplementary groups. Change-Id: I5570988cf08cf65c05ee476a6656f8b4f0f0f664 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-07-31netfilter: xt_owner: A fix for backport of 'xt_owner: Add supplementary ↵Lukasz Pawelczyk1-1/+1
groups option' This patch fixes the backport of 'netfilter: xt_owner: Add supplementary groups option' (8413c52116d5). Change-Id: I85fd812744fd95b4c7f4640670a685c033e024ad Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-07-05netfilter: xt_owner: bail out with EINVAL in case of unsupported flagssubmit/tizen/20190705.061120accepted/tizen/unified/20190705.110618Pablo Neira Ayuso2-0/+8
Reject flags that are not supported with EINVAL. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> [sw0312.kim: backport from mainline to apply supplementary groups on netfilter] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I129a3a1fc8f54d5e4f0ae164e0036bad7cd67c64
2019-07-05netfilter: xt_owner: Add supplementary groups optionLukasz Pawelczyk2-6/+24
The XT_OWNER_SUPPL_GROUPS flag causes GIDs specified with XT_OWNER_GID to be also checked in the supplementary groups of a process. f_cred->group_info cannot be modified during its lifetime and f_cred holds a reference to it so it's safe to use. Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> [sw0312.kim: backport from mainline to apply supplementary groups on netfilter] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I30739d09c47d0623d0638de685905d3ac2ca131a
2019-02-18Revert "arm64: dtsi: artik710_raptor: change default camera image sensor to ↵submit/tizen_5.0/20190219.004732submit/tizen/20190218.062336accepted/tizen/unified/20190218.163151accepted/tizen/5.0/unified/20190219.154237tizen_5.0accepted/tizen_5.0_unifiedSeung-Woo Kim1-12/+9
OV5640" This reverts commit d636f7529dfa0ca074716fd255c9655acbad5d23. In tizen environment, previous camera image sensor, ARTIK-5M- CAMERA-BOARD MM011-0.1 with S5K4ECGA image sensor is still used. So revert OV5640 camera image sensor. Change-Id: I5584de55165be731d1a863c3e3da2e1949fb0663 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-02-18Revert "arm: dtsi: artik530_raptor: change default camera image sensor to ↵Seung-Woo Kim1-13/+10
OV5640" This reverts commit 8fefb8f77d19f0670bc2026f43eb4c6af86d9e3b. In tizen environment, previous camera image sensor, ARTIK-5M- CAMERA-BOARD MM011-0.1 with S5K4ECGA image sensor is still used. So revert OV5640 camera image sensor. Change-Id: I25632c12589238d8fea9924acd7d5bc582c6ecb8 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-01-31usb: dwc2: hcd: call dwc2_is_controller_alive under spinlocksubmit/tizen_5.0/20190213.011623submit/tizen/20190131.075243accepted/tizen/unified/20190131.161530accepted/tizen/5.0/unified/20190213.070121Jaehoon Chung1-3/+4
This patch is referred to Robert's commit cf54772b913b. (usb: dwc2: call dwc2_is_controller_alive() under spinlock) Below is commit message: This patch fixes the following problem: data transmission in direction IN break unless the GSNPSID register access is done with spinlock held. This issue occurs at least in Exynos4412 SoC, probably in many SoC's from Exynos familly. The problem is described here: https://lkml.org/lkml/2014/12/22/185 And there is linux mailing list discussion: https://lkml.org/lkml/2015/1/14/17 The one of SDB hang issues should be fixed with this patch. (Issue - Not triggered usb interrupt.) Change-Id: If97516bc94d84df611663f902267a5e3b75815f7 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>