platform/kernel/linux-tizen-modules-source.git
3 years agoSeparate configuration files for each target
INSUN PYO [Fri, 9 Jul 2021 03:24:14 +0000 (12:24 +0900)]
Separate configuration files for each target

Change-Id: Iaed004d48d4d0fad16d396ce95b26e37edb66ffb

3 years agoMerge branch 'stability-monitor-kmod-rpi3' into tizen
Karol Lewandowski [Wed, 7 Jul 2021 11:20:25 +0000 (13:20 +0200)]
Merge branch 'stability-monitor-kmod-rpi3' into tizen

This commit integrates previously standalone stability-monitor-kmod-rpi3
into this repository.

Source commit 901f4d0ec2 ("Support Linux kernel v5.10") has been downloaded by:

   git fetch ssh://klewandowski@review.tizen.org:29418/platform/core/system/stability-monitor-kmod-rpi3 refs/changes/90/253890/1 && git checkout FETCH_HEAD

Change-Id: I3ee19411f8c2af86776e9796491857ff88e3baed

3 years agologger: enable logger module
INSUN PYO [Fri, 25 Jun 2021 04:38:56 +0000 (13:38 +0900)]
logger: enable logger module

Change-Id: If186dc62a39a360b42b99cea0f8e4c29940c71db

3 years agopackaging: fix not to set kernel symbol dependency automatically
INSUN PYO [Thu, 24 Jun 2021 06:47:47 +0000 (15:47 +0900)]
packaging: fix not to set kernel symbol dependency automatically

Kernel image rpm does not have kerenl symbol provides, so kernel
symbol automatically checked dependency from kernel module breaks
install dependency. Fix not to run automatical dependency check.

Change-Id: If5a6de3c97205e011dcd91d3358563e3e261560d

3 years agoApply depmod postscript
INSUN PYO [Fri, 18 Jun 2021 06:49:20 +0000 (15:49 +0900)]
Apply depmod postscript

To use modprobe, module name is requires on /lib/modules/version/modules.dep.

Change-Id: I4ac1e90424f2707675f9fce37544c193de6afaf4
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoResolve conflict with /lib/modules when using baselibs
Hyotaek Shim [Wed, 23 Jun 2021 01:15:47 +0000 (10:15 +0900)]
Resolve conflict with /lib/modules when using baselibs

In tw3 images, kernel is based on 64bit while platform is on 32bit.
Thanks to baselibs, aarch64 rpms containing tw3 kernel modules can be repackaged to arm rpms.

$ rpm -ql linux-tizen-modules-tw3-aarch64-6.5.0-0.armv7l.rpm
/lib/modules
/lib/modules/4.9.59
/lib/modules/4.9.59/extra
/lib/modules/4.9.59/extra/logger.ko

Unfortunately, however, /lib/modules, which is implicitly packaged,
is conflict with filesystem package.

INFO: Next install: filesystem
WARNING: file /lib/modules conflicts between attempted installs of
linux-tizen-modules-tw3-aarch64-6.5.0-1.1.armv7l and filesystem-3.1-3.3.armv7l
ERROR: Could not run transaction.

This patch avoids generating /lib/modules in the linux-tizen-modules-tw3-aarch64.armv7l.rpm

Change-Id: I8be870f9999e1e2f626c99bae7bced3ac623d44d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agologger: exclude /lib/module directory from tw3 baselib
INSUN PYO [Thu, 17 Jun 2021 08:47:21 +0000 (17:47 +0900)]
logger: exclude /lib/module directory from tw3 baselib

The baselibs adds paths recursively.
(ie. for /a/b/c, and cofiguration +/a/b/c, the baselibs will add /a, /a/b and then /a/b/c)

So, temporarily remove /lib/module until a solution is found.

=== original rpm ======================================================
linux-tizen-modules-tw3-6.5.0-0.aarch64.rpm
 - /lib/modules/4.9.59/extra
 - /lib/modules/4.9.59/extra/logger.ko
 - /usr/share/licenses/linux-tizen-modules-tw3
 - /usr/share/licenses/linux-tizen-modules-tw3/COPYING

=== baselib rpm ======================================================
linux-tizen-modules-tw3-aarch64-6.5.0-0.armv7l.rpm
 - /lib/modules
 - /lib/modules/4.9.59
 - /lib/modules/4.9.59/extra
 - /lib/modules/4.9.59/extra/logger.ko
 - /usr/share/licenses
 - /usr/share/licenses/linux-tizen-modules-tw3

Change-Id: I6ee6076f2b4247f335c2ca54639b6bf27907a3c1

3 years agopackaging: Support logger driver for rpi3, rpi4 and tw3 kernels
Karol Lewandowski [Thu, 22 Apr 2021 13:58:39 +0000 (15:58 +0200)]
packaging: Support logger driver for rpi3, rpi4 and tw3 kernels

Change-Id: I41eba922c16b34efe04e7d15896e7fe9ad6012ca

3 years agoMerge branch 'logger-linux-rpi3' into tizen
Karol Lewandowski [Thu, 22 Apr 2021 13:51:37 +0000 (15:51 +0200)]
Merge branch 'logger-linux-rpi3' into tizen

This imports logger driver along with history. It's been obtained from:

  ssh://review.tizen.org:29418/platform/kernel/linux-rpi3

Change-Id: If7ffcb064bd6c8279a0cceb285f1db372aa22907

3 years agologger: introduce struct logger_set_tag
Łukasz Stelmach [Wed, 14 Apr 2021 15:50:51 +0000 (17:50 +0200)]
logger: introduce struct logger_set_tag

Introduce dedicated structure for LOGGER_SET_TAG ioctl,
instead of packing and unpacking arguments by hand.

Change-Id: Ic3399ab37f55ba2b8a9a976f8c9495fc487fe7f3
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
3 years agologger: move logger.h to uapi
Łukasz Stelmach [Fri, 19 Mar 2021 14:20:06 +0000 (15:20 +0100)]
logger: move logger.h to uapi

Move logger.h to uapi so it can be exported for userland
software to use.

Change-Id: I64dca69f3442edc246562485b0b29b43615ae881
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
3 years agologger: return amount of data written to stdio
Łukasz Stelmach [Tue, 13 Apr 2021 10:24:38 +0000 (12:24 +0200)]
logger: return amount of data written to stdio

Return amount of data written by a process to a logger via STDIO
interface.

Change-Id: I9c77a312d09f3d796a7ec64d5909af193bcc8bc2
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: fix temporary buffer handling
Łukasz Stelmach [Fri, 9 Apr 2021 15:20:07 +0000 (17:20 +0200)]
logger: fix temporary buffer handling

Prevent writing beyond temporary buffer and improve accumulation of data
before receiving a newline character or filling the buffer.

Change-Id: I8e0591c90914dbd4c2addde4247157831fa4843a
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: adapt access mode checks
Łukasz Stelmach [Fri, 9 Apr 2021 14:59:56 +0000 (16:59 +0200)]
logger: adapt access mode checks

Allow setting the tag and the priority only for files opened O_WRONLY.

Change-Id: Icc9d7a8eb96f8f1b1aa00717aae1f32f7a2e52e4
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: Fix incorrect buffer access when writing data
Łukasz Stelmach [Thu, 8 Apr 2021 12:09:24 +0000 (14:09 +0200)]
logger: Fix incorrect buffer access when writing data

Fix crash caused by accessing memory beyond log->buffer

Change-Id: I528b62e34e9fb5f92f62f6b218718e15cd5f7d31
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agologger: accept untagged log entries
Łukasz Stelmach [Fri, 12 Feb 2021 17:41:09 +0000 (18:41 +0100)]
logger: accept untagged log entries

Add support for writing untagged log messages to /dev/log_* nodes. The
logger shall accept untagget messages after setting the tag and
the priority with appropriate ioctl() commands for particular file
descriptors.

Change-Id: I02bd7bfd843eaf316692413a48747009c42756f6
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
3 years agostaging: logger: fix build error due to removed ki_nbytes
Inki Dae [Mon, 4 Jul 2016 08:28:46 +0000 (17:28 +0900)]
staging: logger: fix build error due to removed ki_nbytes

This patch fixes build error. Logger driver was removed
from mainline kernel and after that there was some changes and
one of them is that ki_nbytes member was removed from kiocb structure.
66ee59a fs: remove ki_nbytes

This patch makes count member of iov_iter structure to be used instead.

Change-Id: I11e9ebdac7dd86c02fd692a67562a23e5c685f69
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
3 years agostaging: android: logger: fix the compiler error
Jaehoon Chung [Fri, 5 Jan 2018 00:40:02 +0000 (09:40 +0900)]
staging: android: logger: fix the compiler error

Moved signal wakeup & sigpending methods from <linux/sched.h> into
<linux/sched/signal.h>.

Refer to commit 174cd4b1e5fb (sched/headers: Prepare to move signal
wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>

Fix the compiler error about android logger.

Change-Id: Iab1583fe54fef1c76a34673d1d718f73930baa11
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agostaging: android: Correct coding style in logger.c
Guillaume Vercoutere [Mon, 5 Jan 2015 14:24:06 +0000 (15:24 +0100)]
staging: android: Correct coding style in logger.c

Correct intent and missing space

Signed-off-by: Guillaume Vercoutere <gvercoutere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: Fix log corruption regression
Daniel Thompson [Mon, 27 Oct 2014 18:51:43 +0000 (18:51 +0000)]
staging: android: logger: Fix log corruption regression

Since commit cd678fce4280 ("switch logger to ->write_iter()"), any
attempt to write to the log results in the log data being written over
its own metadata, thus rendering the log unreadable.

The problem was first detected when I ran an Android userspace on the
v3.18-rc1 kernel. However the issue can also be observed with a
non-Android userspace by using echo/cat to write to/from /dev/log_main .

This patch resolves the problem by using a temporary to track the status
of not-yet-committed writes to the log buffer.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
3 years agoswitch logger to ->write_iter()
Al Viro [Sat, 23 Aug 2014 16:20:37 +0000 (12:20 -0400)]
switch logger to ->write_iter()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
3 years agostaging: android: fix a possible memory leak
Seunghun Lee [Wed, 13 Aug 2014 17:02:48 +0000 (02:02 +0900)]
staging: android: fix a possible memory leak

Memory allocated by kstrdup should be freed.

CC: Brian Swetland <swetland@google.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: fixed checkpatch.pl warnings.
Jerry Stralko [Tue, 1 Jul 2014 11:13:18 +0000 (07:13 -0400)]
staging: android: logger: fixed checkpatch.pl warnings.

Signed-off-by: Jerry Stralko <gerb.stralko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: fix missing a blank line after declarations
Seunghun Lee [Wed, 30 Apr 2014 16:30:23 +0000 (01:30 +0900)]
staging: android: fix missing a blank line after declarations

This patch fixes "Missing a blank line after declarations" warnings.

Change-Id: I67708f8839f3a6d7ab26782ab2f0e4574325ff65
Signed-off-by: Seunghun Lee <waydi1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
3 years agoaio: Kill aio_rw_vect_retry()
Kent Overstreet [Thu, 9 May 2013 22:03:42 +0000 (15:03 -0700)]
aio: Kill aio_rw_vect_retry()

This code doesn't serve any purpose anymore, since the aio retry
infrastructure has been removed.

This change should be safe because aio_read/write are also used for
synchronous IO, and called from do_sync_read()/do_sync_write() - and
there's no looping done in the sync case (the read and write syscalls).

Change-Id: I29e2981ea74ef69bb7803fb138d8a5f7e58eeb7b
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
3 years agostaging: android: logger: Correct write offset reset on error
Karlis Ogsts [Mon, 22 Jul 2013 20:51:42 +0000 (13:51 -0700)]
staging: android: logger: Correct write offset reset on error

In the situation that a writer fails to copy data from userspace it will reset
the write offset to the value it had before it went to sleep. This discarding
any messages written while aquiring the mutex.

Therefore the reset offset needs to be retrieved after acquiring the mutex.

Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agomore open-coded file_inode() calls
Al Viro [Sun, 16 Jun 2013 13:25:12 +0000 (17:25 +0400)]
more open-coded file_inode() calls

Change-Id: I7dd013afbccd5fd3ec2328829bb1cdbf634d84cf
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
3 years agostaging: android: logger: use kuid_t instead of uid_t
Xiong Zhou [Wed, 8 May 2013 10:52:48 +0000 (18:52 +0800)]
staging: android: logger: use kuid_t instead of uid_t

Use kuid_t instead of uid_t, to pass the UIDGID_STRICT_TYPE_CHECKS.

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agoaio: don't include aio.h in sched.h
Kent Overstreet [Tue, 7 May 2013 23:19:08 +0000 (16:19 -0700)]
aio: don't include aio.h in sched.h

Faster kernel compiles by way of fewer unnecessary includes.

[akpm@linux-foundation.org: fix fallout]
[akpm@linux-foundation.org: fix build]
Signed-off-by: Kent Overstreet <koverstreet@google.com>
Cc: Zach Brown <zab@redhat.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Asai Thambi S P <asamymuthupa@micron.com>
Cc: Selvan Mani <smani@micron.com>
Cc: Sam Bradshaw <sbradshaw@micron.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: Ifc9abc94955466ddd797c107fc05116d50bd72d2

3 years agostaging: android: logger: enforce GID and CAP check on log flush
Charndeep Grewal [Wed, 27 Feb 2013 06:07:38 +0000 (22:07 -0800)]
staging: android: logger: enforce GID and CAP check on log flush

Restrict log flushing to those in the logs group, or
anyone with CAP_SYSLOG.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Charndeep Grewal <csgrewa@tycho.ncsc.mil>
Signed-off-by: Charndeep Grewal <csgrewa@tycho.ncsc.mil>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: Allow a UID to read it's own log entries
Nick Kralevich [Wed, 27 Feb 2013 06:07:37 +0000 (22:07 -0800)]
staging: android: logger: Allow a UID to read it's own log entries

Modify the kernel logger to record the UID associated with
the log entries. Always allow the same UID which generated a
log message to read the log message.

Allow anyone in the logs group, or anyone with CAP_SYSLOG, to
read all log entries.

In addition, allow the client to upgrade log formats, so they
can get additional information from the kernel.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Nick Kralevich <nnk@google.com>
Signed-off-by: Nick Kralevich <nnk@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger.h: Complete documentation of logger_entry
Cruz Julian Bishop [Wed, 1 Aug 2012 04:54:17 +0000 (14:54 +1000)]
staging: android: logger.h: Complete documentation of logger_entry

Previously, there were simply comments after each part - Now, it is
completed properly according to "Kernel doc" Sorry in advance if I made
any mistakes.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agoStaging: Android: logger: module_exit implementation
Luca Clementi [Thu, 22 Nov 2012 03:43:17 +0000 (19:43 -0800)]
Staging: Android: logger: module_exit implementation

This patch creates the module_exit for the android logger
so that it can be loaded and unloaded as a module.

The android logger is already declared as a tristate in the
Kconfig but the module_exit function was missing.

device_initcall works also with modprobe since include/linux/init.h:

 #define module_init(x)  __initcall(x);
 ...
 #define __initcall(fn) device_initcall(fn)

Tested against f4a75d2eb7b1e2206094b901be09adb31ba63681 Linux 3.7-rc6

Signed-off-by: Luca Clementi <luca.clementi@gmail.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Robert Love <rlove@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: Finish documentation of two structs
Cruz Julian Bishop [Wed, 1 Aug 2012 04:54:18 +0000 (14:54 +1000)]
staging: android: logger: Finish documentation of two structs

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: Android: Fix some checkpatch warnings
Sachin Kamat [Tue, 5 Jun 2012 11:10:10 +0000 (16:40 +0530)]
staging: Android: Fix some checkpatch warnings

Warnings reported by checkpatch.pl have been fixed.

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: I5e611019438fe798ff1eef2bd25412dc4a764124

3 years agostaging: android: logger: Fix some sparse and whitespace issues
Tim Bird [Thu, 10 May 2012 21:22:59 +0000 (14:22 -0700)]
staging: android: logger: Fix some sparse and whitespace issues

Fix a few sparse warnings, and improve whitespace.

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: Allocate logs dynamically at boot (v3)
Tim Bird [Thu, 10 May 2012 22:11:36 +0000 (15:11 -0700)]
staging: android: logger: Allocate logs dynamically at boot (v3)

This changes the log initialization to be dynamic, but still
at boot time.  These changes are a predecessor to implementing
runtime allocation and freeing of logs, to make the Android logger
less hard-coded.

Change from a fixed set of static log structures, to allocation
at init time into a list.  Return proper error numbers on log
allocation failure.

Cc: Brian Swetland <swetland@google.com>
Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: logger: hold mutex while removing reader
Rabin Vincent [Wed, 22 Feb 2012 10:28:00 +0000 (15:58 +0530)]
staging: logger: hold mutex while removing reader

The readers list is traversed under the log->mutex lock
(for example from fix_up_readers()), but the deletion of
elements from this list is not being done under this lock.

Cc: Brian Swetland <swetland@google.com>
Cc: Dima Zavin <dima@android.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: clarify non-update of w_off in do_write_log_from_user
Tim Bird [Wed, 8 Feb 2012 02:34:28 +0000 (18:34 -0800)]
staging: android: logger: clarify non-update of w_off in do_write_log_from_user

Add comment to explain when w_off is not updated in case of failed second
fragment copy to buffer.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: clarify code in clock_interval
Tim Bird [Wed, 8 Feb 2012 02:32:02 +0000 (18:32 -0800)]
staging: android: logger: clarify code in clock_interval

Add commentary, rename the function and make the code easier to read.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: reorder prepare_to_wait and mutex_lock
Tim Bird [Wed, 8 Feb 2012 02:30:09 +0000 (18:30 -0800)]
staging: android: logger: reorder prepare_to_wait and mutex_lock

If mutex_lock waits, it will return in state TASK_RUNNING,
rubbing out the effect of prepare_to_wait().

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: simplify and optimize get_entry_len
Tim Bird [Wed, 8 Feb 2012 18:37:57 +0000 (10:37 -0800)]
staging: android: logger: simplify and optimize get_entry_len

Make this code slightly easier to read, and eliminate calls
to sub-routines.  Some of these were previously optimized away
by the compiler, but one memcpy was not.

In my testing, this makes the code about 20% smaller, and
has no sub-routine calls and no branches (on ARM).

v2 of this patch is, IMHO, easier to read than v1. Compared to
that patch it uses __u8 instead of unsigned char, for
consistency with the __u16 val data type, simplifies the
conditional expression, adds a another comment, and
moves a common statement out of the if.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agostaging: android: logger: Change logger_offset() from macro to function
Tim Bird [Wed, 8 Feb 2012 02:26:38 +0000 (18:26 -0800)]
staging: android: logger: Change logger_offset() from macro to function

Convert to function and add log as a parameter, rather than relying
on log in the context of the macro.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 years agoStaging: android: fixed white spaces coding style issue in logger.c
Marco Navarra [Thu, 15 Dec 2011 16:57:48 +0000 (17:57 +0100)]
Staging: android: fixed white spaces coding style issue in logger.c

This patch fixes some space-before-tabs warnings found by checkpatch tool on the staging android driver file logger.c

Signed-off-by: Marco Navarra <fromenglish@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3 years agoandroid: logger: bump up the logger buffer sizes
JP Abgrall [Fri, 12 Aug 2011 04:33:35 +0000 (21:33 -0700)]
android: logger: bump up the logger buffer sizes

(port from common android-2.6.39
  commit: 11430f16545205c614dd5bd58e4a7ee630fc0f9f)

events: (no change, 256)
main: 64 -> 256
radio: 64 -> 256
system: 64 -> 256

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3 years agoandroid: logger: Add new system log for framework/system log messages
San Mehat [Wed, 24 Feb 2010 00:09:47 +0000 (16:09 -0800)]
android: logger: Add new system log for framework/system log messages

Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3 years agoandroid-common: Fix slab.h includes for 2.6.34-rc4
Colin Cross [Thu, 15 Apr 2010 22:21:51 +0000 (15:21 -0700)]
android-common: Fix slab.h includes for 2.6.34-rc4

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: I70de900e1619bacf3b30786969c7b5b124ed8b2d

3 years agostaging/android: fix build issues
Corentin Chary [Sat, 28 Nov 2009 08:45:14 +0000 (09:45 +0100)]
staging/android: fix build issues

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: I3ed871c7853a409bd40d16ba6ba7a33283e6c2be

3 years agoStaging: android: logger: fix up remaining checkpatch warnings
Greg Kroah-Hartman [Tue, 12 May 2009 00:00:41 +0000 (17:00 -0700)]
Staging: android: logger: fix up remaining checkpatch warnings

This cleans up the last of the checkpatch warnings in the android logger
driver.

Cc: San Mehat <san@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3 years agoStaging: android: add logging driver
Robert Love [Sat, 20 Dec 2008 02:02:58 +0000 (18:02 -0800)]
Staging: android: add logging driver

Signed-off-by: Robert Love <rlove@google.com>
Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[ Pick only changes in logger.[ch] while moving code out of tree ]
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Change-Id: I8faa961fe84d9a88bade728746a0e396f13037a7

3 years agoInitial empty repository
Tizen Infrastructure [Mon, 12 Apr 2021 02:24:46 +0000 (02:24 +0000)]
Initial empty repository

3 years agoSupport Linux kernel v5.10
Seung-Woo Kim [Fri, 19 Feb 2021 05:43:43 +0000 (14:43 +0900)]
Support Linux kernel v5.10

To support LTS Kernel version v5.10, fix parameter for
proc_create().

Change-Id: Ie6c94fdc31000455aae5d7648f7a393cb791e89b
Ref: v5.6 commit d56c0d45f0e2 ("proc: decouple proc from VFS with "struct proc_ops"")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoMakefile: support cross compile
Seung-Woo Kim [Fri, 15 Jan 2021 03:05:07 +0000 (12:05 +0900)]
Makefile: support cross compile

For local build, support cross compile.

Change-Id: I04c850e246e12b6816da25743ac2e2274adbe1af
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoRelease 6.4.0
Konrad Kuchciak [Fri, 18 Dec 2020 09:28:57 +0000 (10:28 +0100)]
Release 6.4.0

Change-Id: I61a1b7b4f93d656ad209da4aff31d6d7f32fe85e
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
3 years agoSupport Linux kernel earilier version than v4.9
Seung-Woo Kim [Tue, 15 Dec 2020 10:43:51 +0000 (19:43 +0900)]
Support Linux kernel earilier version than v4.9

From Linux kernel v4.9, seq_put_decimal_ll() changes its delimiter
argument to const char * instead of char. Support older version.

Change-Id: I1e6b74aad5b536cd6aade0b8f1b74613e20309b8
Ref: v4.9 commit 75ba1d07fd6a ("seq/proc: modify seq_put_decimal_[u]ll to take a const char *, not char")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoSupport Linux kernel earilier version than v4.11
Seung-Woo Kim [Fri, 11 Dec 2020 04:21:38 +0000 (13:21 +0900)]
Support Linux kernel earilier version than v4.11

From Linux kernel 4.11, sched header is splited and cputime_t is
fixed as u64. Before the kernel version, do not use splitter
headers and use cputime_t for task_cputime_adjusted().

Change-Id: Iac5d4e1d89366c54a59cc3092afd56f2df01918b
Ref: v4.11 commit 1050b27c52f6 ("sched/headers: Move cputime functionality from <linux/sched.h> and <linux/cputime.h> into <linux/sched/cputime.h>")
Ref: v4.11 commit c3edc4010e9d ("sched/headers: Move task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h>")
Ref: v4.11 commit 5613fda9a503 ("sched/cputime: Convert task/group cputime to nsecs")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoSupport linux kernel earlier than 4.17 for security_cred_getsecid()
Seung-Woo Kim [Tue, 15 Dec 2020 06:49:50 +0000 (15:49 +0900)]
Support linux kernel earlier than 4.17 for security_cred_getsecid()

Earlier than Linux v4.17, there was no security_cred_getsecid()
and it is used to get secid for task. For the earlier kernel, use
security_task_getsecid() instead.

Change-Id: I7a6284adf4f316efb124a5659a1458adc0b85d1f
Ref: v4.17 commit 3ec30113264a ("security: Add a cred_getsecid hook")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
3 years agoReport task io only when CONFIG_TASK_IO_ACCOUNTING is enabled
Seung-Woo Kim [Tue, 15 Dec 2020 05:59:47 +0000 (14:59 +0900)]
Report task io only when CONFIG_TASK_IO_ACCOUNTING is enabled

If kernel does not have CONFIG_TASK_IO_ACCOUNTING, then it is not
possbile to support task io usage. Reporting task io only when
kernel has CONFIG_TASK_IO_ACCOUNTING, otherwise just report 0.

Change-Id: I9b55c9bb85ae3b8900c04564481de7cef249289b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoRelease 6.3.1
Konrad Kuchciak [Fri, 3 Jul 2020 10:05:36 +0000 (12:05 +0200)]
Release 6.3.1

Change-Id: I0312e33d9d31af85816ecab1d0f3719449ce376d

4 years agoSupport Linux kernel v5.4
Seung-Woo Kim [Wed, 1 Jul 2020 02:05:44 +0000 (11:05 +0900)]
Support Linux kernel v5.4

To support rpi4 kernel based on Linux kernel v5.4, add wrapper for
changed function name.

With the Linux mainline commit 9285ec4c8b61 ("timekeeping: Use
proper clock specifier names in functions") in v5.3, function
ktime_get_boot_ns() is changed to ktime_get_boottime_ns().

Change-Id: I80e00592adea9e888daaef035f2332e5e7528eef
Ref: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9285ec4c8b61d4930a575081abeba2cd4f449a74
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoAdd Arch Limitation for armv7l and aarch64
Kunhoon Baik [Tue, 16 Jun 2020 03:18:35 +0000 (12:18 +0900)]
Add Arch Limitation for armv7l and aarch64

Change-Id: Ia66330800bf7b922e024ed5afae33743b004073a

4 years agoEnable 64bit
Kunhoon Baik [Tue, 16 Jun 2020 02:04:31 +0000 (11:04 +0900)]
Enable 64bit

Tizen will support 64 bit binary officially.

Now, Kernel also support 64bit kernel headers
(Related patches)
 - https://review.tizen.org/gerrit/#/c/platform/kernel/linux-rpi/+/235603/
 - https://review.tizen.org/gerrit/#/c/platform/kernel/linux-rpi/+/235563/
 - https://review.tizen.org/gerrit/#/c/platform/kernel/linux-rpi/+/235998/
            :

According to the support, this patch supports stability monitor 64 bit kernel driver.

Change-Id: Ie15a455a1eaf82579a69cce9106b324401d3cc69

4 years agopackaging: add to build with rpi4 kernel
Seung-Woo Kim [Mon, 30 Mar 2020 06:16:08 +0000 (15:16 +0900)]
packaging: add to build with rpi4 kernel

In tizen, rpi platform image supports both rpi3 and rpi4. So add
to build with rpi4 kernel to support rpi4 kernel.

Additionaly, provide stability-monitor-kernel-module
virtual package instead of bare kernel file.

Change-Id: I708213069744b0f405676b2705b584acfaca0ec1
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
4 years agoFix to use kernel module with kernel release version
Seung-Woo Kim [Mon, 30 Mar 2020 06:11:34 +0000 (15:11 +0900)]
Fix to use kernel module with kernel release version

Kernel module has its own kernel release version and at runtime.
`uname -r` will report the version. Fix to use kernel module with
the kernel release version.

Change-Id: Ifd26c29ce84591a9e9ba46a7d64361a3e20e4824
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
4 years agobuild: add modules_install
Seung-Woo Kim [Mon, 30 Mar 2020 05:02:54 +0000 (14:02 +0900)]
build: add modules_install

To install kernel modules with its release version path, add build
for modules_install.

Change-Id: Idcb945be287e43eb2f66cefa06849b6e352115a9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
4 years agopackaging: add clean
Seung-Woo Kim [Mon, 30 Mar 2020 06:05:38 +0000 (15:05 +0900)]
packaging: add clean

Change-Id: Iac95f38ed76f92da7bb55ef9d3f98d6cd457c218
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
4 years agoRelease 6.0.1
Konrad Kuchciak [Tue, 18 Feb 2020 08:04:13 +0000 (09:04 +0100)]
Release 6.0.1

Change-Id: I2725d40965b7ba493f960293d39b04cd0a048873

4 years agoAdvance to Digital Age
Michal Bloch [Mon, 17 Feb 2020 10:23:25 +0000 (11:23 +0100)]
Advance to Digital Age

The FSF address used in the license boilerplate text is no longer
correct since their offices have relocated. Rather than introduce
the new mailing address which will inevitably change again in the
future, use the website address which is more permanent.

The main COPYING document still has the old address, but I am afraid
to change it because that one doubles as a legal document.

Change-Id: I86c6d6978d2a633fda8d21398b23b6d76b0daf54
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoAdd blacklist parameter
Konrad Kuchciak [Fri, 14 Feb 2020 12:30:08 +0000 (13:30 +0100)]
Add blacklist parameter

Blacklist parameter allows to filter out processes
with the specified SMACK label. Up to 10 comma separated
labels may be specified.

Change-Id: Ifba07c610d02b6214086ab666caac0fa5eb2b019

4 years agoFix license comment
Konrad Kuchciak [Fri, 6 Dec 2019 11:09:29 +0000 (12:09 +0100)]
Fix license comment

Change-Id: I857df1652046fbaef26e959cbd2dd28ffc4834a5

4 years agoRelease 5.5.1
Konrad Kuchciak [Wed, 27 Nov 2019 07:13:38 +0000 (08:13 +0100)]
Release 5.5.1

Change-Id: Id68765fc7b948707170e83f2f51ed874087a90d4

4 years agoFix License Issue
Kunhoon Baik [Wed, 27 Nov 2019 06:09:21 +0000 (15:09 +0900)]
Fix License Issue

This git contains the kernel driver for stability monitor for RPI3 device.
The driver's license is GPL-2.0+ not Apache

Change-Id: I2bd1d2ab129269d0d4e2f0f29c68a2b2668e6758

5 years agoExplicitly provide proc-tsm.ko
Konrad Kuchciak [Wed, 18 Sep 2019 08:00:28 +0000 (10:00 +0200)]
Explicitly provide proc-tsm.ko

Change-Id: I03b66f7b4979d62597433299392dbbfc767f856f

5 years agoAdd manifest
Konrad Kuchciak [Wed, 18 Sep 2019 07:59:10 +0000 (09:59 +0200)]
Add manifest

Change-Id: Ia245f285b203fce4da749fc5d0d2ee6f3465d663

5 years agoAdd kernel module sources from stability-monitor
Konrad Kuchciak [Mon, 9 Sep 2019 10:07:52 +0000 (12:07 +0200)]
Add kernel module sources from stability-monitor

Change-Id: I5f377a6210996c2a4a3840f32d10337ffef55ae1