- 20 8月, 2013 8 次提交
-
-
由 Aruna Balakrishnaiah 提交于
In pstore write, add character 'C'(compressed) or 'D'(decompressed) in the header while writing to Ram persistent buffer. In pstore read, read the header and update the 'compressed' flag accordingly. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Aruna Balakrishnaiah 提交于
In case decompression fails, add a ".enc.z" to indicate the file has compressed data. This will help user space utilities to figure out the file contents. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Aruna Balakrishnaiah 提交于
Based on the flag 'compressed' set or not, pstore will decompress the data returning a plain text file. If decompression fails for a particular record it will have the compressed data in the file which can be decompressed with 'openssl' command line tool. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Aruna Balakrishnaiah 提交于
Backends will set the flag 'compressed' after reading the log from persistent store to indicate the data being returned to pstore is compressed or not. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Aruna Balakrishnaiah 提交于
Add compression support to pstore which will help in capturing more data. Initially, pstore will make a call to kmsg_dump with a bigger buffer and will pass the size of bigger buffer to kmsg_dump and then compress the data to registered buffer of registered size. In case compression fails, pstore will capture the uncompressed data by making a call again to kmsg_dump with registered_buffer of registered size. Pstore will indicate the data is compressed or not with a flag in the write callback. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Aruna Balakrishnaiah 提交于
Pstore will make use of deflate and inflate algorithm to compress and decompress the data. So when Pstore is enabled select zlib_deflate and zlib_inflate. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Aruna Balakrishnaiah 提交于
Addition of new argument 'compressed' in the write call back will help the backend to know if the data passed from pstore is compressed or not (In case where compression fails.). If compressed, the backend can add a tag indicating the data is compressed while writing to persistent store. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Dan Carpenter 提交于
d_alloc_name() returns NULL on error. Also I changed the error code from -ENOSPC to -ENOMEM to reflect that we were short on RAM not disk space. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 02 7月, 2013 1 次提交
-
-
由 Aruna Balakrishnaiah 提交于
Incorporate the addition of hsize argument in write_buf callback of pstore. This was forgotten in 6bbbca73 pstore: Pass header size in the pstore write callback Causing a build failure when ftrace and pstore are enabled. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 01 7月, 2013 1 次提交
-
-
由 Aruna Balakrishnaiah 提交于
Header size is needed to distinguish between header and the dump data. Incorporate the addition of new argument (hsize) in the pstore write callback. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 29 6月, 2013 1 次提交
-
-
由 Lenny Szubowicz 提交于
This is patch 1/3 of a patch set that avoids what misleadingly appears to be a error during boot: ERST: Could not register with persistent store This message is displayed if the system has a valid ACPI ERST table and the pstore.backend kernel parameter has been used to disable use of ERST by pstore. But this same message is used for errors that preclude registration. As part of fixing this, return a unique error status from pstore_register if the pstore.backend kernel parameter selects a specific facility other than the requesting facility and check for this condition before any others. This allows the caller to distinquish this benign case from the other failure cases. Also, print an informational console message about which facility successfully registered as the pstore backend. Since there are various kernel parameters, config build options, and boot-time errors that can influence which facility registers with pstore, it's useful to have a positive indication. Signed-off-by: NLenny Szubowicz <lszubowi@redhat.com> Reported-by: NNaotaka Hamaguchi <n.hamaguchi@jp.fujitsu.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 26 6月, 2013 1 次提交
-
-
由 Aruna Balakrishnaiah 提交于
pstore_erase is used to erase the record from the persistent store. So if a driver has not defined pstore_erase callback return -EPERM instead of unlinking a file as deleting the file without erasing its record in persistent store will give a wrong impression to customers. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 20 6月, 2013 3 次提交
-
-
由 Aruna Balakrishnaiah 提交于
This patch exploits pstore subsystem to read details of common partition in NVRAM to a separate file in /dev/pstore. For instance, common partition details will be stored in a file named [common-nvram-6]. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NJim Keniston <jkenisto@us.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Aruna Balakrishnaiah 提交于
This patch set exploits the pstore subsystem to read details of of-config partition in NVRAM to a separate file in /dev/pstore. For instance, of-config partition details will be stored in a file named [of-nvram-5]. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NJim Keniston <jkenisto@us.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
由 Aruna Balakrishnaiah 提交于
This patch set exploits the pstore subsystem to read details of rtas partition in NVRAM to a separate file in /dev/pstore. For instance, rtas details will be stored in a file named [rtas-nvram-4]. Signed-off-by: NAruna Balakrishnaiah <aruna@linux.vnet.ibm.com> Reviewed-by: NJim Keniston <jkenisto@us.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 15 6月, 2013 2 次提交
-
-
由 Rob Herring 提交于
There doesn't appear to be any reason for the overall pstore RAM buffer to be a power of 2 size, so remove it. The individual console, ftrace and oops buffers are still a power of 2 size. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NAnton Vorontsov <anton@enomsg.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Rob Herring 提交于
For persistent RAM outside of main memory, the memory may have limitations on supported accesses. For internal RAM on highbank platform exclusive accesses are not supported and will hang the system. So atomic_cmpxchg cannot be used. This commit uses spinlock protection for buffer size and start updates on ioremapped regions instead. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NAnton Vorontsov <anton@enomsg.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 09 5月, 2013 1 次提交
-
-
由 Wei Yongjun 提交于
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 04 4月, 2013 3 次提交
-
-
由 Arve Hjønnevåg 提交于
This was lost when proc/last_kmsg moved to pstore/console-ramoops. Signed-off-by: NArve Hjønnevåg <arve@android.com> Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
-
由 Arve Hjønnevåg 提交于
Allow specifying ecc parameters in platform data Signed-off-by: NArve Hjønnevåg <arve@android.com> [jstultz: Tweaked commit subject & add commit message] Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
-
由 Arve Hjønnevåg 提交于
Wastes less memory and allows using more memory for ecc than data. Signed-off-by: NArve Hjønnevåg <arve@android.com> [jstultz: Tweaked commit subject] Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
-
- 19 3月, 2013 1 次提交
-
-
由 Alexandru Gheorghiu 提交于
Replaced calls to kmalloc and memcpy with a single call to kmemdup. This patch was found using coccicheck. Signed-off-by: NAlexandru Gheorghiu <gheorghiuandru@gmail.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton@enomsg.org>
-
- 12 3月, 2013 1 次提交
-
-
由 Alexandru Gheorghiu 提交于
Replaced calls to kmalloc and memcpy with a single call to kmemdup. This patch was found using coccicheck. Signed-off-by: NAlexandru Gheorghiu <gheorghiuandru@gmail.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 13 2月, 2013 1 次提交
-
-
由 Josh Boyer 提交于
Using /dev/pstore as a mount point for the pstore filesystem is slightly awkward. We don't normally mount filesystems in /dev/ and the /dev/pstore file isn't created automatically by anything. While this method will still work, we can create a persistent mount point in sysfs. This will put pstore on par with things like cgroups and efivarfs. Signed-off-by: NJosh Boyer <jwboyer@redhat.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 16 1月, 2013 1 次提交
-
-
由 Kees Cook 提交于
The pstore RAM backend can get called during resume, and must be defensive against a suspended time source. Expose getnstimeofday logic that returns an error instead of a WARN. This can be detected and the timestamp can be zeroed out. Reported-by: NDoug Anderson <dianders@chromium.org> Cc: John Stultz <johnstul@us.ibm.com> Cc: Anton Vorontsov <anton.vorontsov@linaro.org> Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
-
- 12 1月, 2013 1 次提交
-
-
由 Seiji Aguchi 提交于
[Issue] When pstore is in panic and emergency-restart paths, it may be blocked in those paths because it simply takes spin_lock. This is an example scenario which pstore may hang up in a panic path: - cpuA grabs psinfo->buf_lock - cpuB panics and calls smp_send_stop - smp_send_stop sends IRQ to cpuA - after 1 second, cpuB gives up on cpuA and sends an NMI instead - cpuA is now in an NMI handler while still holding buf_lock - cpuB is deadlocked This case may happen if a firmware has a bug and cpuA is stuck talking with it more than one second. Also, this is a similar scenario in an emergency-restart path: - cpuA grabs psinfo->buf_lock and stucks in a firmware - cpuB kicks emergency-restart via either sysrq-b or hangcheck timer. And then, cpuB is deadlocked by taking psinfo->buf_lock again. [Solution] This patch avoids the deadlocking issues in both panic and emergency_restart paths by introducing a function, is_non_blocking_path(), to check if a cpu can be blocked in current path. With this patch, pstore is not blocked even if another cpu has taken a spin_lock, in those paths by changing from spin_lock_irqsave to spin_trylock_irqsave. In addition, according to a comment of emergency_restart() in kernel/sys.c, spin_lock shouldn't be taken in an emergency_restart path to avoid deadlock. This patch fits the comment below. <snip> /** * emergency_restart - reboot the system * * Without shutting down any hardware or taking any locks * reboot the system. This is called when we know we are in * trouble so this is our best effort to reboot. This is * safe to call in interrupt context. */ void emergency_restart(void) <snip> Signed-off-by: NSeiji Aguchi <seiji.aguchi@hds.com> Acked-by: NDon Zickus <dzickus@redhat.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 04 1月, 2013 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit from the pstore filesystem. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Anton Vorontsov <cbouatmailru@gmail.com> Cc: Colin Cross <ccross@android.com> Cc: Kees Cook <keescook@chromium.org> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 12月, 2012 1 次提交
-
-
由 Andrew Morton 提交于
But the kernel decided to call it "origin" instead. Fix most of the sites. Acked-by: NHugh Dickins <hughd@google.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 13 12月, 2012 2 次提交
-
-
由 Anton Vorontsov 提交于
This commit fixes the following warning: fs/pstore/ftrace.c:51:2: warning: initialization from incompatible pointer type [enabled by default] fs/pstore/ftrace.c:51:2: warning: (near initialization for ‘pstore_ftrace_ops.func’) [enabled by defaula Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
由 Arve Hjønnevåg 提交于
The bounds check in ramoops_init_prz was incorrect and ramoops_init_przs had no check. Additionally, ramoops_init_przs allows record_size to be 0, but ramoops_pstore_write_buf would always crash in this case. Signed-off-by: NArve Hjønnevåg <arve@android.com> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 27 11月, 2012 2 次提交
-
-
由 Seiji Aguchi 提交于
[Issue] Currently, a variable name, which identifies each entry, consists of type, id and ctime. But if multiple events happens in a short time, a second/third event may fail to log because efi_pstore can't distinguish each event with current variable name. [Solution] A reasonable way to identify all events precisely is introducing a sequence counter to the variable name. The sequence counter has already supported in a pstore layer with "oopscount". So, this patch adds it to a variable name. Also, it is passed to read/erase callbacks of platform drivers in accordance with the modification of the variable name. <before applying this patch> a variable name of first event: dump-type0-1-12345678 a variable name of second event: dump-type0-1-12345678 type:0 id:1 ctime:12345678 If multiple events happen in a short time, efi_pstore can't distinguish them because variable names are same among them. <after applying this patch> it can be distinguishable by adding a sequence counter as follows. a variable name of first event: dump-type0-1-1-12345678 a variable name of Second event: dump-type0-1-2-12345678 type:0 id:1 sequence counter: 1(first event), 2(second event) ctime:12345678 In case of a write callback executed in pstore_console_write(), "0" is added to an argument of the write callback because it just logs all kernel messages and doesn't need to care about multiple events. Signed-off-by: NSeiji Aguchi <seiji.aguchi@hds.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NMike Waychison <mikew@google.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
由 Seiji Aguchi 提交于
[Issue] Currently, a variable name, which is used to identify each log entry, consists of type, id and ctime. But an erase callback does not use ctime. If efi_pstore supported just one log, type and id were enough. However, in case of supporting multiple logs, it doesn't work because it can't distinguish each entry without ctime at erasing time. <Example> As you can see below, efi_pstore can't differentiate first event from second one without ctime. a variable name of first event: dump-type0-1-12345678 a variable name of second event: dump-type0-1-23456789 type:0 id:1 ctime:12345678, 23456789 [Solution] This patch adds ctime to an argument of an erase callback. It works across reboots because ctime of pstore means the date that the record was originally stored. To do this, efi_pstore saves the ctime to variable name at writing time and passes it to pstore at reading time. Signed-off-by: NSeiji Aguchi <seiji.aguchi@hds.com> Acked-by: NMike Waychison <mikew@google.com> Signed-off-by: NTony Luck <tony.luck@intel.com>
-
- 18 11月, 2012 1 次提交
-
-
由 Maxime Bizon 提交于
record_size / console_size / ftrace_size can be 0 (this is how you disable the feature), but rounddown_pow_of_two(0) is undefined. As suggested by Kees Cook, use !is_power_of_2() as a condition to call rounddown_pow_of_two and avoid its undefined behavior on the value 0. This issue has been present since commit 1894a253 (ramoops: Move to fs/pstore/ram.c). Cc: stable@vger.kernel.org Signed-off-by: NMaxime Bizon <mbizon@freebox.fr> Signed-off-by: NFlorian Fainelli <ffainelli@freebox.fr> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 17 11月, 2012 1 次提交
-
-
由 Hannes Reinecke 提交于
The compiler complained about missing section annotations. Fix it. Signed-off-by: NHannes Reinecke <hare@suse.de> Cc: Colin Cross <ccross@android.com> Cc: Tony Luck <tony.luck@intel.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 15 11月, 2012 1 次提交
-
-
由 Colin Ian King 提交于
Passing a NULL id causes a NULL pointer deference in writers such as erst_writer and efi_pstore_write because they expect to update this id. Pass a dummy id instead. This avoids a cascade of oopses caused when the initial pstore_console_write passes a null which in turn causes writes to the console causing further oopses in subsequent pstore_console_write calls. Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NKees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 21 9月, 2012 1 次提交
-
-
由 Chuansheng Liu 提交于
Like 8250 driver, when pstore is registered as a console, to avoid recursive spinlocks when panic happening, change the spin_lock_irqsave to spin_trylock_irqsave when oops_in_progress is true. Signed-off-by: Nliu chuansheng <chuansheng.liu@intel.com> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 07 9月, 2012 1 次提交
-
-
由 Anton Vorontsov 提交于
With this patch we no longer reuse function tracer infrastructure, now we register our own tracer back-end via a debugfs knob. It's a bit more code, but that is the only downside. On the bright side we have: - Ability to make persistent_ram module removable (when needed, we can move ftrace_ops struct into a module). Note that persistent_ram is still not removable for other reasons, but with this patch it's just one thing less to worry about; - Pstore part is more isolated from the generic function tracer. We tried it already by registering our own tracer in available_tracers, but that way we're loosing ability to see the traces while we record them to pstore. This solution is somewhere in the middle: we only register "internal ftracer" back-end, but not the "front-end"; - When there is only pstore tracing enabled, the kernel will only write to the pstore buffer, omitting function tracer buffer (which, of course, still can be enabled via 'echo function > current_tracer'). Suggested-by: NSteven Rostedt <rostedt@goodmis.org> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 01 9月, 2012 1 次提交
-
-
由 Jovi Zhang 提交于
We need to unregister platform device when module exit, this commit fixes the issue. Signed-off-by: NJovi Zhang <bookjovi@gmail.com> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
- 05 8月, 2012 2 次提交
-
-
由 Anton Vorontsov 提交于
write_buf() should be marked as notrace, otherwise it is prone to recursion. Though, yet the issue is never triggered in real life, because we run inside the function tracer, where ftrace does its own recurse protection. But it's still no good, plus soon we might switch to our own tracer ops, and then the issue will be fatal. So, let's fix it. Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-
由 Randy Dunlap 提交于
Fix printk format warning (on i386) in pstore: fs/pstore/ram.c:409:3: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t' Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
-