aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/android/logger.c
AgeCommit message (Collapse)Author
2013-05-16staging: android: logger: use kuid_t instead of uid_tXiong Zhou
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>
2013-05-07aio: don't include aio.h in sched.hKent Overstreet
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>
2013-03-05staging: android: logger: enforce GID and CAP check on log flushCharndeep Grewal
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>
2013-03-05staging: android: logger: Allow a UID to read it's own log entriesNick Kralevich
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>
2012-11-26Staging: Android: logger: module_exit implementationLuca Clementi
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>
2012-08-13staging: android: logger: Finish documentation of two structsCruz Julian Bishop
Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12staging: Android: Fix some checkpatch warningsSachin Kamat
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>
2012-05-10staging: android: logger: Fix some sparse and whitespace issuesTim Bird
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>
2012-05-10staging: android: logger: Allocate logs dynamically at boot (v3)Tim Bird
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>
2012-02-24staging: logger: hold mutex while removing readerRabin Vincent
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>
2012-02-08staging: android: logger: clarify non-update of w_off in do_write_log_from_userTim Bird
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>
2012-02-08staging: android: logger: clarify code in clock_intervalTim Bird
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>
2012-02-08staging: android: logger: reorder prepare_to_wait and mutex_lockTim Bird
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>
2012-02-08staging: android: logger: simplify and optimize get_entry_lenTim Bird
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>
2012-02-08staging: android: logger: Change logger_offset() from macro to functionTim Bird
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>
2011-12-16Staging: android: fixed white spaces coding style issue in logger.cMarco Navarra
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>
2011-11-30android: logger: bump up the logger buffer sizesJP Abgrall
(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>
2011-11-30android: logger: Add new system log for framework/system log messagesSan Mehat
Signed-off-by: San Mehat <san@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30android-common: Fix slab.h includes for 2.6.34-rc4Colin Cross
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30staging/android: fix build issuesCorentin Chary
Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30Revert "Staging: android: delete android drivers"Greg Kroah-Hartman
This reverts commit b0a0ccfad85b3657fe999805df65f5cfe634ab8a. Turns out I was wrong, we want these in the tree. Note, I've disabled the drivers from the build at the moment, so other patches can be applied to fix some build issues due to internal api changes since the code was removed from the tree. Cc: Arve Hjønnevåg <arve@android.com> Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: android: delete android driversGreg Kroah-Hartman
These drivers are no longer being developed and the original authors seem to have abandonded them and hence, do not want them in the mainline kernel tree. So sad :( Cc: Brian Swetland <swetland@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19Staging: android: logger: fix up remaining checkpatch warningsGreg Kroah-Hartman
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>
2009-01-06Staging: android: add logging driverRobert Love
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>