Hi, Martin Str|mberg wrote:> Given David's last report the part: > - jmp 1f > + jmp 2f > 1: > + xor %cx, %cx /* Clear EBIOS flag. */ > +2: > > can be ignored. His BIOS isn't corrputing CX (which I > thought). However that part doesn't hurt if it remains.I think it still has good reason to exist. The test cmpw $0xaa55, %bx jne 1f could cause a jump which could push a non-zero CX to the stack. (Whatever reason there might be not to get the 0xaa55 signature but to get non-zero CX.) I have now updated the Debian bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857597#55 Have a nice day :) Thomas
On Sat, Mar 25, 2017 at 09:28:16PM +0100, Thomas Schmitt via Syslinux wrote:> I think it still has good reason to exist. The test > > cmpw $0xaa55, %bx > jne 1f > > could cause a jump which could push a non-zero CX to the stack.Yes. But that can be fixed by putting the "andw $1, %cx" test before the "cmpw $0xaa55, %bx" test. But then if CX is filled with rubbish and carry is set (the first test) could lead to 0 != CX... I have no idea if this can happen. As you say, as is is the most safe. -- MartinS
Thomas wrote:> I think it still has good reason to exist.Would you please clarify what do you mean with "it"? What exactly should exist? By "it", do you mean the original code, or the patch? Do you mean that the original code (in this section of the file) should remain as it was/is, without applying the relevant part of Martin's patch? Or instead, do you mean that the relevant section of the patch should remain, so the resulting code should be different than it has been for the last few years? Martin wrote:> > As you say, as is is the most safe.Please clarify, what exactly are you referring to with "as is"? Should the whole patch be applied? Or only the first part of the patch should be applied while the second part should be skipped, leaving the second section of the code as it used to be during the last few years? After reverting the last commit 48e94f4fa... (the one with the wrong patch, the one that triggered Geert's question), perhaps there should be 2 separate commits applying the 2 sections of the last valid patch separately? Regards, Ady.