Łukasz Stelmach [Tue, 18 Jan 2022 19:45:12 +0000 (20:45 +0100)]
kdbus: Replace strcpy() with strncpy()
Change-Id: Ie59bae03c5573e6a640998a6ae39f0753a98be95
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Tue, 18 Jan 2022 14:25:31 +0000 (15:25 +0100)]
kdbus: Replace strcat() with strncat()
Change-Id: Ie8c68c7a48bcb359a2c8e649a96f7d538ed26ad8
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Fri, 21 Jan 2022 13:02:56 +0000 (14:02 +0100)]
logger: make variable names match
Change-Id: Ibe70c2c0cba0a722259bae4cbe40dd865ac63448
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Thu, 20 Jan 2022 14:43:55 +0000 (15:43 +0100)]
logger: configure log buffer sizes
Add module parameters main_buffer_size, events_buffer_size,
radio_buffer_size and system_buffer_size to configure respective buffer
sizes. If a parameter is set to zero respective buffer is not created
whatsoever.
Change-Id: Ibaf5fe152837ded0f31f924e81ea112d9d03b63e
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 19 Jan 2022 13:39:20 +0000 (14:39 +0100)]
logger: configure buffer size separately
Add separate configuration for each buffer size.
Change-Id: If7134868996a20a8fd81a6bbfbe101bad6d21824
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Mon, 17 Jan 2022 20:58:58 +0000 (21:58 +0100)]
logger: make buffer size configurable during compilation
Change-Id: I5c50b4281cb1790248a39821c76f3ee874c76851
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Mateusz Majewski [Tue, 18 Jan 2022 10:45:59 +0000 (11:45 +0100)]
logger: fix RPi4 timestamp issue
Change-Id: Iaceffde5c5fb566a1481c2c8b48776e60057d811
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
Łukasz Stelmach [Mon, 10 Jan 2022 21:15:35 +0000 (22:15 +0100)]
Import and build logger test
Change-Id: Ibe00dad3ebd319875748c682a614fd517ebc8a4c
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Tue, 4 Jan 2022 18:27:38 +0000 (19:27 +0100)]
Build and package kdbus tests
Change-Id: I797e79acf31e4e2e88f71430d7d570069850e819
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Mateusz Majewski [Mon, 6 Dec 2021 10:27:27 +0000 (11:27 +0100)]
Import kdbus test
Change-Id: I02d685dbb73055daebd5bed9640937ac05e33e35
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 12 Jan 2022 20:42:41 +0000 (21:42 +0100)]
Rename the headers package
Rename the output rpm containing logger.h and kdbus.h from
linux-tizen-modules-source-headers to linux-tizen-modules-headers since
the output rpm contains only headers and no other source code.
Change-Id: I9d471a074e48bdaaa382c06e935e0c4551516511
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 5 Jan 2022 14:39:32 +0000 (15:39 +0100)]
Move and export uapi headers
Move logger.h and kdbus.h uapi headers to a separate directory
and export them to /usr/include/linux and
/usr/src/linux-tizen-modules-source.
Change-Id: Ie3fd39f44baf33552cc742f0c13228b1e87b9333
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Karol Lewandowski [Wed, 5 Jan 2022 13:18:10 +0000 (14:18 +0100)]
Release 7.0.4
This release adjusts logger.ko to be able to work with older (<3.18)
kernels.
Change-Id: I8230de61a67096b0dcadbe12fc5d34f68112b93e
Łukasz Stelmach [Thu, 16 Dec 2021 19:03:53 +0000 (20:03 +0100)]
Replace copy_from_iter() with copy_from_user()
iov_iter structure and associated function have been introduced in
v3.18. Logger needs use copy_from_user() and iterate over IO vectores
manualy.
Change-Id: Ifa46c67da65195611adc50b1dc6f0be66daac517
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 15 Dec 2021 23:32:13 +0000 (00:32 +0100)]
Import stdio handling code to logger_aio_write()
Copy the stdio handling code from logger_write_iter()
Change-Id: I94be88c5db2e7482106ddd537d763726a89aad5a
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 15 Dec 2021 23:28:34 +0000 (00:28 +0100)]
Discard data from stdio
Accept and discard unstructured data coming from stdio.
This commit is mainly to make the later changes more readable.
Change-Id: I0428eef0b3f9517e14b8de282003436e5296b66d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 15 Dec 2021 23:16:00 +0000 (00:16 +0100)]
Import old logger_aio_write()
Copy logger_aio_write() and two other functions from Android logger
driver in v3.10.65. Use them when compiling against old kernels.
Change-Id: I1e2cb304106e48ffad80f03dc7c9ae899cd228f4
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Karol Lewandowski [Tue, 4 Jan 2022 10:29:09 +0000 (11:29 +0100)]
kdbus: domain: drop overwritten assignment
Change-Id: Idf43dadcbee8156b1099f30dfd8ebc40c7c5bb45
Mateusz Majewski [Fri, 31 Dec 2021 09:19:43 +0000 (10:19 +0100)]
packaging: generate headers package
Change-Id: Icfd89649aeb8d723a7f70499cad16d361b83ee68
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
Mateusz Majewski [Thu, 30 Dec 2021 09:43:47 +0000 (10:43 +0100)]
kdbus: use kdbus.h header from this repository
… as opposed to the header from the kernel headers package.
Change-Id: I25c86328cc16aba1099214802acb661291e31258
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
Karol Lewandowski [Fri, 3 Dec 2021 17:55:17 +0000 (18:55 +0100)]
Bump version due to kdbus inclusion
Other packages wanting kdbus might depend on particular version.
Change-Id: Iab701418f25314b5035d8ece0bfd95159b5daba6
Mateusz Majewski [Tue, 30 Nov 2021 07:35:51 +0000 (08:35 +0100)]
Import kdbus
For the record, these files come from the
git://git.tizen.org/platform/kernel/linux-rpi.git repository, from the
be5781a07d48f8fd62633310fea57963aea1595d commit.
Change-Id: Ia3be026cf4a97fce32bbc98dc4151d75d670b186
Co-authored-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
Karol Lewandowski [Fri, 26 Nov 2021 09:35:56 +0000 (10:35 +0100)]
Keep only source package
This commit drops all public-tizen customizations and keep only source
package generation.
Public Tizen linux-tizen-modules will use this package to build code
and will add its specific configuration.
Change-Id: I633f869530d6b0a34c27ff4d0d137bc7eaac262f
Karol Lewandowski [Thu, 25 Nov 2021 11:35:51 +0000 (12:35 +0100)]
Add ability to not build all modules
This is going to be used by clients of -source package.
Change-Id: Ieb7be8aa0a169951356b554947a9ab978346346e
Karol Lewandowski [Wed, 24 Nov 2021 15:15:36 +0000 (16:15 +0100)]
Add separate spec to build source package
Change-Id: I1e7850b6b7d959f9b36a85fceca11d5f0825971f
Łukasz Stelmach [Fri, 10 Sep 2021 18:02:53 +0000 (20:02 +0200)]
logger: handle error values from filp_open()
filp_open() may return -errno, so check for that instead of checking
for NULL.
Change-Id: I5a694555bcd082506330e08f48ed4b7043c4e120
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Łukasz Stelmach [Wed, 15 Sep 2021 12:54:18 +0000 (14:54 +0200)]
logger: flush data from stdio writers under mutex
Operations during flushing logs delivered via stdio need to be performed
with the mutex held.
Change-Id: I4655b0af75172f8f22b797c0caadd28cb4619cf0
Suggested-by: Mateusz Majewski <m.majewski2@samsung.com>
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Mateusz Majewski [Tue, 13 Jul 2021 09:47:15 +0000 (11:47 +0200)]
logger: flush remaining data from stdio writers on file release
Unlike logs from regular writers, logs from stdio writers are not
contained in a single write_iter call: if the last character written in
the call is not a newline, some of the input remains in the buffer for
the next write_iter call. This means that some data might remain in the
buffer during release, and such data has to be flushed; otherwise, it
would be lost.
Change-Id: I13c9dc020967fe8ef3fbcd52d45f85b8725d3c2c
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
Mateusz Majewski [Tue, 13 Jul 2021 09:47:04 +0000 (11:47 +0200)]
logger: handle '\0's correctly in stdout writers
This commit takes care of cases when input received from stdout writers
contains '\0' characters. They should be treated like newlines. We
achieve this by simply replacing them by '\n's while searching for the
last '\n' in the input.
Change-Id: I51c23457f96bd6f0465d60da06157316756cc951
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
INSUN PYO [Fri, 9 Jul 2021 03:24:14 +0000 (12:24 +0900)]
Separate configuration files for each target
Change-Id: Iaed004d48d4d0fad16d396ce95b26e37edb66ffb
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
INSUN PYO [Fri, 25 Jun 2021 04:38:56 +0000 (13:38 +0900)]
logger: enable logger module
Change-Id: If186dc62a39a360b42b99cea0f8e4c29940c71db
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
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>
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>
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
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
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
Ł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>
Ł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>
Ł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>
Ł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>
Ł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>
Ł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>
Ł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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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
Tizen Infrastructure [Mon, 12 Apr 2021 02:24:46 +0000 (02:24 +0000)]
Initial empty repository
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>
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>
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>
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>
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>
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>
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>
Konrad Kuchciak [Fri, 3 Jul 2020 10:05:36 +0000 (12:05 +0200)]
Release 6.3.1
Change-Id: I0312e33d9d31af85816ecab1d0f3719449ce376d
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>
Kunhoon Baik [Tue, 16 Jun 2020 03:18:35 +0000 (12:18 +0900)]
Add Arch Limitation for armv7l and aarch64
Change-Id: Ia66330800bf7b922e024ed5afae33743b004073a
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
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>
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>
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>
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>
Konrad Kuchciak [Tue, 18 Feb 2020 08:04:13 +0000 (09:04 +0100)]
Release 6.0.1
Change-Id: I2725d40965b7ba493f960293d39b04cd0a048873
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>
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
Konrad Kuchciak [Fri, 6 Dec 2019 11:09:29 +0000 (12:09 +0100)]
Fix license comment
Change-Id: I857df1652046fbaef26e959cbd2dd28ffc4834a5
Konrad Kuchciak [Wed, 27 Nov 2019 07:13:38 +0000 (08:13 +0100)]
Release 5.5.1
Change-Id: Id68765fc7b948707170e83f2f51ed874087a90d4