[Devel] [PATCH vz8 2/2] x86: don't enable cpuid faults if /proc/vz/cpuid_override unused

2020-11-02 Thread Andrey Ryabinin
We don't need to enable cpuid faults if /proc/vz/cpuid_override was never used. If task was attached to ve before a write to 'cpuid_override' it will not get cpuid faults now. It shouldn't be a problem since the proper use of 'cpuid_override' requires stopping all containers. https://jira.sw.ru/br

[Devel] [PATCH vz8 1/2] x86, cpuinfo: Fix race on parallel /proc/cpuinfo read

2020-11-02 Thread Andrey Ryabinin
If several threads read /proc/cpuinfo some can see in 'flags' values from c->x86_capability, before __do_cpuid_fault() called and masks applied. Fix this by forming 'flags' on stack first and copy them in per_cpu(cpu_flags, cpu) as a last step. https://jira.sw.ru/browse/PSBM-121823 Signed-off-by:

[Devel] [PATCH vz8 v2 1/2] x86, cpuinfo: Fix race on parallel /proc/cpuinfo read

2020-11-02 Thread Andrey Ryabinin
If several threads read /proc/cpuinfo some can see in 'flags' values from c->x86_capability, before __do_cpuid_fault() called and masks applied. Fix this by forming 'flags' on stack first and copy them in per_cpu(cpu_flags, cpu) as a last step. https://jira.sw.ru/browse/PSBM-121823 Signed-off-by:

[Devel] [PATCH vz8 v2 2/2] x86: don't enable cpuid faults if /proc/vz/cpuid_override unused

2020-11-02 Thread Andrey Ryabinin
We don't need to enable cpuid faults if /proc/vz/cpuid_override was never used. If task was attached to ve before a write to 'cpuid_override' it will not get cpuid faults now. It shouldn't be a problem since the proper use of 'cpuid_override' requires stopping all containers. https://jira.sw.ru/br