profile/mobile/platform/kernel/linux-3.10-sc7730.git
6 years agoARM: tizen_tm1_defconfig: enable NETFILTER_XT_TARGET_LOG 23/176123/2 accepted/tizen/unified/20180419.080041 submit/tizen/20180418.005003
hyunuktak [Tue, 17 Apr 2018 01:16:25 +0000 (10:16 +0900)]
ARM: tizen_tm1_defconfig: enable NETFILTER_XT_TARGET_LOG

Enable NETFILTER_XT_TARGET_LOG for analysis of iptables log.
It is a iptables feature for security report on Tizen 5.0,
required from stc-manager.

Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Change-Id: Ia31c1e9463f28b74a67bad7272e0fea08c88c28c

6 years agoARM: tizen_tm1_defconfig: enable AUDITSYSCALL 49/174749/1 accepted/tizen/unified/20180417.173217 submit/tizen/20180417.011414
Inki Dae [Wed, 4 Apr 2018 04:04:33 +0000 (13:04 +0900)]
ARM: tizen_tm1_defconfig: enable AUDITSYSCALL

Enabled AUDITSYSCALL for the use of audit subsystem.
A new security feature for Tizen 5.0 requires the subsystem
in default.

Change-Id: I4112a5ed4c6d232b77d0ba19f440cfdf4884249d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
6 years agonetfilter: nfnetlink_queue: fix secctx memory leak 13/170913/1 accepted/tizen/unified/20180227.063123 submit/tizen/20180227.012056
Liping Zhang [Tue, 28 Mar 2017 14:59:25 +0000 (22:59 +0800)]
netfilter: nfnetlink_queue: fix secctx memory leak

We must call security_release_secctx to free the memory returned by
security_secid_to_secctx, otherwise memory may be leaked forever.

Fixes: ef493bd930ae ("netfilter: nfnetlink_queue: add security context information")
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
[sw0312.kim: cherry-pick the commit 77c1c03c5b8 from mainline to fix already backported commit
 - the commit ef493bd930ae ("netfilter: nfnetlink_queue: add security context information") was backported for nether.service in tizen
 - change in net/netfilter/nfnetlink_queue.c is applied to net/netfilter/nfnetlink_queue_core.c]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ifbc5f96bb6039503b7390864936fe6eda2e53acb

6 years agoproc, coredump: add CoreDumping flag to /proc/pid/status 48/168248/4 accepted/tizen/unified/20180130.144413 submit/tizen/20180130.013321
Roman Gushchin [Fri, 17 Nov 2017 23:26:45 +0000 (15:26 -0800)]
proc, coredump: add CoreDumping flag to /proc/pid/status

Right now there is no convenient way to check if a process is being
coredumped at the moment.

It might be necessary to recognize such state to prevent killing the
process and getting a broken coredump.  Writing a large core might take
significant time, and the process is unresponsive during it, so it might
be killed by timeout, if another process is monitoring and
killing/restarting hanging tasks.

We're getting a significant number of corrupted coredump files on
machines in our fleet, just because processes are being killed by
timeout in the middle of the core writing process.

We do have a process health check, and some agent is responsible for
restarting processes which are not responding for health check requests.
Writing a large coredump to the disk can easily exceed the reasonable
timeout (especially on an overloaded machine).

This flag will allow the agent to distinguish processes which are being
coredumped, extend the timeout for them, and let them produce a full
coredump file.

To provide an ability to detect if a process is in the state of being
coredumped, we can expose a boolean CoreDumping flag in
/proc/pid/status.

Example:
$ cat core.sh
  #!/bin/sh

  echo "|/usr/bin/sleep 10" > /proc/sys/kernel/core_pattern
  sleep 1000 &
  PID=$!

  cat /proc/$PID/status | grep CoreDumping
  kill -ABRT $PID
  sleep 1
  cat /proc/$PID/status | grep CoreDumping

$ ./core.sh
  CoreDumping: 0
  CoreDumping: 1

[guro@fb.com: document CoreDumping flag in /proc/<pid>/status]
Link: http://lkml.kernel.org/r/20170928135357.GA8470@castle.DHCP.thefacebook.com
Link: http://lkml.kernel.org/r/20170920230634.31572-1-guro@fb.com
Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[inki.dae: backported from mainline - commit : c643401218be
  On Tizen, there is one issue that a process doing coredump can be killed.
  This patch allows a process to detect if given process is being dumped.
  With this, Tizen can exclude such process from 'kill list' so that
  coredump process can finish coredump work.]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: Idf983ff897d0cea308372b1cc401b2a39388799f

6 years agomisc: sdiodev: fix the wrong pointer type 93/165093/2 accepted/tizen/unified/20171227.062257 submit/tizen/20171227.024814
Jaehoon Chung [Tue, 26 Dec 2017 06:04:59 +0000 (15:04 +0900)]
misc: sdiodev: fix the wrong pointer type

Fix the wrong pointer type.

Change-Id: Id158d9e4128ea251a79644f62b4a6cf3146d162f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agomisc: sim_slot: fix wrong fops callback 84/165084/1
Seung-Woo Kim [Tue, 26 Dec 2017 05:10:44 +0000 (14:10 +0900)]
misc: sim_slot: fix wrong fops callback

The write fops callback is assigned seq_lseek, but it is for llseek
callback. Also simslot_count never allows writing on it. Fix wrong
write fops callback to llseek callback.

Note: simslot_count is olny read by tel-plugin package and there is
no write or no lseek cases.

Change-Id: I0fe20e4caac899036bcdc5f01786bceaab059490
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: tizen_tm1_defconfig: disable FRAME_WARN config option 75/165075/1
Seung-Woo Kim [Tue, 26 Dec 2017 01:58:49 +0000 (10:58 +0900)]
ARM: tizen_tm1_defconfig: disable FRAME_WARN config option

The CONFIG_FRAME_WARN sets size of frame stack to warn and there
are some build warnins caused by too large frame size. Disable
the warnings with setting CONFIG_FRAME_WARN as 0.

NOTE: it only disables warning but it does not mean large frame
size is acceptable.

Change-Id: I42d4fb948110b22495f8b57c391456a0bddc7db2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomisc: sdio: remove build warnings 71/165071/1
Seung-Woo Kim [Tue, 26 Dec 2017 01:51:53 +0000 (10:51 +0900)]
misc: sdio: remove build warnings

Remove build warnings.

Change-Id: I0b4506532ecce3e92d559f67903acf9cd250bc6e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agommc: core: remove build warning caused by sprd bsp 74/164974/1
Seung-Woo Kim [Fri, 22 Dec 2017 06:37:02 +0000 (15:37 +0900)]
mmc: core: remove build warning caused by sprd bsp

During sprd bsp, not used function is added and it causes unused
function build warning. Remove the build warning by removing the
function.

Change-Id: Id3cea904edca1c41413c28f0c831617b5385af25
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agommc: sprd : remove build warnings 73/164973/1
Seung-Woo Kim [Fri, 22 Dec 2017 06:35:33 +0000 (15:35 +0900)]
mmc: sprd : remove build warnings

Remove build warnings including unused-variable, unused-label and
int-conversion.

Change-Id: I171d21f8fada70b27291730444ae82a5883fff0c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomisc: mdbg: remove build warnings 56/164956/1
Seung-Woo Kim [Fri, 22 Dec 2017 04:37:18 +0000 (13:37 +0900)]
misc: mdbg: remove build warnings

Remove build warnings in sprd mdbg misc driver.

Change-Id: Ic2a06079da18f04252eeea8005e2ec6088de5c6a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomisc: sprd: remove build warnings 55/164955/1
Seung-Woo Kim [Fri, 22 Dec 2017 04:36:40 +0000 (13:36 +0900)]
misc: sprd: remove build warnings

Remove build warnings in sprd misc drivers.

Change-Id: I6d307506a956cbae56841f50a39f8fc59bc9c21e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoregulator: core: remove build warning caused by sprd bsp 54/164954/1
Seung-Woo Kim [Fri, 22 Dec 2017 04:34:47 +0000 (13:34 +0900)]
regulator: core: remove build warning caused by sprd bsp

From sprd bsp, regulator_init_complete() is fixed not to be called
and it causes unused function build waring. Remove the build warning.

Change-Id: I63d26fbe9b22d4bb4467f859d2ad762998be0931
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoion/sprd: remove build warning 53/164953/1
Seung-Woo Kim [Fri, 22 Dec 2017 04:33:50 +0000 (13:33 +0900)]
ion/sprd: remove build warning

Remove unused variable build warning.

Change-Id: Id630226984ac3eb379a973be5a42448f2da90cf8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agobase: sync: Include seq_file.h in sync.h 48/164848/1
Jonathan Hamilton [Fri, 8 Feb 2013 21:05:38 +0000 (13:05 -0800)]
base: sync: Include seq_file.h in sync.h

sync.h uses struct seq_file in some function table prototypes. This
causes compile failures when including the header in files that do not
otherwise include seq_file.h

Signed-off-by: Jonathan Hamilton <jonathan.hamilton@imgtec.com>
[sw0312.kim: cherry-pick the commit d37806bb7617 from https://android.googlesource.com/kernel/common to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I42183b09a64e26d57c5f176757f691378ffd578e

6 years agothermal: sprd: remove build warnings 14/164814/1
Seung-Woo Kim [Thu, 21 Dec 2017 06:32:41 +0000 (15:32 +0900)]
thermal: sprd: remove build warnings

Remove build warnings including unused-function, unused-variable,
incompatible-pointer-types and int-conversion.

Change-Id: Iae52665eb828e1b958c0a34970a2b3152b0699eb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoserial: sprd: remove build warning 97/164797/1
Seung-Woo Kim [Thu, 21 Dec 2017 05:10:25 +0000 (14:10 +0900)]
serial: sprd: remove build warning

Remove build warnings including unused variable, unused function
and implicit pointer use from integer.

Change-Id: I9d2326cedfaeadd4de23d6fcd7a4d6d133ffdaac
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agobacklight: ktd3102: remove build warnings 84/164784/1
Seung-Woo Kim [Thu, 21 Dec 2017 04:53:17 +0000 (13:53 +0900)]
backlight: ktd3102: remove build warnings

Remove build warnings caused from unused variable and non declared
struct.

Change-Id: I28b7cbd9cf166122583ce98f27769851bb85c12b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomedia: sprd_isp: remove build warnings 94/164694/3
Seung-Woo Kim [Wed, 20 Dec 2017 10:30:40 +0000 (19:30 +0900)]
media: sprd_isp: remove build warnings

Remove build warnings including wrong print format, unused function,
and unused variable.

Change-Id: I21b97f3b98c9039126038c075ddb36ceaea09200
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoplatform/sprd: remove build warnings 86/164686/3
Seung-Woo Kim [Wed, 20 Dec 2017 09:55:13 +0000 (18:55 +0900)]
platform/sprd: remove build warnings

Remove build warnings from sprd platform drivers.

Change-Id: Ifd838abc5d012a908e94fdeec0ec320667a7e9d5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomedia: sprd_dcam: remove build warnings 85/164685/3
Seung-Woo Kim [Wed, 20 Dec 2017 09:54:13 +0000 (18:54 +0900)]
media: sprd_dcam: remove build warnings

Remove build warnings.

Change-Id: Iecca7b0767d47abb01e444b9a34d861917e5e149
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agofbdev: sprd: fix wrong sscanf() parameters 23/164623/3
Seung-Woo Kim [Wed, 20 Dec 2017 05:03:49 +0000 (14:03 +0900)]
fbdev: sprd: fix wrong sscanf() parameters

There were several wrong sscanf() parameter usages. Fix the wrong
parameters.

Note: "%s" format for sscanf() of kernel is required char * but it
was assigned char **, but strangely, both cases are fine on runtime.

Change-Id: I9c77a71f7c26fe25935c2633a5806291c537d181
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agofbdev: sprd: remove build warnings 22/164622/3
Seung-Woo Kim [Wed, 20 Dec 2017 05:02:46 +0000 (14:02 +0900)]
fbdev: sprd: remove build warnings

Remove build warnings.

Change-Id: I6755843fe76058c42811fbbbf86d38e8dae9aaf3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomedia: sprd_sensor: fix wrong parameter on device_destroy() 89/164589/3
Seung-Woo Kim [Wed, 20 Dec 2017 01:23:03 +0000 (10:23 +0900)]
media: sprd_sensor: fix wrong parameter on device_destroy()

There are wrong parameter usages for device_destroy() in error path. Fix
the wrong parameter with proper dev->devt element.

Change-Id: I4df6a5a1fefe9cd6884b9b1ef220648e1176587e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomedia: sprd_sensor: remove build warnings 88/164588/3
Seung-Woo Kim [Wed, 20 Dec 2017 01:21:55 +0000 (10:21 +0900)]
media: sprd_sensor: remove build warnings

Remoev build warnings.

Change-Id: I7ed9a94c98f99a82349cad38263c56375fbc1b44
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoiommu: sprd: remove build warnings 00/164500/1
Seung-Woo Kim [Tue, 19 Dec 2017 09:25:04 +0000 (18:25 +0900)]
iommu: sprd: remove build warnings

Remove build warnings including wrong casting, shift warning and
unused variable.

Change-Id: I8c9517725db3c59e0a3f5380543ae0aca93fda57
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agogpio/sprd-eic: remove build warning 90/164390/1
Seung-Woo Kim [Tue, 19 Dec 2017 04:04:47 +0000 (13:04 +0900)]
gpio/sprd-eic: remove build warning

Remove build warning because of no return check.

Change-Id: Idd46626118be4c76a22ecdd3cdb69e40cb549242
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agosprd/sipc: fix wrong double pointer usage 73/164373/1
Seung-Woo Kim [Tue, 19 Dec 2017 01:54:18 +0000 (10:54 +0900)]
sprd/sipc: fix wrong double pointer usage

There is wrong converting double pointer to pointer. Fix the wrong
double pointer usage.

NOTE: sipc is built-in module, so the remove callback is not really
called and this does not really change operation flow.

Change-Id: I5f035c9e12003fdd1d0799f712fd6b450e101124
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agosprd/sipc: remove build warnings 72/164372/1
Seung-Woo Kim [Tue, 19 Dec 2017 01:51:39 +0000 (10:51 +0900)]
sprd/sipc: remove build warnings

Remove build warnings including wrong printing format and wrong cast.

Change-Id: If3ba9d58eab7bfa6a269934aedf1ba700692aafd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agosprd/iq: remove build warning 88/164288/1
Seung-Woo Kim [Mon, 18 Dec 2017 09:27:44 +0000 (18:27 +0900)]
sprd/iq: remove build warning

Remove unused variable build warning.

Change-Id: I29c0b76b872c3f075c0493231aa6ad03920126cc
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agopower: fuel_gauge: sprd2713: remove build warning 87/164287/1
Seung-Woo Kim [Mon, 18 Dec 2017 09:26:18 +0000 (18:26 +0900)]
power: fuel_gauge: sprd2713: remove build warning

Remove wrong print format build warning.

Change-Id: I88964cebce54476dfc2baaa4f41085ae4fc90a6f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: mach-sc: remove cast to pointer from integer of different size 86/164286/1
Seung-Woo Kim [Mon, 18 Dec 2017 09:24:04 +0000 (18:24 +0900)]
ARM: mach-sc: remove cast to pointer from integer of different size

Remove build warnings from cast to pointer from integer of different size.

Change-Id: I8ac8ec85f07df647b850a12e0bf54e81e6fe66ec
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agohwspinlock/sprd: remove build warnings 85/164285/1
Seung-Woo Kim [Mon, 18 Dec 2017 09:22:19 +0000 (18:22 +0900)]
hwspinlock/sprd: remove build warnings

Remove unused functions build warnings.

Change-Id: I9181643757dc7a562c81a3ea7c204e5c06df8202
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agodrm/sprd: remove build warnings 84/164284/1
Seung-Woo Kim [Mon, 18 Dec 2017 09:19:41 +0000 (18:19 +0900)]
drm/sprd: remove build warnings

Remove build warnings including unsed variables, unused functions,
and wrong print formats.

Change-Id: I8483b364d26e959b0736c0723849df078c06c7a5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agosmack: Fix gcc warning from unused smack_syslog_lock mutex in smackfs.c 90/164090/1 accepted/tizen_4.0_unified accepted/tizen/4.0/unified/20171218.072033 accepted/tizen/unified/20171218.072335 submit/tizen/20171218.021305 submit/tizen_4.0/20171218.021435 tizen_4.0.IoT.p2_release
Paul Gortmaker [Mon, 23 Mar 2015 18:03:17 +0000 (14:03 -0400)]
smack: Fix gcc warning from unused smack_syslog_lock mutex in smackfs.c

In commit 00f84f3f2e9d088f06722f4351d67f5f577abe22 ("Smack: Make the
syslog control configurable") this mutex was added, but the rest of
the final commit never actually made use of it, resulting in:

 In file included from include/linux/mutex.h:29:0,
                  from include/linux/notifier.h:13,
                  from include/linux/memory_hotplug.h:6,
                  from include/linux/mmzone.h:821,
                  from include/linux/gfp.h:5,
                  from include/linux/slab.h:14,
                  from include/linux/security.h:27,
                  from security/smack/smackfs.c:21:
 security/smack/smackfs.c:63:21: warning: ‘smack_syslog_lock’ defined but not used [-Wunused-variable]
  static DEFINE_MUTEX(smack_syslog_lock);
                      ^

A git grep shows no other instances/references to smack_syslog_lock.
Delete it, assuming that the mutex addition was just a leftover from
an earlier work in progress version of the change.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
[sw0312.kim: backport from mainline commit f43b65bad6d5 to remove build warning cuased by backported commit]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id1a38438a4f11f0cf4dff7cbf94e567a90de88fe

6 years agoSmack: Make the syslog control configurable 89/164089/1
Casey Schaufler [Mon, 23 Dec 2013 19:07:10 +0000 (11:07 -0800)]
Smack: Make the syslog control configurable

The syslog control requires that the calling proccess
have the floor ("_") Smack label. Tizen does not run any
processes except for kernel helpers with the floor label.
This changes allows the admin to configure a specific
label for syslog. The default value is the star ("*")
label, effectively removing the restriction. The value
can be set using smackfs/syslog for anyone who wants
a more restrictive behavior.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[sw0312.kim: backport from mainline commit 00f84f3f2e9d to support non-root user dlog]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I030b6a271020c1ff9aa79538afb753fed3d7289e

6 years agoinput: headset-sprd: Fixed build warnings 89/160989/2 accepted/tizen/unified/20171130.063259 submit/tizen/20171129.051842
Jaechul Lee [Tue, 21 Nov 2017 04:48:05 +0000 (13:48 +0900)]
input: headset-sprd: Fixed build warnings

Fix build warnings unused-variable, declaration-after-statement

Change-Id: I2fd8b90ea483fbbe39d568d03b38b9fc7f1b349d
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
6 years agoperf: Fix arch_perf_out_copy_user default 91/160791/5
Peter Zijlstra [Wed, 30 Oct 2013 20:16:22 +0000 (21:16 +0100)]
perf: Fix arch_perf_out_copy_user default

The arch_perf_output_copy_user() default of
__copy_from_user_inatomic() returns bytes not copied, while all other
argument functions given DEFINE_OUTPUT_COPY() return bytes copied.

Since copy_from_user_nmi() is the odd duck out by returning bytes
copied where all other *copy_{to,from}* functions return bytes not
copied, change it over and ammend DEFINE_OUTPUT_COPY() to expect bytes
not copied.

Oddly enough DEFINE_OUTPUT_COPY() already returned bytes not copied
while expecting its worker functions to return bytes copied.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: will.deacon@arm.com
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20131030201622.GR16117@laptop.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit 0a196848ca36 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: Icde4bc44cb0dc6c3ddd88398a33163e5689ed82a

6 years agoperf: Improve the perf_sample_data struct layout 90/160790/5
Peter Zijlstra [Wed, 24 Sep 2014 11:48:42 +0000 (13:48 +0200)]
perf: Improve the perf_sample_data struct layout

This patch reorders fields in the perf_sample_data struct in order to
minimize the number of cachelines touched in perf_sample_data_init().
It also removes some intializations which are redundant with the code
in kernel/events/core.c

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1411559322-16548-7-git-send-email-eranian@google.com
Cc: cebbert.lkml@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: jolsa@redhat.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit 2565711fb7d7 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I92db818e36740e3601da3a5a00fc5973840ef8c2

6 years agoperf: Add ability to sample machine state on interrupt 89/160789/5
Stephane Eranian [Wed, 24 Sep 2014 11:48:37 +0000 (13:48 +0200)]
perf: Add ability to sample machine state on interrupt

Enable capture of interrupted machine state for each sample.

Registers to sample are passed per event in the sample_regs_intr bitmask.

To sample interrupt machine state, the PERF_SAMPLE_INTR_REGS must be passed in
sample_type.

The list of available registers is arch dependent and provided by asm/perf_regs.h

Registers are laid out as u64 in the order of the bit order of sample_intr_regs.

This patch also adds a new ABI version PERF_ATTR_SIZE_VER4 because we extend
the perf_event_attr struct with a new u64 field.

Reviewed-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: cebbert.lkml@gmail.com
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-api@vger.kernel.org
Link: http://lkml.kernel.org/r/1411559322-16548-2-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit 60e2364e60e8 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I3127f0a78ed6d0f78b0d2db73a1c5b114322c369

6 years agoperf: Document the new transaction sample type 88/160788/5
Vince Weaver [Fri, 13 Dec 2013 20:52:25 +0000 (15:52 -0500)]
perf: Document the new transaction sample type

Commit fdfbbd07e91f8fe3871 ("perf: Add generic transaction flags")
added support for PERF_SAMPLE_TRANSACTION but forgot to add documentation
for the sample type to include/uapi/linux/perf_event.h

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1312131548450.10372@pianoman.cluster.toy
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit 189b84fb5449 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I5910990525a9bc7014c9b5c3e7002e62bc6e51c5

6 years agoperf: Add generic transaction flags 87/160787/5
Andi Kleen [Fri, 20 Sep 2013 14:40:39 +0000 (07:40 -0700)]
perf: Add generic transaction flags

Add a generic qualifier for transaction events, as a new sample
type that returns a flag word. This is particularly useful
for qualifying aborts: to distinguish aborts which happen
due to asynchronous events (like conflicts caused by another
CPU) versus instructions that lead to an abort.

The tuning strategies are very different for those cases,
so it's important to distinguish them easily and early.

Since it's inconvenient and inflexible to filter for this
in the kernel we report all the events out and allow
some post processing in user space.

The flags are based on the Intel TSX events, but should be fairly
generic and mostly applicable to other HTM architectures too. In addition
to various flag words there's also reserved space to report an
program supplied abort code. For TSX this is used to distinguish specific
classes of aborts, like a lock busy abort when doing lock elision.

Flags:

Elision and generic transactions     (ELISION vs TRANSACTION)
(HLE vs RTM on TSX; IBM etc.  would likely only use TRANSACTION)
Aborts caused by current thread vs aborts caused by others (SYNC vs ASYNC)
Retryable transaction    (RETRY)
Conflicts with other threads    (CONFLICT)
Transaction write capacity overflow    (CAPACITY WRITE)
Transaction read capacity overflow    (CAPACITY READ)

Transactions implicitely aborted can also return an abort code.
This can be used to signal specific events to the profiler. A common
case is abort on lock busy in a RTM eliding library (code 0xff)
To handle this case we include the TSX abort code

Common example aborts in TSX would be:

- Data conflict with another thread on memory read.
                                      Flags: TRANSACTION|ASYNC|CONFLICT
- executing a WRMSR in a transaction. Flags: TRANSACTION|SYNC
- HLE transaction in user space is too large
                                      Flags: ELISION|SYNC|CAPACITY-WRITE

The only flag that is somewhat TSX specific is ELISION.

This adds the perf core glue needed for reporting the new flag word out.

v2: Add MEM/MISC
v3: Move transaction to the end
v4: Separate capacity-read/write and remove misc
v5: Remove _SAMPLE. Move abort flags to 32bit. Rename
    transaction to txn
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1379688044-14173-2-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[inki.dae: backport mainline commit fdfbbd07e91f to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I8a6349c860fa7a4d6e085e52452e44f729042aba

6 years agoperf: make events stream always parsable 86/160786/4
Adrian Hunter [Tue, 27 Aug 2013 08:23:07 +0000 (11:23 +0300)]
perf: make events stream always parsable

The event stream is not always parsable because the format of a sample
is dependent on the sample_type of the selected event.  When there is
more than one selected event and the sample_types are not the same then
parsing becomes problematic.  A sample can be matched to its selected
event using the ID that is allocated when the event is opened.
Unfortunately, to get the ID from the sample means first parsing it.

This patch adds a new sample format bit PERF_SAMPLE_IDENTIFER that puts
the ID at a fixed position so that the ID can be retrieved without
parsing the sample.  For sample events, that is the first position
immediately after the header.  For non-sample events, that is the last
position.

In this respect parsing samples requires that the sample_type and ID
values are recorded.  For example, perf tools records struct
perf_event_attr and the IDs within the perf.data file.  Those must be
read first before it is possible to parse samples found later in the
perf.data file.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1377591794-30553-6-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[inki.dae: backport mainline commit ff3d527cebc1 to show proper perf result graph]
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I073f77c98152300fe594233de4f0ce998d511890

6 years agoperf: Fix event->ctx locking 93/160893/1
Peter Zijlstra [Fri, 23 Jan 2015 11:24:14 +0000 (12:24 +0100)]
perf: Fix event->ctx locking

commit f63a8daa5812afef4f06c962351687e1ff9ccb2b upstream.

There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.

It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.

What I did fail at is sensible runtime checks on the use of
event->ctx, the RCU use makes it very hard.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20150123125834.209535886@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[sw0312.kim: backport the commit 18163dd15627 from linux-3.16.y to fix CVE-2016-6787 and CVE-2016-6788]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I058da6e62db2ce7166aad2b87a60929d6d56b4d3

6 years agox86/ldt: Make modify_ldt synchronous 92/160892/1
Andy Lutomirski [Thu, 30 Jul 2015 21:31:32 +0000 (14:31 -0700)]
x86/ldt: Make modify_ldt synchronous

commit 37868fe113ff2ba814b3b4eb12df214df555f8dc upstream.

modify_ldt() has questionable locking and does not synchronize
threads.  Improve it: redesign the locking and synchronize all
threads' LDTs using an IPI on all modifications.

This will dramatically slow down modify_ldt in multithreaded
programs, but there shouldn't be any multithreaded programs that
care about modify_ldt's performance in the first place.

This fixes some fallout from the CVE-2015-5157 fixes.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: security@kernel.org <security@kernel.org>
Cc: xen-devel <xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/4c6978476782160600471bd865b318db34c7b628.1438291540.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[ luis: backported to 3.16:
  - dropped changes to comments in switch_mm()
  - included asm/mmu_context.h in perf_event.c
  - adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
[sw0312.kim: backport the commit b29f804421c4 from linux-3.16.y to fix CVE-2015-5157]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I189a166480ae8b758e9b992c87a1e7ff7fb8c2ad

6 years agomedia: radio: sprd: Fixed build warnings 44/160744/1
Jaechul Lee [Mon, 20 Nov 2017 01:08:19 +0000 (10:08 +0900)]
media: radio: sprd: Fixed build warnings

Fixed build warnings Wunused-variable

Change-Id: I297d9fdde5168e7851b77b1830e64b1ebabcdaf7
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
6 years agomisc: clk_mon: Remove some of build warnings 53/159753/4 accepted/tizen/unified/20171114.062805 submit/tizen/20171113.235549
Wook Song [Mon, 13 Nov 2017 04:05:07 +0000 (13:05 +0900)]
misc: clk_mon: Remove some of build warnings

This patch removes build warnings caused by differences between
expected function argument type and actual passed function argument and
the build warning caused by a variable declaration in the middle of
code. Note that the build warning introduced by -Wframe-larger-than
remains.

Change-Id: Ia59d6c978a3692757833778bdc65a225c864713e
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoleds: sm5701: Remove build warnings 52/159752/3
Wook Song [Mon, 13 Nov 2017 02:38:06 +0000 (11:38 +0900)]
leds: sm5701: Remove build warnings

This patch remove build warnings caused by wrong usage of the
container_of macro.

Change-Id: I76d9e74300a85fd864b2e93caf7429588df90d04
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoASoC: sprd: Remove build warnings 67/159767/1
Jaechul Lee [Mon, 13 Nov 2017 02:28:51 +0000 (11:28 +0900)]
ASoC: sprd: Remove build warnings

Add __maybe_unused for fixing Wunused-function.

Change-Id: I90c9bd1b0e07fcd5be498acae051afc02dff4d13
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
6 years agoALSA: drivers: Remove build warnings 60/159760/2
Jaechul Lee [Mon, 13 Nov 2017 02:25:49 +0000 (11:25 +0900)]
ALSA: drivers: Remove build warnings

Remove build warnings like Wunused-variable, Wdiscarded-qualifiers.

Change-Id: I90c58e93f571af03aba322d989691bf2872c784f
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
6 years agokconfig: Fix warning "‘jump’ may be used uninitialized" 41/159741/1
Peter Kümmel [Tue, 4 Nov 2014 11:01:59 +0000 (12:01 +0100)]
kconfig: Fix warning "‘jump’ may be used uninitialized"

Warning:
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     jump->offset = strlen(r->s);

Simplifies the test logic because (head && local) means (jump != 0)
and makes GCC happy when checking if the jump pointer was initialized.

Signed-off-by: Peter Kümmel <syntheticpp@gmx.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
[sw0312.kim: cherry-pick from mainline commit 2d5603060967 to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I8b834f68f6e4d1637e001991feb6708e85d4ea00

6 years agoInput: keyboard: tc350-touchkey: Remove a build warning 48/159648/1 accepted/tizen/unified/20171113.092516 submit/tizen/20171113.013653
Wook Song [Fri, 10 Nov 2017 08:25:30 +0000 (17:25 +0900)]
Input: keyboard: tc350-touchkey: Remove a build warning

This patch removes a build warning caused by a unused variable.

Change-Id: Ib89f0b36a5e443466698d6fa45939ef716dab393
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoInput: keyboard: sc_keypad: Remove build warnings 47/159647/1
Wook Song [Fri, 10 Nov 2017 07:59:47 +0000 (16:59 +0900)]
Input: keyboard: sc_keypad: Remove build warnings

This patch removes build warnings caused by differences between expected
function argument type and actual passed function argument type. In
addition, several build warnings introduced by unused
variables/functions and type conversions without cast are removed.

Change-Id: I612420f1cb900ba79c58d2a5980e49b80e9a0386
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoInput: keyboard: sprd_eic: Remove build warnings 28/159628/3
Wook Song [Fri, 10 Nov 2017 07:25:05 +0000 (16:25 +0900)]
Input: keyboard: sprd_eic: Remove build warnings

This patch removes build warnings caused by passing wrong pointer type
as a function argument type. The build warnings caused by unused
variables/functions, and variable declarations in the middle of code are
also removed.

Change-Id: I7cadc6ed8cd8763e5773652e9f4d8cb0e7f46cdb
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agousb: dwc_otg: Remove build warnings 87/159587/2
Wook Song [Fri, 10 Nov 2017 02:22:55 +0000 (11:22 +0900)]
usb: dwc_otg: Remove build warnings

This patch removes build warnings caused by type conversions without
cast, unused variables/functions, wrong printk format strings, 'return'
with a value in function returning void, and ignorance of return value
of several functions.

Change-Id: Icbb1b40984f6ad3f78a3a921320fdf7660e4f7d2
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agomfd: sm5701: Remove build warnings 75/159575/3
Wook Song [Fri, 10 Nov 2017 00:38:40 +0000 (09:38 +0900)]
mfd: sm5701: Remove build warnings

This patch removes build warnings caused by non-existent function
argument type, unused function, and wrong printk format strings.

Change-Id: I7ceb213b3326e261e2a7ddeb4fc2e78d1d46db2a
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agomfd: sm5504: Remove build warnings 74/159574/2
Wook Song [Fri, 10 Nov 2017 00:37:02 +0000 (09:37 +0900)]
mfd: sm5504: Remove build warnings

This patch removes build warnings caused by unused varibles and
functions.

Change-Id: I925a2bd95c204267106372e35080abfe0519ee44
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agozram: Resolve build warnings due to redefined macros 73/159573/2
Wook Song [Thu, 9 Nov 2017 11:26:12 +0000 (20:26 +0900)]
zram: Resolve build warnings due to redefined macros

This patch removes build warnings due to redefined macros.

Change-Id: I9c7e50d5fd9bdc6de4415c4893c8041c66420147
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoPM / sprd: Remove build warnings 91/159491/3
Wook Song [Thu, 9 Nov 2017 07:14:35 +0000 (16:14 +0900)]
PM / sprd: Remove build warnings

This patch removes build warnings caused by making pointers from integer
without casts, unexpected types of function arguments, unused
variables/functions, using variables without initialization, using wrong
printk format strings, and -Wreturn-type.

Change-Id: Ic08fc5384235643ebeae2bf13c9609013c781563
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoASoC: sprd: Remove build warnings 60/159460/2
Jaechul Lee [Thu, 9 Nov 2017 05:30:52 +0000 (14:30 +0900)]
ASoC: sprd: Remove build warnings

Fix build warnings in sprd such as redefine, -Wunused-variable,
Wparentheses, Wformat-extra-args

Change-Id: I6397abc3f9716235e87896d024f7d3fc09f7c77e
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
6 years agocpufreq: platform: sprd: Remove build warnings 47/159447/3
Wook Song [Thu, 9 Nov 2017 03:14:47 +0000 (12:14 +0900)]
cpufreq: platform: sprd: Remove build warnings

This patch removes build warnings caused by unused variables/functions,
making pointer from integer without cast, and unexpected type of a
function argument.

Change-Id: I33486abad8bd8760b1cffc96a06bc0baa20fafb6
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoPM / load_analyzer: Remove build warnings 77/159177/1
Wook Song [Tue, 7 Nov 2017 09:19:33 +0000 (18:19 +0900)]
PM / load_analyzer: Remove build warnings

This patch removes build warnings caused by redefined macros and unused
variables.

Change-Id: I593b5b0e010b4fdf03d46dc8b5a74d41c5787b32
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agocpufreq: sprd: Remove build warnings 94/159094/2
Wook Song [Tue, 7 Nov 2017 02:49:04 +0000 (11:49 +0900)]
cpufreq: sprd: Remove build warnings

This patch removes build warnings introduced by unused variables, unused
functions, and -Wincompatible-pointer-types.

Change-Id: Icfc07589b52bb4d51af7e27d87e97ace1568dcd4
Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years agoautotst: remove build warnings 70/158670/1 accepted/tizen/unified/20171106.073145 submit/tizen/20171106.023205
Seung-Woo Kim [Thu, 2 Nov 2017 09:56:30 +0000 (18:56 +0900)]
autotst: remove build warnings

Remove build warnings including unused variable, redefined macro and
assignment from inger without a cast.

Change-Id: I7faf4ef345244be3f7aa626163de079fb0b2a840
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agowlan: sc2331: fix build warnings 67/158667/1
Seung-Woo Kim [Thu, 2 Nov 2017 09:48:08 +0000 (18:48 +0900)]
wlan: sc2331: fix build warnings

Fix build warnings.

Change-Id: I0f16258795e30eaa4818127f61229d90f717f5af
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agousb: gadget: vserial: remove unused variable build warnings 72/158572/1
Seung-Woo Kim [Thu, 2 Nov 2017 02:06:57 +0000 (11:06 +0900)]
usb: gadget: vserial: remove unused variable build warnings

There are build warnings about unused variable because of debug
log print function. Remove the build warnings with __maybe_unused
macro.

Change-Id: I3b0a61beb388876efab82c7fdc8ee196946ad08f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agousb: gadget: slp: remove build warnings 71/158571/1
Seung-Woo Kim [Thu, 2 Nov 2017 01:56:26 +0000 (10:56 +0900)]
usb: gadget: slp: remove build warnings

There are build warnings about incompatible pointer type and unused
function. Remove the build warnings.

Change-Id: I666cf0a172f9aa66a6dfbb06587bc6a0501cbdb5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agobattery: fix build warnings 29/158529/1
Seung-Woo Kim [Wed, 1 Nov 2017 12:38:32 +0000 (21:38 +0900)]
battery: fix build warnings

Fix build warnings in product battery driver.

Change-Id: I532f2ee3d8401823f0d5e4c029c4c73c3d83793b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: lib: fix build warnings in ksm optimized memcmp 24/158524/1
Seung-Woo Kim [Wed, 1 Nov 2017 11:43:14 +0000 (20:43 +0900)]
ARM: lib: fix build warnings in ksm optimized memcmp

With linux/limkage.h header, there are macro redefined build
warnings. Fix the build warnings by removing the header.

Change-Id: Ia9904af0f7db840b2517b8da8f25ba346835ea96
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: mach-sc: remove build warnings 23/158523/1
Seung-Woo Kim [Wed, 1 Nov 2017 11:41:44 +0000 (20:41 +0900)]
ARM: mach-sc: remove build warnings

Remove build warnings with explict type conversion, modified
function pointers, and modified print formats.

Change-Id: I5f173bb04d014e1c93ea56e62374466a05e5101e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoUSB: gadget: ethernet: remove a build warning with wrong indent 04/158504/1
Seung-Woo Kim [Wed, 1 Nov 2017 09:13:18 +0000 (18:13 +0900)]
USB: gadget: ethernet: remove a build warning with wrong indent

Remove a build warning with wrong indent caused by product patch.

Change-Id: I7eed4229726ec4a8c0c81482684e1b6dd0f208c6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agostaging: alarm-dev: remove build warnings caused by product patch 03/158503/1
Seung-Woo Kim [Wed, 1 Nov 2017 09:09:37 +0000 (18:09 +0900)]
staging: alarm-dev: remove build warnings caused by product patch

Remove build warnings caused by product patch.

Change-Id: Ifdd6bc64b7cf420d3ef671f416ef8a111ac53563
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agothermal: step_wise: remove build warnings caused by print log 02/158502/1
Seung-Woo Kim [Wed, 1 Nov 2017 09:03:47 +0000 (18:03 +0900)]
thermal: step_wise: remove build warnings caused by print log

Remove build warnings caused by product print log.

Change-Id: I7a764079539ad40cfcad1d3d6dfbb92306520ad9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoipv4: remove build warnings caused by product patch 94/158494/1
Seung-Woo Kim [Wed, 1 Nov 2017 08:53:32 +0000 (17:53 +0900)]
ipv4: remove build warnings caused by product patch

Remove build warnings caused by product patch with -Wformat and
-Wunused-function.

Change-Id: I88887cd727dca4892726169eddbf46ea9bd9e22e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocpufreq: remove a build warning caused by product log 92/158492/1
Seung-Woo Kim [Wed, 1 Nov 2017 08:34:11 +0000 (17:34 +0900)]
cpufreq: remove a build warning caused by product log

There is a print format mismatch build warning caused by product
log. Remove the build warning.

Change-Id: I3e8659ab6c902e281c5fbc48298c5220005a8adb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocpuidle: fix mixed declaration 91/158491/1
Seung-Woo Kim [Wed, 1 Nov 2017 08:32:27 +0000 (17:32 +0900)]
cpuidle: fix mixed declaration

There is mixed declaration caused by product patch which makes
declaration-after-statement build waring. Fix the mixed declaration.

Change-Id: Ic10b2d7713a102ba06bd4994a506466268c32171
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agocpuidle: governor: menu: remove unused-function build warning 90/158490/1
Seung-Woo Kim [Wed, 1 Nov 2017 08:29:48 +0000 (17:29 +0900)]
cpuidle: governor: menu: remove unused-function build warning

There is unused functuon causing a build warning. Remove the
build warning by add __maybe_unused macro.

Change-Id: Ia087aecb86162418c706e69515e78e562615485d
Fixes: df99953c42c6 ("cpuidle: governor: menu: don't use loadavg") in https://android.googlesource.com/kernel/common
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomm: remove build warnings caused by product patch 89/158489/1
Seung-Woo Kim [Wed, 1 Nov 2017 08:14:03 +0000 (17:14 +0900)]
mm: remove build warnings caused by product patch

There are build warnings, with printing format mismatch, which are
caused by product patch. Remove the build warnings.

Change-Id: I45e86000426f461332eb05ff15be97272f46e750
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agovfs: remove build warnings caused by product patch 88/158488/1
Seung-Woo Kim [Wed, 1 Nov 2017 07:56:33 +0000 (16:56 +0900)]
vfs: remove build warnings caused by product patch

There are build warnings caused by product patch. Remove the build
warnings including unused-variable and printing format mismatch.

Change-Id: I7a5ea4bb939a8f97c1f8bc5039fdf52c521d1afc
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoPM / Sleep: remove build warnings caused by product patch 70/158470/1
Seung-Woo Kim [Wed, 1 Nov 2017 06:40:45 +0000 (15:40 +0900)]
PM / Sleep: remove build warnings caused by product patch

Remove build warnings caused by product patch.

Note: freeze_begin() / freeze_enter() functions are never called
with product patch.

Change-Id: I6ec93a93784a4ebb12c8e1030a419623017a7c7e
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoirq: pm: Remove unused variable 69/158469/1
Dmitry Shmidt [Tue, 13 Jan 2015 21:52:49 +0000 (13:52 -0800)]
irq: pm: Remove unused variable

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
[sw0312.kim: cherry-pick the commit c0d201a31f79 from https://android.googlesource.com/kernel/common to remove build warning
 - to apply patch, change-id tag is adjusted]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If1ce074d6a92ff415e089df9ea023ce057c8ebd1

6 years agocoredump: remove build warnings caused by product patch 68/158468/1
Seung-Woo Kim [Wed, 1 Nov 2017 06:14:07 +0000 (15:14 +0900)]
coredump: remove build warnings caused by product patch

Remove build warnings made from product patch.

Change-Id: Ic0f3778bbac6b3b19f69a7c74f796a21b6955862
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agomodule: remove a build warning in product log patch 67/158467/1
Seung-Woo Kim [Wed, 1 Nov 2017 06:04:25 +0000 (15:04 +0900)]
module: remove a build warning in product log patch

There is a build warning in product log patch. Remove the build
warning.

Change-Id: I192d3eada6857b58698dc74a6fabd06330266970
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoCPU hotplug: remove build warnings in product log patch 66/158466/1
Seung-Woo Kim [Wed, 1 Nov 2017 06:03:10 +0000 (15:03 +0900)]
CPU hotplug: remove build warnings in product log patch

There are a build warnings in product log patch. Remove the build
warnings.

Change-Id: I0c97dcc7f001ec6676c4d046962c3ff7fcad52f6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoinit: remove a build warning in product perf patch 65/158465/1
Seung-Woo Kim [Wed, 1 Nov 2017 06:01:19 +0000 (15:01 +0900)]
init: remove a build warning in product perf patch

There is a build warning caused by product perf patch. Remove
the unused-variable build warning.

Change-Id: If7ce74eef352680f7dd2b6093ff4fc335b6594e9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agofirmware_class: remove a build warning in product log patch 64/158464/1
Seung-Woo Kim [Wed, 1 Nov 2017 05:59:02 +0000 (14:59 +0900)]
firmware_class: remove a build warning in product log patch

There is a build warning in product log patch. Remove the build
warning.

Change-Id: I7f9bdb57b27efd50a446688f9cfbe631f5602672
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agodrivers: dma-contiguous: remove build warnings caused by product patch 63/158463/1
Seung-Woo Kim [Wed, 1 Nov 2017 05:56:14 +0000 (14:56 +0900)]
drivers: dma-contiguous: remove build warnings caused by product patch

There are build warnings caused by product patch. Remove the build
warnings including incompatible-pointer-types, discarded-qualifiers,
and unused-variable.

Change-Id: I24ee1c977c7f93c09b36067bd8032a0777a3b465
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agovideo: mdnie: add omitted semicolon to struct 23/158423/1
Seung-Woo Kim [Wed, 1 Nov 2017 01:55:33 +0000 (10:55 +0900)]
video: mdnie: add omitted semicolon to struct

The omitted semicolon in struct causes build warnings. Add the
omitted semicolon to remove build warnings.

Change-Id: Ieab07085484f79d1520d10487ff15ed0e51f0192
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agousb: dwc_otg: fix build warnings from -Wstrict-prototypes 18/158418/1
Seung-Woo Kim [Wed, 1 Nov 2017 01:44:43 +0000 (10:44 +0900)]
usb: dwc_otg: fix build warnings from -Wstrict-prototypes

There are functions without parameter type, and it causes build
warning from -Wstrict-prototypes. Fix the build warnings by adding
parameter type.

Change-Id: I0b195d65e2c19727d6372310b1032a9b482412ab
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: sprd: fix build warnings from -Wstrict-prototypes 17/158417/1
Seung-Woo Kim [Wed, 1 Nov 2017 01:02:11 +0000 (10:02 +0900)]
ARM: sprd: fix build warnings from -Wstrict-prototypes

There are functions without parameter type, and it causes build
warning from -Wstrict-prototypes. Fix the build warnings by adding
parameter type.

Change-Id: Iad2356258d0358e8f49ca1e0ef7985e43981730a
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: sprd: remove macro redefined build warnings 63/158363/1
Seung-Woo Kim [Tue, 31 Oct 2017 08:23:09 +0000 (17:23 +0900)]
ARM: sprd: remove macro redefined build warnings

In sprd soc headers, order of header affects repeated macro
definitions and it causes many build warnings. Remove the macro
redefined build warnings by changing order of included headers.

Change-Id: I444399e693727787774b9825029aae1d773affe3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: SPRD: fix config type of SPRD_SYSDUMP as bool 62/158362/1
Seung-Woo Kim [Tue, 31 Oct 2017 04:50:20 +0000 (13:50 +0900)]
ARM: SPRD: fix config type of SPRD_SYSDUMP as bool

There is config type conflict for SPRD_SYSDUMP because for arm sprd
in arch/arm/Kconfig.debug, it is tristate but for arm64 sprd in
drivers/platform/sprd/Kconfig, it is bool. Fix the config type
as bool to remove type conflict.

Change-Id: I234d18022f5eba50574ca2afe4b13d0aefed63d4
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agohid: fix return type of input_configured callback 61/158361/1
Seung-Woo Kim [Tue, 31 Oct 2017 06:37:32 +0000 (15:37 +0900)]
hid: fix return type of input_configured callback

The return type of input_configured callback is fixed from void to
int from header. Fix return type of input_configured callback from
hid drivers to fix build warnings.

This is partially picked from the commit 9154301a47b3
("HID: hid-input: allow input_configured callback return errors")
in mainline.

Change-Id: Id529359eb7d6d005aac28596f0ec65dde59b5564
Fixes: 5925993fe56e ("HID: Add input_register callback.") in https://android.googlesource.com/kernel/common
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoARM: 8160/1: drop warning about return_address not using unwind tables 60/158360/1
Uwe Kleine-König [Wed, 24 Sep 2014 07:51:57 +0000 (08:51 +0100)]
ARM: 8160/1: drop warning about return_address not using unwind tables

The warning was introduced in 2009 (commit 4bf1fa5a34aa ([ARM] 5613/1:
implement CALLER_ADDRESSx)). The only "problem" here is that
CALLER_ADDRESSx for x > 1 returns NULL which doesn't do much harm.

The drawback of implementing a fix (i.e. use unwind tables to implement CALLER_ADDRESSx) is that much of the unwinder code would need to be marked as not
traceable.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[sw0312.kim: cherry-pick from mainline to remove build warning.]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ifd4a14efb9f891abca8e3da0a65f0635160356e8

6 years agonet: rfkill: Do not ignore errors from regulator_enable() 59/158359/1
Luis Henriques [Wed, 14 Aug 2013 22:10:06 +0000 (23:10 +0100)]
net: rfkill: Do not ignore errors from regulator_enable()

commit dee08ab83d0378d922b67e7cf10bbec3e4ea343b upstream.

Function regulator_enable() may return an error that has to be checked.
This patch changes function rfkill_regulator_set_block() so that it checks
for the return code.  Also, rfkill_data->reg_enabled is set to 'true' only
if there is no error.

This fixes the following compilation warning:

net/rfkill/rfkill-regulator.c:43:20: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to remove build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I5d8067d57941fc25945a04e10b093109d92080a0

6 years agoarm: configs: tm1: Enable HUNG_TASK_DETECT configuration 88/157588/1 accepted/tizen/unified/20171031.055646 submit/tizen/20171031.014243
Chanwoo Choi [Wed, 25 Oct 2017 07:55:40 +0000 (16:55 +0900)]
arm: configs: tm1: Enable HUNG_TASK_DETECT configuration

This patch just enables the HUNG_TASK_DETECT configuration
in order to catch the deadlock issue.

Change-Id: I913fca23938141ad239cfd8a8c11db4663b20b3e
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
6 years agoAllow stack to grow up to address space limit 88/156288/1 accepted/tizen/4.0/unified/20171018.231714 accepted/tizen/unified/20171018.165210 submit/tizen/20171018.024341 submit/tizen_4.0/20171018.024233 submit/tizen_4.0/20171018.060355 tizen_4.0.m2_release
Helge Deller [Mon, 19 Jun 2017 15:34:05 +0000 (17:34 +0200)]
Allow stack to grow up to address space limit

commit bd726c90b6b8ce87602208701b208a208e6d5600 upstream.

Fix expand_upwards() on architectures with an upward-growing stack (parisc,
metag and partly IA-64) to allow the stack to reliably grow exactly up to
the address space limit given by TASK_SIZE.

Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to apply CVE]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I827de17000efa8216b6aea9ffdc510e4052b3add

6 years agomm: fix new crash in unmapped_area_topdown() 87/156287/1
Hugh Dickins [Tue, 20 Jun 2017 09:10:44 +0000 (02:10 -0700)]
mm: fix new crash in unmapped_area_topdown()

commit f4cb767d76cf7ee72f97dd76f6cfa6c76a5edc89 upstream.

Trinity gets kernel BUG at mm/mmap.c:1963! in about 3 minutes of
mmap testing.  That's the VM_BUG_ON(gap_end < gap_start) at the
end of unmapped_area_topdown().  Linus points out how MAP_FIXED
(which does not have to respect our stack guard gap intentions)
could result in gap_end below gap_start there.  Fix that, and
the similar case in its alternative, unmapped_area().

Cc: stable@vger.kernel.org
Fixes: 1be7107fbe18 ("mm: larger stack guard gap, between vmas")
Reported-by: Dave Jones <davej@codemonkey.org.uk>
Debugged-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to fix CVE-2017-1000364]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id45155ff188da963d152f71db3cc0a4399fd83a2

6 years agoRevert "Revert "mm: larger stack guard gap, between vmas"" 86/156286/1
Seung-Woo Kim [Wed, 18 Oct 2017 02:05:35 +0000 (11:05 +0900)]
Revert "Revert "mm: larger stack guard gap, between vmas""

This reverts commit 670116c57e183693ceba3cc505b36664fb470c8c.

Now, swap-modules package is ready, reverts again to apply CVE
patch.

Change-Id: I205ce828ed5004a270e48d5b68932f8426a3722b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
6 years agoxhci: Fix warning introduced by disabling runtime PM. 49/155649/1
Sarah Sharp [Wed, 28 Aug 2013 16:31:04 +0000 (09:31 -0700)]
xhci: Fix warning introduced by disabling runtime PM.

The 0day build server caught a new build warning that is triggered when
CONFIG_USB_DEFAULT_PERSIST is turned on:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci.git for-usb-next
head:   0730d52a86919300a39a2be37f6c140997dfb82f
commit: c8476fb855434c733099079063990e5bfa7ecad6 [1/3] usb: xhci: Disable runtime PM suspend for quirky controllers
config: i386-randconfig-r6-0826 (attached as .config)

All warnings:

   drivers/usb/host/xhci.c: In function 'xhci_free_dev':
>> drivers/usb/host/xhci.c:3560:17: warning: unused variable 'dev' [-Wunused-variable]
     struct device *dev = hcd->self.controller;
                    ^
   drivers/usb/host/xhci.c: In function 'xhci_alloc_dev':
>> drivers/usb/host/xhci.c:3648:17: warning: unused variable 'dev' [-Wunused-variable]
     struct device *dev = hcd->self.controller;
                    ^

vim +/dev +3560 drivers/usb/host/xhci.c

  3554   * disabled.  Free any HC data structures associated with that device.
  3555   */
  3556  void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
  3557  {
  3558          struct xhci_hcd *xhci = hcd_to_xhci(hcd);
  3559          struct xhci_virt_device *virt_dev;
> 3560          struct device *dev = hcd->self.controller;
  3561          unsigned long flags;
  3562          u32 state;
  3563          int i, ret;
  3564
  3565  #ifndef CONFIG_USB_DEFAULT_PERSIST
  3566          /*
  3567           * We called pm_runtime_get_noresume when the device was attached.
  3568           * Decrement the counter here to allow controller to runtime suspend
  3569           * if no devices remain.
  3570           */
  3571          if (xhci->quirks & XHCI_RESET_ON_RESUME)
  3572                  pm_runtime_put_noidle(dev);
  3573  #endif
  3574
...
  3641  /*
  3642   * Returns 0 if the xHC ran out of device slots, the Enable Slot command
  3643   * timed out, or allocating memory failed.  Returns 1 on success.
  3644   */
  3645  int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
  3646  {
  3647          struct xhci_hcd *xhci = hcd_to_xhci(hcd);
> 3648          struct device *dev = hcd->self.controller;
  3649          unsigned long flags;
  3650          int timeleft;
  3651          int ret;

Fix this.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Shawn Nematbakhsh <shawnn@chromium.org>
[sw0312.kim: cherry-pick from mainline to remove build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I16dccdaacd8736bf0b0169765bb4e46f6eb27fed