[opensuse-kernel] microcode autoloading
Hi: Now that the kernel nicely autoloads the CPU microcode updates, the following problem remains. what should happend when the microcode package is updated ? * The way I believe it should work* This is not an userspace problem, the kernel must watch the microcode file it loaded before and reload it as needed. * Other hackish ways * - Teach udev to do the work for us. - Add systemd.path(5) units and watch the microcode directory for changes. - reload the module on package update (fugly) Any thoughts ? -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/14/2012 04:02 PM, Cristian Rodríguez wrote:
Hi:
Now that the kernel nicely autoloads the CPU microcode updates, the following problem remains. what should happend when the microcode package is updated ?
* The way I believe it should work*
This is not an userspace problem, the kernel must watch the microcode file it loaded before and reload it as needed.
* Other hackish ways *
- Teach udev to do the work for us.
- Add systemd.path(5) units and watch the microcode directory for changes.
- reload the module on package update (fugly)
Any thoughts ?
On %postun do test -f /sys/devices/system/cpu/microcode/reload && \ /bin/echo 1 > /sys/devices/system/cpu/microcode/reload - -- js suse labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQeth0AAoJEL0lsQQGtHBJSD0P/1Ie+RU4FG2nAOShpj2wp9GS ky6GQsndE2AvLjKHoCUh9M4Id8RvbSo0ULIchDSdxq7GzEIoEY2LX+CS8r/JENnN mPOzfKrlZJyJS02hnEo1c5EQm8Jkl38nk9RbIu14LF71qONabT+GHWTUyqig94zi GsCSBd09PIEW5zXsgU2f477RAIqk4UT+718acFmSf3thG2Y4FlM6wzjS2LS0IZM/ ZE8cnb+q/h6g2H+vYhrnuuwlTXE8ufXzFfbOKLnhgQczOE2BZros8EXBqqkSYKZ+ I2aqdd2mKE8TMF566QH45PHs4qa8fNN797e6zS7+IcyrwNrMzizYgH3rG/kitERY yTJVRJXSGJMLw/re2K6zZmwpMHliWkRN6iy0wsvVc+lfo0XxE3s7M5lSsIbJkc7u L1OwzIzdd/uDPtVOeegmDd2WAy5HS5bk6gfzN4Ya8O+nzsZvp14MSsv9IKUcH++z 7hGUgYZ6bI//K1kNJAu2gFkJv2j3x2Xo+dJ22iagWu1FTP2TwHbXynM0Txhc3cgY siw+1zpfyj4VIHFsDx/7vQXGDaq+SA7Hth3CZp2COOXfhSHwIhP6skTxXFGSdVt3 GItXvcjJKLqHaMdUe9u1SWa2d93d4MOXYlBolHHZEPUeucZrQZkVsm36QHquKSh3 417kJlerKb/wov8xfrmz =h7px -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/14/2012 05:21 PM, Jiri Slaby wrote:
On 10/14/2012 04:02 PM, Cristian Rodríguez wrote:
Hi:
Now that the kernel nicely autoloads the CPU microcode updates, the following problem remains. what should happend when the microcode package is updated ?
* The way I believe it should work*
This is not an userspace problem, the kernel must watch the microcode file it loaded before and reload it as needed.
* Other hackish ways *
- Teach udev to do the work for us.
- Add systemd.path(5) units and watch the microcode directory for changes.
- reload the module on package update (fugly)
Any thoughts ?
On %postun do
s/postun/postin/ of course. Sorry for the confusion.
test -f /sys/devices/system/cpu/microcode/reload && \ /bin/echo 1 > /sys/devices/system/cpu/microcode/reload
- -- js suse labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQewSzAAoJEL0lsQQGtHBJmwQP/3hjOP9tATVrYbIRR9BWYWBG 7vzYHj7RaG9ziChYHbaZaMRudhZTbgqlpNWhPI5h/v7qRpwxsREzMqqGIJL0VwF2 erIg+VzG7ZlMGS6kXPZT2hVLUz0Ab1TXl7mi5eYf+2uGKZlvgZ7+RiNVel9D9BXq pWsgTvOIpjoudWMnwUvKPI5Y78LCfW+A+1LVmFnRJNY9V6mRS5sKORsDcjSzSBxg gqErW+wjD3CfqqLG61lqMbLCaIKXyIbc7GveyibWvI882maNKjkZ9H6Ck0ii4FSN 3PaZVwG32iodB4PJLDUiIkRjHbWM0PittucM2gH019K519+7SRtwomzoBxNVfR7o KyuqA+NrJfXScTSoUoanFBwSCQ5k3T/HvbI3WcFO4G0Ta1GEcLBx49jomYdiA6uO MM4Be6vAGyMcF4BW47OYl+fcKOPek2kILDW9m1vQ3osDnb5D/N1cxo1RFx6DItdw qS8Kpb8Q5QkbHwg5AcaozEtjg97GHU71UtCg70DI9CQo9gXkqNhf3N/VfJJG0rM8 YU/L0CIDP3vp1QkbV9bfMCjGmmy3Ih0e0JnZ3VAGIrmC5BeIYRQZEznprjicQs8W e6M5Ipvcx4cmH7GwAFEuCpKZGkvr/oFLZE0Fupi6kfkjACjhOPBP3yayZ/zPprUR bFKQdcBfwGndzB2RQObi =iZca -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
El 14/10/12 12:21, Jiri Slaby escribió:
On %postun do test -f /sys/devices/system/cpu/microcode/reload && \ /bin/echo 1 > /sys/devices/system/cpu/microcode/reload
Oh, that would do the trick .. just implemented this in a %post script, solves the problem well. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 14.10.12 at 17:21, Jiri Slaby
wrote: On %postun do test -f /sys/devices/system/cpu/microcode/reload && \ /bin/echo 1 > /sys/devices/system/cpu/microcode/reload
Which doesn't (currently) cover the Xen case - the file referred to (if corrected to include the CPU-specific portion) doesn't exist on Xen kernels, as it makes no sense there (and the fact that it does exist in pv-ops kernels is just one of the many flaws there). Jan -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 10/15/2012 10:31 AM, Jan Beulich wrote:
On 14.10.12 at 17:21, Jiri Slaby
wrote: On %postun do test -f /sys/devices/system/cpu/microcode/reload && \ /bin/echo 1 > /sys/devices/system/cpu/microcode/reload Which doesn't (currently) cover the Xen case - the file referred to (if corrected to include the CPU-specific portion) doesn't exist on Xen kernels, as it makes no sense there (and the fact that it does exist in pv-ops kernels is just one of the many flaws there).
What do you mean exactly? Do you need some action taken on xen? That the file does not exist is covered by the test -f, right? -- js suse labs -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 15.10.12 at 10:36, Jiri Slaby
wrote: On 10/15/2012 10:31 AM, Jan Beulich wrote: On 14.10.12 at 17:21, Jiri Slaby
wrote: On %postun do test -f /sys/devices/system/cpu/microcode/reload && \ /bin/echo 1 > /sys/devices/system/cpu/microcode/reload Which doesn't (currently) cover the Xen case - the file referred to (if corrected to include the CPU-specific portion) doesn't exist on Xen kernels, as it makes no sense there (and the fact that it does exist in pv-ops kernels is just one of the many flaws there).
What do you mean exactly? Do you need some action taken on xen? That the file does not exist is covered by the test -f, right?
Yes - an alternative action (e.g. using the legacy interface) should be taken on Xen. Jan -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/14/12 10:02 AM, Cristian Rodríguez wrote:
Hi:
Now that the kernel nicely autoloads the CPU microcode updates, the following problem remains. what should happend when the microcode package is updated ?
* The way I believe it should work*
This is not an userspace problem, the kernel must watch the microcode file it loaded before and reload it as needed.
* Other hackish ways *
- Teach udev to do the work for us.
- Add systemd.path(5) units and watch the microcode directory for changes.
- reload the module on package update (fugly)
Sorry, I disagree with your definition of hackish. The kernel should never watch a file on its own behalf. That's a policy decision that is up to the admin. We have clear userspace APIs for watching a file for changes that can be leveraged by a daemon that only waits for it or, as you pointed out, by systemd. Since the package update is by definition when the file will be udpated -- Jiri's idea of a postinstall script sounds ideal. - -Jeff - -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQeucuAAoJEB57S2MheeWy9zIP/j5ryIwlECg2SAW9QSJhFsjE ItCvpj5CQdey3ROkx5W6gJ56lAcFtYokYT2vkLZlAnG0DliSxRK+ax/9muJePvCz SU36WJIHXJlcJxrDttGa84NmMdrPp0czXyEv75R8Ubol7eOjmjssG00dGNGxnXga G9MGB73Hvg+6pQNQ8v+eHOyP0a2nMfH/cYdCBHU82mruaErF7DG9dDBmxbQ2DG6W vCW6KA4DjlLaAkUPaNXhdRQwMICYcDihZHiCZ/L7CgA0++HQKdd6aVgZyvJzt5OD pisEJdvmOU/WcUt78B3tcEExifO4Ya8JSch6pLmhBLApMTpb65aO9h/4LqwmVk7S M6pSL9BItHtl/OuMwwz/V5EU9SigLUoJJHaF2kxJdJRT1q1xa20DR0Ng3PoLsQkw 2zpBbPakcPa3pjC3lzmC1W9SKQ12IBA0tzoRqb5IXArvoI7355nUmjQt5yVwWqS0 hakXmRVciVzaLDYv40bdiG9ORPzUqhLlxVAxxhZXa7ilN4j1rgAmQRf0TAnFOsWt IIVt+Ya6kO6Z0LUDmIcTGnYe69+SeKstcLPsnVCbLq0V7GMHy3EKTjw6nRa6Wh0C bjAQWEvRYsO4kpIeaSENvMze1ViJPLj0ep5Vt0DolubHifaSBaOReM6oe1tOSNSe EvKChycGt7vmX1zCp1Vy =YDl/ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Am 14.10.2012 18:24, schrieb Jeff Mahoney:
Since the package update is by definition when the file will be udpated -- Jiri's idea of a postinstall script sounds ideal.
Another question is if reloading the microcode on a fully running system is even a safe thing to do or if that should only be done during boot. There might be a reason why you usually get microcode updates via BIOS updates ;-) -- Stefan Seyfried "If your lighter runs out of fluid or flint and stops making fire, and you can't be bothered to figure out about lighter fluid or flint, that is not Zippo's fault." -- bkw -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Sun, Oct 14, 2012 at 08:27:58PM +0200, Stefan Seyfried wrote:
Am 14.10.2012 18:24, schrieb Jeff Mahoney:
Since the package update is by definition when the file will be udpated -- Jiri's idea of a postinstall script sounds ideal.
Another question is if reloading the microcode on a fully running system is even a safe thing to do or if that should only be done during boot. There might be a reason why you usually get microcode updates via BIOS updates ;-)
If we do this per online update, the package manager gets a "reboot needed" suggestion. This is however a level higher up in the chain from RPM handling. CIao, Marcus -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
participants (6)
-
Cristian Rodríguez
-
Jan Beulich
-
Jeff Mahoney
-
Jiri Slaby
-
Marcus Meissner
-
Stefan Seyfried