]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
gcc-9: properly declare the {pv,hv}clock_page storage
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 May 2019 18:20:53 +0000 (11:20 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit2ec6d5410050c30ef7d0a0427e025044ec129859
tree782c6efb195d7f98cbaada54c8e4c87f51673eed
parent3f706ee2eb367733b50009cecb3d3304e7b7ba8c
gcc-9: properly declare the {pv,hv}clock_page storage

BugLink: https://bugs.launchpad.net/bugs/1839376
commit 459e3a21535ae3c7a9a123650e54f5c882b8fcbf upstream.

The pvlock_page and hvclock_page variables are (as the name implies)
addresses to pages, created by the linker script.

But we declared them as just "extern u8" variables, which _works_, but
now that gcc does some more bounds checking, it causes warnings like

    warning: array subscript 1 is outside array bounds of ‘u8[1]’

when we then access more than one byte from those variables.

Fix this by simply making the declaration of the variables match
reality, which makes the compiler happy too.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/entry/vdso/vclock_gettime.c