1 |
On 01/23/2018 11:35 AM, Rich Freeman wrote: |
2 |
> Abandoning ext4 over retpolines/etc seems a bit drastic. My guess is |
3 |
> that there is a bug in the latest kernel that will get fixed, or maybe |
4 |
> a bug in gcc (which needs to be patched for spectre anyway). |
5 |
> |
6 |
> These Spectre changes are being merged and it has been a real mess. |
7 |
> The vulnerability is relatively serious so there is a lot of pressure |
8 |
> to do something, but the changes aren't trivial so they could contain |
9 |
> bugs or expose compiler bugs. |
10 |
> |
11 |
> FWIW upstream 4.9.77 builds just fine for me, |
12 |
> |
13 |
> If you want to mess with building alternate kernels to debug this here |
14 |
> are some instructions I created for this: |
15 |
> |
16 |
> As a test you might consider the following: |
17 |
> |
18 |
> mkdir /someplace |
19 |
> cd /someplace |
20 |
> git clone -b linux-4.9.y |
21 |
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git |
22 |
> . |
23 |
> mkdir /var/tmp/linux |
24 |
> cp /path/to/config /var/tmp/linux/.config |
25 |
> make O=/var/tmp/linux oldconfig |
26 |
> make O=/var/tmp/linux -j# |
27 |
> |
28 |
> That will build the latest stable upstream kernel. |
29 |
> |
30 |
> Depending on what you find you can do: |
31 |
> git checkout v4.9.76 |
32 |
> rm -r /var/tmp/linux |
33 |
> mkdir /var/tmp/linux |
34 |
> cp /path/to/config /var/tmp/linux/.config |
35 |
> make O=/var/tmp/linux oldconfig |
36 |
> make O=/var/tmp/linux -j# |
37 |
> |
38 |
> That will see if 4.9.76 fails. You could also substitute any version |
39 |
> you want (including a 4.14 kernel, or an earlier 4.9 kernel). This |
40 |
> will give you a sense of whether your toolchain is just entirely |
41 |
> broken, or if there is an issue with the objtool changes. |
42 |
> |
43 |
> Note that you can build away as much as you want without having to |
44 |
> install any of this - so it won't affect your system at all. In fact, |
45 |
> the instructions above will work just fine if you run them as |
46 |
> non-root, as long as you clone the git sources and put the temp |
47 |
> directory someplace your non-root user has access to. |
48 |
> |
49 |
|
50 |
Tried this ... and here are the steps followed and results : |
51 |
Note : |
52 |
CPU defined as K8, NO vendor support for Intel or Centaur, AMD only. |
53 |
gcc && binutils are both current stable, both r1's. Tested and working. |
54 |
Both Disabled in 'menuconfig' : |
55 |
> [ ] Avoid speculative indirect branches in kernel |
56 |
> [ ] Remove the kernel mapping in user mode |
57 |
The steps followed : |
58 |
----- |
59 |
mkdir /opt/compile |
60 |
cd /opt/compile |
61 |
git clone -b linux-4.9.y |
62 |
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git |
63 |
renamed 'linux-stable' to 'linux-4.9.77' |
64 |
ln -s /opt/compile/linux-4.9.77 linux |
65 |
cd /opt/compile/linux |
66 |
make menuconfig |
67 |
mkdir /var/tmp/linux |
68 |
cp /opt/compile/linux/.config /var/tmp/linux/.config |
69 |
make O=/var/tmp/linux oldconfig |
70 |
make O=/var/tmp/linux -j9 |
71 |
----- |
72 |
The results ( first pass ) : |
73 |
|
74 |
> HOSTCC arch/x86/tools/relocs_64.o |
75 |
> HOSTCC arch/x86/tools/relocs_common.o |
76 |
> Using /opt/compile/linux-4.9.77 as source for kernel |
77 |
> /opt/compile/linux-4.9.77 is not clean, please run 'make mrproper' |
78 |
> in the '/opt/compile/linux-4.9.77' directory. |
79 |
> make[1]: *** [/opt/compile/linux-4.9.77/Makefile:1021: prepare3] Error 1 |
80 |
> make[1]: *** Waiting for unfinished jobs.... |
81 |
> HOSTLD arch/x86/tools/relocs |
82 |
> make[1]: Leaving directory '/var/tmp/linux' |
83 |
> make: *** [Makefile:150: sub-make] Error 2 |
84 |
|
85 |
So ... I ran 'make mrproper' in '/opt/compile/linux-4.9.77/' |
86 |
The result : |
87 |
|
88 |
> HOSTCC arch/x86/tools/relocs_64.o |
89 |
> HOSTCC arch/x86/tools/relocs_common.o |
90 |
> Using /opt/compile/linux-4.9.77 as source for kernel |
91 |
> /opt/compile/linux-4.9.77 is not clean, please run 'make mrproper' |
92 |
> in the '/opt/compile/linux-4.9.77' directory. |
93 |
> make[1]: *** [/opt/compile/linux-4.9.77/Makefile:1021: prepare3] Error 1 |
94 |
> make[1]: *** Waiting for unfinished jobs.... |
95 |
> HOSTLD arch/x86/tools/relocs |
96 |
> make[1]: Leaving directory '/var/tmp/linux' |
97 |
> make: *** [Makefile:150: sub-make] Error 2 |
98 |
|
99 |
Something is not right .... |
100 |
HOSTCC arch/x86/tools/relocs_64.o |
101 |
HOSTCC arch/x86/tools/relocs_common.o |
102 |
HOSTLD arch/x86/tools/relocs |
103 |
Is this the 'Spectre/Meltdown' patches again?!? |
104 |
|
105 |
Corbin |