Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-27 Thread Konrad Rzeszutek Wilk
On Tue, Dec 26, 2017 at 07:00:43PM -0800, h...@zytor.com wrote: > On December 26, 2017 6:54:55 PM PST, Linus Torvalds > wrote: > >On Tue, Dec 26, 2017 at 6:25 PM, wrote: > >> > >> This is why I personally prefer to see these kinds of terminal

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-27 Thread Konrad Rzeszutek Wilk
On Tue, Dec 26, 2017 at 07:00:43PM -0800, h...@zytor.com wrote: > On December 26, 2017 6:54:55 PM PST, Linus Torvalds > wrote: > >On Tue, Dec 26, 2017 at 6:25 PM, wrote: > >> > >> This is why I personally prefer to see these kinds of terminal stubs > >written in assembly explicitly: the C

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Alexandru Chirvasitu
Sounds like it's been pinned down then. Just confirming this: On Tue, Dec 26, 2017 at 06:16:37PM -0800, Linus Torvalds wrote: > On Tue, Dec 26, 2017 at 3:19 PM, Alexandru Chirvasitu > wrote: > > > > I went back to the initial problematic commit e802a51 and modified it as >

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Alexandru Chirvasitu
Sounds like it's been pinned down then. Just confirming this: On Tue, Dec 26, 2017 at 06:16:37PM -0800, Linus Torvalds wrote: > On Tue, Dec 26, 2017 at 3:19 PM, Alexandru Chirvasitu > wrote: > > > > I went back to the initial problematic commit e802a51 and modified it as > > you suggest: > >

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 6:54:55 PM PST, Linus Torvalds wrote: >On Tue, Dec 26, 2017 at 6:25 PM, wrote: >> >> This is why I personally prefer to see these kinds of terminal stubs >written in assembly explicitly: the C compiler simply doesn't have all

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 6:54:55 PM PST, Linus Torvalds wrote: >On Tue, Dec 26, 2017 at 6:25 PM, wrote: >> >> This is why I personally prefer to see these kinds of terminal stubs >written in assembly explicitly: the C compiler simply doesn't have all >the information needed to do the right thing.

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Linus Torvalds
On Tue, Dec 26, 2017 at 6:25 PM, wrote: > > This is why I personally prefer to see these kinds of terminal stubs written > in assembly explicitly: the C compiler simply doesn't have all the > information needed to do the right thing. > > I'm personally very sceptical to nuking

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Linus Torvalds
On Tue, Dec 26, 2017 at 6:25 PM, wrote: > > This is why I personally prefer to see these kinds of terminal stubs written > in assembly explicitly: the C compiler simply doesn't have all the > information needed to do the right thing. > > I'm personally very sceptical to nuking the GDT unless

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 6:16:37 PM PST, Linus Torvalds wrote: >On Tue, Dec 26, 2017 at 3:19 PM, Alexandru Chirvasitu > wrote: >> >> I went back to the initial problematic commit e802a51 and modified it >as you suggest: > >Thank you. > >> This did

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 6:16:37 PM PST, Linus Torvalds wrote: >On Tue, Dec 26, 2017 at 3:19 PM, Alexandru Chirvasitu > wrote: >> >> I went back to the initial problematic commit e802a51 and modified it >as you suggest: > >Thank you. > >> This did not work out for me, but now it fails differently.

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Linus Torvalds
On Tue, Dec 26, 2017 at 3:19 PM, Alexandru Chirvasitu wrote: > > I went back to the initial problematic commit e802a51 and modified it as you > suggest: Thank you. > This did not work out for me, but now it fails differently. Both > (kexec -l + kexec -e) and (kexec -p +

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Linus Torvalds
On Tue, Dec 26, 2017 at 3:19 PM, Alexandru Chirvasitu wrote: > > I went back to the initial problematic commit e802a51 and modified it as you > suggest: Thank you. > This did not work out for me, but now it fails differently. Both > (kexec -l + kexec -e) and (kexec -p + echo c >

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 3:19:00 PM PST, Alexandru Chirvasitu wrote: >On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: >> [ Sorry, I was off-line on Christmas Eve due to festivities, and then >> yesterday because I've apparently caught a cold. >> >> Still not

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 3:19:00 PM PST, Alexandru Chirvasitu wrote: >On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: >> [ Sorry, I was off-line on Christmas Eve due to festivities, and then >> yesterday because I've apparently caught a cold. >> >> Still not back to normal, but at

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 3:19:00 PM PST, Alexandru Chirvasitu wrote: >On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: >> [ Sorry, I was off-line on Christmas Eve due to festivities, and then >> yesterday because I've apparently caught a cold. >> >> Still not

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 3:19:00 PM PST, Alexandru Chirvasitu wrote: >On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: >> [ Sorry, I was off-line on Christmas Eve due to festivities, and then >> yesterday because I've apparently caught a cold. >> >> Still not back to normal, but at

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 3:19:00 PM PST, Alexandru Chirvasitu wrote: >On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: >> [ Sorry, I was off-line on Christmas Eve due to festivities, and then >> yesterday because I've apparently caught a cold. >> >> Still not

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 3:19:00 PM PST, Alexandru Chirvasitu wrote: >On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: >> [ Sorry, I was off-line on Christmas Eve due to festivities, and then >> yesterday because I've apparently caught a cold. >> >> Still not back to normal, but at

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Alexandru Chirvasitu
On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: > [ Sorry, I was off-line on Christmas Eve due to festivities, and then > yesterday because I've apparently caught a cold. > > Still not back to normal, but at least I can sit in front of the > computer again ] > > On Mon, Dec 25,

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Alexandru Chirvasitu
On Tue, Dec 26, 2017 at 10:51:12AM -0800, Linus Torvalds wrote: > [ Sorry, I was off-line on Christmas Eve due to festivities, and then > yesterday because I've apparently caught a cold. > > Still not back to normal, but at least I can sit in front of the > computer again ] > > On Mon, Dec 25,

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 10:51:12 AM PST, Linus Torvalds wrote: >[ Sorry, I was off-line on Christmas Eve due to festivities, and then >yesterday because I've apparently caught a cold. > > Still not back to normal, but at least I can sit in front of the >computer

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread hpa
On December 26, 2017 10:51:12 AM PST, Linus Torvalds wrote: >[ Sorry, I was off-line on Christmas Eve due to festivities, and then >yesterday because I've apparently caught a cold. > > Still not back to normal, but at least I can sit in front of the >computer again ] > >On Mon, Dec 25, 2017 at

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Linus Torvalds
[ Sorry, I was off-line on Christmas Eve due to festivities, and then yesterday because I've apparently caught a cold. Still not back to normal, but at least I can sit in front of the computer again ] On Mon, Dec 25, 2017 at 1:29 PM, Alexandru Chirvasitu wrote: > > On

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-26 Thread Linus Torvalds
[ Sorry, I was off-line on Christmas Eve due to festivities, and then yesterday because I've apparently caught a cold. Still not back to normal, but at least I can sit in front of the computer again ] On Mon, Dec 25, 2017 at 1:29 PM, Alexandru Chirvasitu wrote: > > On Mon, Dec 25, 2017 at

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-25 Thread Alexandru Chirvasitu
Thanks for that! On Mon, Dec 25, 2017 at 06:40:14AM -0800, Andy Lutomirski wrote: > On Sat, Dec 23, 2017 at 7:30 PM, Linus Torvalds > wrote: > > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > > wrote: > >> > >> For testing purposes,

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-25 Thread Alexandru Chirvasitu
Thanks for that! On Mon, Dec 25, 2017 at 06:40:14AM -0800, Andy Lutomirski wrote: > On Sat, Dec 23, 2017 at 7:30 PM, Linus Torvalds > wrote: > > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > > wrote: > >> > >> For testing purposes, I've altered machine_kexec_32.c making the > >>

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-25 Thread Andy Lutomirski
On Sat, Dec 23, 2017 at 7:30 PM, Linus Torvalds wrote: > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > wrote: >> >> For testing purposes, I've altered machine_kexec_32.c making the >> following toy commit. It naively undoes part of

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-25 Thread Andy Lutomirski
On Sat, Dec 23, 2017 at 7:30 PM, Linus Torvalds wrote: > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > wrote: >> >> For testing purposes, I've altered machine_kexec_32.c making the >> following toy commit. It naively undoes part of e802a51, solely to >> confirm that's where it goes

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-25 Thread Ingo Molnar
* Alexandru Chirvasitu wrote: > The first attachment is the config I initially used last night after > that second patch (removing 'local' etc.). > > As you guessed, all four options are set, hence the name of the file > (ending in '-y'). The other config I'm attaching

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-25 Thread Ingo Molnar
* Alexandru Chirvasitu wrote: > The first attachment is the config I initially used last night after > that second patch (removing 'local' etc.). > > As you guessed, all four options are set, hence the name of the file > (ending in '-y'). The other config I'm attaching was treated as you > lay

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-24 Thread Ingo Molnar
* Alexandru Chirvasitu wrote: > Thank you for the swift reply! > > On Sat, Dec 23, 2017 at 07:30:21PM -0800, Linus Torvalds wrote: > > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > > wrote: > > > > > > For testing purposes, I've altered

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-24 Thread Ingo Molnar
* Alexandru Chirvasitu wrote: > Thank you for the swift reply! > > On Sat, Dec 23, 2017 at 07:30:21PM -0800, Linus Torvalds wrote: > > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > > wrote: > > > > > > For testing purposes, I've altered machine_kexec_32.c making the > > > following

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-23 Thread Alexandru Chirvasitu
Thank you for the swift reply! On Sat, Dec 23, 2017 at 07:30:21PM -0800, Linus Torvalds wrote: > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > wrote: > > > > For testing purposes, I've altered machine_kexec_32.c making the > > following toy commit. It naively

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-23 Thread Alexandru Chirvasitu
Thank you for the swift reply! On Sat, Dec 23, 2017 at 07:30:21PM -0800, Linus Torvalds wrote: > On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu > wrote: > > > > For testing purposes, I've altered machine_kexec_32.c making the > > following toy commit. It naively undoes part of e802a51,

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-23 Thread Linus Torvalds
On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu wrote: > > For testing purposes, I've altered machine_kexec_32.c making the > following toy commit. It naively undoes part of e802a51, solely to > confirm that's where it goes awry in my setup. That's really funky. The

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-23 Thread Linus Torvalds
On Sat, Dec 23, 2017 at 5:44 PM, Alexandru Chirvasitu wrote: > > For testing purposes, I've altered machine_kexec_32.c making the > following toy commit. It naively undoes part of e802a51, solely to > confirm that's where it goes awry in my setup. That's really funky. The idt_invalidate() seems

PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-23 Thread Alexandru Chirvasitu
Short description: loading a crash kernel with (a) kexec -l [..] or (b) kexec -p [..] and then testing it with (a) kexec -e or (b) echo c > /proc/sysrq-trigger results in a regular reboot (going through BIOS, etc.). The commit that starts exhibiting this behaviour for me is e802a51: x86/idt:

PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-23 Thread Alexandru Chirvasitu
Short description: loading a crash kernel with (a) kexec -l [..] or (b) kexec -p [..] and then testing it with (a) kexec -e or (b) echo c > /proc/sysrq-trigger results in a regular reboot (going through BIOS, etc.). The commit that starts exhibiting this behaviour for me is e802a51: x86/idt: