On Wed, May 25, 2016 at 4:32 AM, Borislav Petkov <b...@alien8.de> wrote:
> On Tue, May 24, 2016 at 03:48:41PM -0700, Andy Lutomirski wrote:
>> This will help debug OOPSes related to USER_DS vs KERNEL_DS.
>>
>> Signed-off-by: Andy Lutomirski <l...@kernel.org>
>> ---
>>  arch/x86/kernel/dumpstack_32.c | 4 ++++
>>  arch/x86/kernel/dumpstack_64.c | 5 +++++
>>  2 files changed, 9 insertions(+)
>>
>> diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
>> index 464ffd69b92e..5dbb08fd8291 100644
>> --- a/arch/x86/kernel/dumpstack_32.c
>> +++ b/arch/x86/kernel/dumpstack_32.c
>> @@ -124,8 +124,12 @@ show_stack_log_lvl(struct task_struct *task, struct 
>> pt_regs *regs,
>>  void show_regs(struct pt_regs *regs)
>>  {
>>       int i;
>> +     struct thread_info *ti = current_thread_info();
>>
>>       show_regs_print_info(KERN_EMERG);
>> +     if (ti->addr_limit.seg != TASK_SIZE_MAX)
>> +             printk(KERN_DEFAULT "task.addr_limit: 0x%lx\n",
>> +                    ti->addr_limit.seg);
>
> I guess we can dump that unconditionally just to be consistent and so
> that all oopses look the same, i.e., with that line always present.
>

I thought about doing that, but I always hate when things scroll off
the screen, and 99% of the time the addr_limit will be TASK_SIZE_MAX
and the line won't be interesting.

--Andy

Reply via email to