summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-10ARM: config: artik530_raptor: Update DEV_RAM sizetizen_7.0_m2_releasetizen_6.5.m2_releasesubmit/tizen_6.5/20211028.163901submit/tizen/20210811.222543submit/tizen/20210811.012046accepted/tizen/unified/20210813.010007accepted/tizen/7.0/unified/hotfix/20221116.111621accepted/tizen/7.0/unified/20221110.055953accepted/tizen/6.5/unified/20211029.015724tizen_7.0_hotfixtizen_7.0tizen_6.5tizenaccepted/tizen_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unifiedaccepted/tizen_6.5_unifiedJaehoon Chung1-1/+1
Update DEV_RAM size from 16M to 32M. Change-Id: I66e27f66a104f784445429cabf918022542ee8b9 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-04-12packaging: spec: fix about conflicted to filesystem packagesubmit/tizen/20210412.043323accepted/tizen/unified/20210412.091005Jaehoon Chung1-1/+1
Fix about conflicted to filesystem package. Change-Id: Ia9127fc38729e333ec030514531dda4ee52ef1ee 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.120537Jaehoon Chung2-2/+2
Disable SECURITY_SMACK_NETFILTER configuration. Change-Id: Ie18cab2c861e7065888998a6d8143227fecd07c7 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-01-06tty: Disable default console blanking intervalsubmit/tizen_6.0/20210107.042850submit/tizen_6.0/20210107.014309submit/tizen/20210107.014139accepted/tizen/unified/20210107.123417accepted/tizen/6.0/unified/20210107.080409tizen_6.0accepted/tizen_6.0_unifiedTim Gardner1-1/+1
BugLink: http://bugs.launchpad.net/bugs/869017 Console blanking is not enabling DPMS power saving (thereby negating any power-saving benefit), and is simply turning the screen content blank. This means that any crash output is invisible which is unhelpful on a server (virtual or otherwise). Furthermore, CRT burn in concerns should no longer govern the default case. Affected users could always set consoleblank on the kernel command line. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: Adam Borowski <kilobyte@angband.pl> Cc: Scot Doyle <lkml14@scotdoyle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: backport mainline commit a4199f5eb809 to disable default vtcon blank] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ibccf73a8598b8470d8f010dc8f589ba90de36803
2020-12-15packaging: artik710: do not remove arm arch from devel packagesubmit/tizen/20201216.031511accepted/tizen/unified/20201216.215949Seung-Woo Kim1-0/+2
ARM64 kernel arch header requires arm header, so removing arm arch from artik710 devel package causes build error. ./arch/arm64/include/asm/opcodes.h:5:10: fatal error: ../../arm/include/asm/opcodes.h: No such file or directory 5 | #include <../../arm/include/asm/opcodes.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Do not remove arm arch from artik710 devel package. Change-Id: Icf20808ebf50c42a9e74bf47d7345884168fa746 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-12-15packaging: do not remove c file in script for devel packageSeung-Woo Kim2-2/+2
For out-of-tree kernel module build, it requires script c file. Do not remove the c file in script. Change-Id: I3c164980b7a375b2c3be092f45f27b363f04fda4 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-12-15packaging: rename devel package name without release versionSeung-Woo Kim2-54/+54
The %{fullVersion} has release version, so it is changed for every build. It makes difficult to build module with the devel pacakge, so rename devel directory without the release version. Note: there is no dependency for current artik devel package. Change-Id: Idc865aa9ade4ec19e1a3a41d7b68d04dfe43a41d Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2020-09-16ARM: artik530_raptor_defconfig: Enable SquashFS filesystemtizen_6.0.m2_releasesubmit/tizen_6.0_hotfix/20201103.115104submit/tizen_6.0_hotfix/20201102.192904submit/tizen_6.0/20201029.205504submit/tizen/20200916.112232accepted/tizen/unified/20200917.004550accepted/tizen/6.0/unified/hotfix/20201103.045446accepted/tizen/6.0/unified/20201030.103601tizen_6.0_hotfixaccepted/tizen_6.0_unified_hotfixJunghoon Kim1-1/+1
Enable SquashFS filesystem as the kernel built-in option. This is required in Tizen Update/Recovery mode. Change-Id: I983f4a5b2bdec490f58a5cc91b07ffa819d5b919 Signed-off-by: Junghoon Kim <jhoon20.kim@samsung.com>
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>
2019-01-29ARM64: configs: artik710: enable COFIG_VIDEO_OV5640submit/tizen/20190129.052023accepted/tizen/unified/20190130.053716Jaehoon Chung1-1/+1
Enable CONFIG_VIDEO_OV5640 configuration. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-29packaging: spec: update the kernel stable version from 4.4.113 to 4.4.172Jaehoon Chung2-2/+2
Update the kernel stable version from v4.4.113 to 4.4.172. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-29ARM64: config: artik710: update the defconfig file to v4.4.172Jaehoon Chung1-12/+24
Update the defconfig file to v4.4.172. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-29ARM: configs: artik530: update the defconfig file to v4.4.172Jaehoon Chung1-11/+21
Synchronize the defconfig file to v4.4.172. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-29switch ->setxattr() to passing dentry and inode separatelyAl Viro32-82/+105
commit 3767e255b390d72f9a33c08d9e86c5f21f25860f upstream. smack ->d_instantiate() uses ->setxattr(), so to be able to call it before we'd hashed the new dentry and attached it to inode, we need ->setxattr() instances getting the inode as an explicit argument rather than obtaining it from dentry. Similar change for ->getxattr() had been done in commit ce23e64. Unlike ->getxattr() (which is used by both selinux and smack instances of ->d_instantiate()) ->setxattr() is used only by smack one and unfortunately it got missed back then. Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com> Tested-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [sw0312.kim: backport from mainline to resolve setxattr crash on smack] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I4bf991924e16f61746453b7fd096e5d59438659b
2019-01-29switch xattr_handler->set() to passing dentry and inode separatelyAl Viro27-102/+124
commit 5930122683dff58f0846b0f0405b4bd598a3ba6a upstream. preparation for similar switch in ->setxattr() (see the next commit for rationale). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [sw0312.kim: backport from mainline to resolve setxattr issue during smack_d_instantiate()] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I3e2e2cd71ebe14aea7610a6457e68d1fb01ead89
2019-01-29security_d_instantiate(): move to the point prior to attaching dentry to inodeAl Viro1-10/+6
commit b96809173e94ea2fa8c19c2e40e8545a1821bf57 upstream. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [sw0312.kim: backport from mainline to resolve smack crash issue during getxattr] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: If386ad04e7e1abdd9213df87daf17648eb9f42fd
2019-01-29->getxattr(): pass dentry and inode as separate argumentsAl Viro37-95/+104
commit ce23e640133484eebc20ca7b7668388213e11327 upstream. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [sw0312.kim: backport from mainline to resolve smack getxattr during security_d_instantiate()] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I7fcd9edc3e3e543e35e173e8479906b6a7f81455
2019-01-29xattr_handler: pass dentry and inode as separate arguments of ->get()Al Viro28-103/+102
commit b296821a7c42fa58baa17513b2b7b30ae66f3336 upstream. ... and do not assume they are already attached to each other Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> [sw0312.kim: backport from mainline to apply getxattr inode separation] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ic3f9c370f13ceacda25d20bb7d5b6d732966e648
2019-01-29ASoC: rt5659: fix duplicate‘const’ declaration warningsSeung-Woo Kim1-70/+70
Fix duplicate const’ declaration specifier warnings in gcc 7. Note: macros, SOC_VALUE_ENUM_SINGLE_DECL(), SOC_ENUM_SINGLE_DECL() already have const specifier. Change-Id: Ifc4940cfc38a77802d1c53703f9608c48ce8dbdf Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-01-29usb: f_fs: avoid race condition with ffs_epfile_io_completeDu, Changbin1-3/+9
ffs_epfile_io and ffs_epfile_io_complete runs in different context, but there is no synchronization between them. consider the following scenario: 1) ffs_epfile_io interrupted by sigal while wait_for_completion_interruptible 2) then ffs_epfile_io set ret to -EINTR 3) just before or during usb_ep_dequeue, the request completed 4) ffs_epfile_io return with -EINTR In this case, ffs_epfile_io tell caller no transfer success but actually it may has been done. This break the caller's pipe. Below script can help test it (adbd is the process which lies on f_fs). while true do pkill -19 adbd #SIGSTOP pkill -18 adbd #SIGCONT sleep 0.1 done To avoid this, just dequeue the request first. After usb_ep_dequeue, the request must be done or canceled. With this change, we can ensure no race condition in f_fs driver. But actually I found some of the udc driver has analogical issue in its dequeue implementation. For example, 1) the dequeue function hold the controller's lock. 2) before driver request controller to stop transfer, a request completed. 3) the controller trigger a interrupt, but its irq handler need wait dequeue function to release the lock. 4) dequeue function give back the request with negative status, and release lock. 5) irq handler get lock but the request has already been given back. So, the dequeue implementation should take care of this case. IMO, it can be done as below steps to dequeue a already started request, 1) request controller to stop transfer on the given ep. HW know the actual transfer status. 2) after hw stop transfer, driver scan if there are any completed one. 3) if found, process it with real status. if no, the request can canceled. Signed-off-by: "Du, Changbin" <changbin.du@intel.com> [mina86@mina86.com: rebased on top of refactoring commits] Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com> Change-Id: I12832c8cd8060302eff13565cf2f1372288d07ed
2019-01-29usb: f_fs: refactor ffs_epfile_ioMichal Nazarewicz1-67/+59
Eliminate one of the return paths by using a ‘goto error_mutex’ and rearrange some if-bodies which results in reduction of the indention level and thus hopefully makes the function easier to read and reason about. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@kernel.org> [backported from upstream commit ae76e13477d8de0065cddbb6] Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com> Change-Id: Ic8f141faa55ce5c0bad6f55506d30d84feb88c90
2019-01-29fix build error about get_user_pages()Jaehoon Chung2-3/+3
Fix build error since changing the arguments of get_user_pages(). Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>