Hello Lorenzo,
Thank you for telling me.
I missed the patch.
Best regards,
Hiraku Toyooka
2018-01-16 18:30 GMT+09:00 Lorenzo Pieralisi :
> On Tue, Jan 16, 2018 at 06:15:46PM +0900, Hiraku Toyooka wrote:
>> Hello,
>>
>> I found a NULL pointer dereference in PCI/MSI when
0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4)) #14 SMP Tue Jan 16
06:33:27 UTC 2018
Hiraku Toyooka (1):
PCI/MSI: add NULL check before use of msi_desc
drivers/pci/msi.c | 3 +++
1 file changed, 3 insertions(+)
--
2.7.4
error by avoiding NULL msi_desc use.
Signed-off-by: Hiraku Toyooka
Cc: Bjorn Helgaas
Cc: Richard Zhu
Cc: Lucas Stach
Cc: Jingoo Han
Cc: Joao Pinto
Cc: Lorenzo Pieralisi
Cc: Russell King
Cc: Will Deacon
---
drivers/pci/msi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci
persistent_ram_zone(=prz) structures are allocated by
persistent_ram_new(), which includes vmap() or ioremap(). But they
are currently freed by kfree(). We should use persistent_ram_free()
to correct this asymmetry usage.
Signed-off-by: Hiraku Toyooka
Cc: Anton Vorontsov
Cc: Colin Cross
Cc
].
Signed-off-by: Hiraku Toyooka
Cc: Anton Vorontsov
Cc: Colin Cross
Cc: Kees Cook
Cc: Mark Salyzyn
Cc: Seiji Aguchi
Cc: Tony Luck
Cc: linux-kernel@vger.kernel.org
---
fs/pstore/pmsg.c | 20 ++--
include/linux/pstore.h |1 +
2 files changed, 19 insertions(+), 2
it stands for 'dump przs'.
* rename ramoops_init_prz() to ramoops_init_dprzs().
* change parameter of ramoops_free_przs() from struct ramoops_context *
into struct persistent_ram_zone * in order to make it available for
all prz array.
Signed-off-by: Hiraku Toyooka
Cc: Anton Voront
- pstore_tests
- Write unique string to the last /dev/pmsgN
- pstore_post_reboot_tests
- Check the last pmsg area is detected
Signed-off-by: Hiraku Toyooka
Cc: Anton Vorontsov
Cc: Colin Cross
Cc: Kees Cook
Cc: Mark Salyzyn
Cc: Seiji Aguchi
Cc: Shuah Khan
Cc: Tony Luck
Cc: linux-...@v
|8 +
tools/testing/selftests/pstore/common_tests| 21 ++
.../selftests/pstore/pstore_post_reboot_tests | 27 +--
tools/testing/selftests/pstore/pstore_tests| 16 +-
8 files changed, 257 insertions(+), 71 deletions(-)
--
Hiraku Toyooka
--
To
].
Signed-off-by: Hiraku Toyooka
Cc: Jonathan Corbet
Cc: Anton Vorontsov
Cc: Colin Cross
Cc: Kees Cook
Cc: Mark Salyzyn
Cc: Seiji Aguchi
Cc: Tony Luck
Cc: linux-...@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Documentation/ramoops.txt | 22 +++
fs/pstore/ram.c| 146
upport for pstore configuration
Would you mean pstore backend's configuration (e.g.'mem_address' in
ramoops)?
Best regards,
Hiraku Toyooka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
pmsg_size.
(Although there is no ramoops's backend which uses pmsg currently)
* Give an ID for each pmsg buffer, and modify some functions related to
buffer allocation.
What do you think about this idea?
Best regards,
Hiraku Toyooka
--
To unsubscribe from this list: send the line "unsubscr
esystem
console-ramoops-0 ... ok
dmesg-ramoops-0 ... ok
dmesg-ramoops-1 ... ok
pmsg-ramoops-0 ... ok
selftests: pstore_post_reboot_tests [PASS]
Signed-off-by: Hiraku Toyooka
Cc: Shuah Khan
Cc: Tony Luck
Cc: Anton Vorontsov
Cc: Colin Cross
Cc: Kees Cook
Cc
written to pmsg matches across crash.
* Don't touch panic_on_oops because it is not necessary for reboot on crash
(v1: http://www.kernelhub.org/?msg=831044&p=2)
I also confirmed that these scripts work fine with kdump reboot with
kernel boot parameter 'crash_kexec_post_notifiers'.
cmdline=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait mem=768M
ramoops.mem_address=0x3000 ramoops.mem_size=0x1
Checking pstore console is registered ... ok
Checking /dev/pmsg0 exists ... ok
Writing unique string to /dev/pmsg0 ... ok
Signed-off-by: Hiraku Toyooka
Cc: S
{backend}-0
if [ $? -eq 0 ]; then
prlog "ok"
else
prlog "FAIL"
else
prlog "FAIL"
fi
Best regards,
Hiraku Toyooka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
re the sysrq?
Yes, I should check /sys/kernel/kexec_crash_loaded. If the value is
1, this script should try to unload kexec kernel.
> Or, does it cover oops and kdump case?
No, not yet. I think we should support oops case at first.
Best regards,
Hiraku Toyooka
阿口誠司 / AGUCHI,SEIJI wrote:
+
Hello,
> It may be good if you can log "/sys/module/pstore/parameters/backend/"
> or /proc/cmdline in failure case.
>
> It makes debug easy.
OK, I'll have the script log the information in v2.
Best regards,
Hiraku Toyooka
阿口誠司 / AGUCHI,SEIJI wrote:
Hi,
+prlog
test pattern is repeated a lot. Maybe better to create a helper
> function instead? It could make the tests much more readable.
Yes, I should make a helper function in v2.
Best regards,
Hiraku Toyooka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
e instead?
OK, I'll update in that way.
Best regards,
Hiraku Toyooka
Kees Cook wrote:
On Tue, Sep 8, 2015 at 4:06 AM, Hiraku Toyooka
wrote:
The pstore_tests script includes test cases which check pstore's
behavior before crash (and reboot).
The test cases are currently following.
TEST_STRING can be left to a regular file before
reboot as well as reboot_flag.) Is it OK?
Best regards,
Hiraku Toyooka
--
Hiraku Toyooka
Systems Productivity Research Dept. / Linux Technology Center
Center for Technology Innovation - Systems Engineering, Hitachi Ltd.
--
To unsubscribe from this list:
test logs later.
Signed-off-by: Hiraku Toyooka
Cc: Shuah Khan
Cc: Tony Luck
Cc: Anton Vorontsov
Cc: Colin Cross
Cc: Kees Cook
Cc: Mark Salyzyn
Cc: Seiji Aguchi
Cc: linux-kernel@vger.kernel.org
Cc: linux-...@vger.kernel.org
---
tools/testing/selftests/Makefile|1 +
tools
selftests: pstore_post_reboot_tests [PASS]
make: Leaving directory '/home/root/selftests/pstore'
Signed-off-by: Hiraku Toyooka
Cc: Shuah Khan
Cc: Tony Luck
Cc: Anton Vorontsov
Cc: Colin Cross
Cc: Kees Cook
Cc: Mark Salyzyn
Cc: Seiji Aguchi
Cc: linux-kernel@vger.kernel.org
Cc:
[PASS]
make: Leaving directory '/home/root/selftests/pstore'
We can also see test logs later.
# cat pstore/logs/20150903-58/pstore_tests.log
...
---
Hiraku Toyooka (2):
selftests/pstore: add pstore test script for pre-reboot
selftests/pstore: add pstore test script
Kexec_load syscall in ARM requires that machine-specific code
has the smp_ops.cpu_kill() before loading kernel image.
This patch adds the cpu_kill(), as a result, kexec reboot and
kernel crash dump become available in mach-socfpga.
Signed-off-by: Hiraku Toyooka
Cc: Dinh Nguyen
Cc: Russell King
g. This is discussed before between
Alan Tull and you. (https://lkml.org/lkml/2014/9/25/37)
Best regards,
Hiraku Toyooka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.or
Kexec_load syscall in ARM checks that machine-specific code
has the smp_ops.cpu_kill() before loading kernel image.
This patch adds the cpu_kill(), as a result, kexec reboot and
kernel crash dump become available in mach-socfpga.
Signed-off-by: Hiraku Toyooka
Cc: Dinh Nguyen
Cc: Russell King
Commit-ID: 1abccd7419de9829bcdf9ab1f81d5f6cf74d55d3
Gitweb: http://git.kernel.org/tip/1abccd7419de9829bcdf9ab1f81d5f6cf74d55d3
Author: Hiraku Toyooka
AuthorDate: Fri, 8 Mar 2013 16:32:25 +0900
Committer: Steven Rostedt
CommitDate: Fri, 8 Mar 2013 06:27:11 -0500
tracing: update
ch to update the documentation. Could you include this
patch?
Thanks,
Hiraku Toyooka
From: Hiraku Toyooka
Subject: [PATCH] tracing: update documentation of snapshot utility
Now, "snapshot" file returns success on a reset of snapshot buffer
even if the buffer wasn't allocated, instead
, any number but a '0' or '1' is written
> into the snapshot file. But if the file is not allocated it returns
> -EINVAL error code. This is rather pointless. It is better just to
> do nothing and return success.
>
> Cc: Hiraku Toyooka
> Signed-off-by: Stev
t buffer, if not already allocated.
> # Takes a snapshot of the main buffer.
> # echo 2 > snapshot : Clears snapshot buffer (but does not allocate)
> # (Doesn't have to be '2' works with any number that
> # is not
writing to the file when the snapshot buffer isn't allocated.
What do you think?
I think it's OK.
I'll send a patch to make the file not return -EINVAL. Does it need to
be based on 3.9-rc1 or tip tree?
Thanks,
Hiraku Toyooka
--
To unsubscribe from this list: send the li
Commit-ID: c1043fcda1b9e8e5144cfdaee7be262c50dbdead
Gitweb: http://git.kernel.org/tip/c1043fcda1b9e8e5144cfdaee7be262c50dbdead
Author: Hiraku Toyooka
AuthorDate: Wed, 26 Dec 2012 11:53:09 +0900
Committer: Steven Rostedt
CommitDate: Wed, 30 Jan 2013 11:02:07 -0500
tracing: Add
Commit-ID: debdd57f5145f3c6a4b3f8d0126abd1a2def7fc6
Gitweb: http://git.kernel.org/tip/debdd57f5145f3c6a4b3f8d0126abd1a2def7fc6
Author: Hiraku Toyooka
AuthorDate: Wed, 26 Dec 2012 11:53:00 +0900
Committer: Steven Rostedt
CommitDate: Wed, 30 Jan 2013 11:02:06 -0500
tracing: Make a
Commit-ID: 2fd196ec1eab2623096e7fc7e6f3976160392bce
Gitweb: http://git.kernel.org/tip/2fd196ec1eab2623096e7fc7e6f3976160392bce
Author: Hiraku Toyooka
AuthorDate: Wed, 26 Dec 2012 11:52:52 +0900
Committer: Steven Rostedt
CommitDate: Wed, 30 Jan 2013 11:02:05 -0500
tracing: Replace
Commit-ID: a54164114b96b4693b42cdb553260eec41ea4393
Gitweb: http://git.kernel.org/tip/a54164114b96b4693b42cdb553260eec41ea4393
Author: Hiraku Toyooka
AuthorDate: Wed, 19 Dec 2012 16:02:34 +0900
Committer: Steven Rostedt
CommitDate: Mon, 21 Jan 2013 13:22:32 -0500
tracing: Add checks
This patch adds snapshot description in ftrace documentation.
This description includes what the snapshot is and how to use it.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Rob Landley
Cc: linux-...@vger.kernel.org
Cc: linux-kernel
napshot if it is allocated.
Any other positive values will clear the snapshot contents if
the snapshot is allocated, or return EINVAL if it is not allocated.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: David Sharp
Cc: li
changed between different reads of the trace
file.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: linux-kernel@vger.kernel.org
---
kernel/trace/trace.c | 22 +-
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git
//lkml.org/lkml/2012/12/19/35)
---
Hiraku Toyooka (3):
tracing: replace static old_tracer with trace iterator's pointer to the
original tracer's name
tracing: make a snapshot feature available from userspace
tracing: add description of snapshot to Documentation/trace/
Hi,
(12/21/2012 12:04 PM), Steven Rostedt wrote:
On Wed, 2012-12-19 at 16:02 +0900, Hiraku Toyooka wrote:
Currently, read functions for trace buffer use static "old_tracer"
for detecting changes of current tracer. This is because we can
assume that these functions are used from onl
This patch adds snapshot description in ftrace documentation.
This description includes what the snapshot is and how to use it.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Rob Landley
Cc: linux-...@vger.kernel.org
Cc: linux-kernel
d from two files. So we remove all static "old_tracer", and
replace those with string comparison between current and previous
tracers.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: linux-kernel@vger.kernel.org
---
kernel/trace/trace.c |
napshot if it is allocated.
Any other positive values will clear the snapshot contents if
the snapshot is allocated, or return EINVAL if it is not allocated.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: David Sharp
Cc: li
max_tr->buffer could be NULL in the tracing_reset{_online_cpus}. In this
case, a NULL pointer dereference happens, so we should return immediately
from these functions.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: linux-kernel@vger.kernel.
ation of the snapshot
ToDo:
- adding "trace_snapshot" kernel parameter to allocate spare buffer on boot.
(v1: https://lkml.org/lkml/2012/10/2/67)
(v2: https://lkml.org/lkml/2012/10/16/585)
---
Hiraku Toyooka (4):
tracing: add checks if tr->buffer is NULL in tracing_reset{_o
(12/15/2012 02:08 AM), Steven Rostedt wrote:
On Fri, 2012-12-07 at 11:07 +0900, Hiraku Toyooka wrote:
Hi, Steven,
(2012/11/30 23:17), Steven Rostedt wrote:
[snip]
>
> Actually, I would have:
>
> status\input | 0 | 1
->old_tracer = current_trace;
>> *iter->trace = *current_trace;
>> }
>> mutex_unlock(&trace_types_lock);
>>
>> + if (iter->snapshot && iter->trace->use_max_tr)
>> +return ERR_PTR(-EBUSY);
>> +
>
If I catch your meaning, do s_start() and s_stop() become like following
code?
(Now, s_start() is used from two files - "trace" and "snapshot", so we
should change static "old_tracer" to per open-file.)
static void *s_start(struct seq_file *m, loff_t *pos)
{
str
Commit-ID: f43c738bfa8608424610e4fc1aef4d4644e2ce11
Gitweb: http://git.kernel.org/tip/f43c738bfa8608424610e4fc1aef4d4644e2ce11
Author: Hiraku Toyooka
AuthorDate: Tue, 2 Oct 2012 17:27:10 +0900
Committer: Steven Rostedt
CommitDate: Wed, 31 Oct 2012 16:45:25 -0400
tracing: Change
ned-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: linux-kernel@vger.kernel.org
---
kernel/trace/trace.c | 58 +++---
1 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/kernel/trace/trace.c b/ke
This patch adds snapshot description in ftrace documentation.
This description includes what the snapshot is and how to use it.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Rob Landley
Cc: linux-...@vger.kernel.org
Cc: linux-kernel
ile
provides a mean to pre-allocate (or free) the max_tr buffer.
# echo 1 > snapshot_allocate
[...]
# echo 1 > snapshot
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Li Zefan
Cc: linux-kernel@vger.k
print_max and use_max_tr in struct tracer are "int" variables and
used like flags. This is wasteful, so change the type to "bool".
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: linux-kernel@vger.kernel.org
---
Hi, Steven,
Thank you for your review.
I changed the function name "resize_buffer_even" to
"resize_buffer_duplicate_size".
(v1: https://lkml.org/lkml/2012/10/2/67)
---
Hiraku Toyooka (4):
tracing: add description of snapshot to Documentation/trace/ftrace.txt
t mind this patch, but I just hate the name "resize_buffer_even".
> What about "resize_buffer_duplicate_size"?
>
O.K.
I'll send modified version of this patch later.
Regards,
Hiraku Toyooka
--
To unsubscribe from this list: send the line "unsubscribe linux-ke
print_max and use_max_tr in struct tracer are "int" variables and
used like flags. This is wasteful, so change the type to "bool".
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: linux-kernel@vger.kernel.org
---
This patch adds snapshot description in ftrace documentation.
This description includes what the snapshot is and how to use it.
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Rob Landley
Cc: linux-...@vger.kernel.org
Cc: linux-kernel
ile
provides a mean to pre-allocate (or free) the max_tr buffer.
# echo 1 > snapshot_allocate
[...]
# echo 1 > snapshot
Signed-off-by: Hiraku Toyooka
Cc: Steven Rostedt
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Li Zefan
Cc: linux-kernel@vger.k
to the global_trace's size)
__tracing_resize_ring_buffer() can be used for (1), and had
implemented (2) inside it for resetting the global_trace to the
original size.
(2) was also implemented in other place. So this patch assembles
them in a new function - resize_buffer_even().
Signed-off-
_prio=120 prev_state=R ==>
next_comm=snapshot-test-2 next_pid=2243 next_prio=120
snapshot-test-2-2229 [002] d... 2440.707438: sched_switch:
prev_comm=snapshot-test-2 prev_pid=2229 prev_prio=120 prev_state=S ==>
next_comm=swapper/2 next_pid=0 next_prio=120
[...]
---
Hiraku Toyooka (4
mediately without fail. if opening snapshot_pipe allocates a buffer,
we need a special userspace command to realize that.
Um, cat can open a file? I don't understand.
If you need a delay between open and read, you can do that from the
command line with something like:
(read -n 1 < /dev/tty
--- a/kernel/trace/trace_irqsoff.c
+++ b/kernel/trace/trace_irqsoff.c
@@ -614,6 +614,7 @@ static struct tracer irqsoff_tracer __read_mostly =
.open = irqsoff_trace_open,
.close = irqsoff_trace_close,
.use_max_tr = 1,
+ .always_use_max_tr
Hello, Rob,
Thank you very much for your advice.
(2012/07/05 10:01), Rob Landley wrote:
On 07/04/2012 05:47 AM, Hiraku Toyooka wrote:
Hello, Steven,
I've sent below RFC patch, but still have no responses. This patch can
be applied to current tip tree.
If you have time, could you giv
63 matches
Mail list logo