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 compi

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: > > Th

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 the GDT unless we

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. Bo

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 > /proc/sysrq-tri

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 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 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 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 1

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 06:4

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 > >> follow

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 awry

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 machine_kexec_32.c making the > > > following t

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, sol

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