Skip to contentSkip to conversation

rt kernel break printf command's parent process

DISCUSSION ddu 2 participants 4 messages May 27, 2019 – May 30, 2019

lore
Share & tools
lore

ddu

author
#0 lore raw

Hi all

I use yocto rt-kernel which rebase on rt kernel:

http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/log/?h=v5.0/standard/preempt-rt/intel-x86

yocto branch: master

run command:

printf "%0.0f\n" 123.4567

error:

[ OK ] Stopped Serial Getty on ttyS0.
[ OK ] Started Serial Getty on ttyS0.

the system loged out, and let login again.

I using bisect to find which commit break the it:

---------------------------------------------------------------------------

commit 6115b04921fc2b8a6b9f7de6d35a0202204a36ba
Author: Rik van Riel <[email protected]>
Date:   Sun Sep 9 18:30:50 2018 +0200

    x86/fpu: Always store the registers in copy_fpstate_to_sigframe()

    copy_fpstate_to_sigframe() stores the registers directly to user space. This is okay because the FPU register are valid and saving it directly avoids saving it into kernel memory and making a copy. However<E2><80><A6> We can't keep doing this if we are going to restore the FPU registers on the return to userland. It is possible that the FPU registers will be invalidated in the middle of the save operation and this should be done with disabled preemption / BH.

    Save the FPU registers to task's FPU struct and copy them to the user memory later on.

    This code is extracted from an earlier version of the patchset while there still was lazy-FPU on x86.

---------------------------------------------------------------------------

When I want to revert it, I found it's a serial patches, so if I revert it, I need to revert a serial patches.

So can anyone help me to trace where break the return from printf and break the parent process?

#1 lore raw
Quoted 1 line · ddu

Hi all

Hi,

Quoted 6 lines

I use yocto rt-kernel which rebase on rt kernel:

http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/log/?h=v5.0/standard/preempt-rt/intel-x86

yocto branch: master

Quoted 8 lines

run command:

printf "%0.0f\n" 123.4567

error:

[ OK ] Stopped Serial Getty on ttyS0.
[ OK ] Started Serial Getty on ttyS0.

Doing this on a x86-64 does not lead to this. Is this 32bit oder 64bit?

Quoted 3 lines

the system loged out, and let login again.

I using bisect to find which commit break the it:

…

Quoted 6 lines

When I want to revert it, I found it's a serial patches, so if I revert it, I need to revert a serial patches.

So can anyone help me to trace where break the return from printf and break the parent process?

You could remove the FPU patches from the series file and check it still happens.

Sebastian