diff options
author | YiFei Zhu <zhuyifei1999@gmail.com> | 2018-11-29 18:12:30 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-11-30 09:05:13 +0100 |
commit | 79c2206d369b87b19ac29cb47601059b6bf5c291 (patch) | |
tree | d7accafede02c72d7c8e3514a30700728fe86641 /lib/test_memcat_p.c | |
parent | b84a64fad40637b1c9fa4f4dbf847a23e29e672b (diff) | |
download | linux-stable-79c2206d369b87b19ac29cb47601059b6bf5c291.tar.gz linux-stable-79c2206d369b87b19ac29cb47601059b6bf5c291.tar.bz2 linux-stable-79c2206d369b87b19ac29cb47601059b6bf5c291.zip |
x86/earlyprintk/efi: Fix infinite loop on some screen widths
An affected screen resolution is 1366 x 768, which width is not
divisible by 8, the default font width. On such screens, when longer
lines are earlyprintk'ed, overflow-to-next-line can never trigger,
due to the left-most x-coordinate of the next character always less
than the screen width. Earlyprintk will infinite loop in trying to
print the rest of the string but unable to, due to the line being
full.
This patch makes the trigger consider the right-most x-coordinate,
instead of left-most, as the value to compare against the screen
width threshold.
Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arend van Spriel <arend.vanspriel@broadcom.com>
Cc: Bhupesh Sharma <bhsharma@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Eric Snowberg <eric.snowberg@oracle.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jon Hunter <jonathanh@nvidia.com>
Cc: Julien Thierry <julien.thierry@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20181129171230.18699-12-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/test_memcat_p.c')
0 files changed, 0 insertions, 0 deletions