* Re: [linux-stable-rc:linux-5.10.y 7082/7120] arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
[not found] <202207130531.SkRjrrn8-lkp@intel.com>
@ 2022-07-13 22:50 ` Ben Hutchings
2022-07-14 6:49 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Ben Hutchings @ 2022-07-13 22:50 UTC (permalink / raw)
To: kernel test robot
Cc: Peter Zijlstra, kbuild-all, linux-kernel, Greg Kroah-Hartman,
Borislav Petkov, Josh Poimboeuf, Thadeu Lima de Souza Cascardo,
stable
[-- Attachment #1: Type: text/plain, Size: 2609 bytes --]
On Wed, Jul 13, 2022 at 05:38:47AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> head: 53b881e19526bcc3e51d9668cab955c80dcf584c
> commit: 7575d3f3bbd1c68d6833b45d1b98ed182832bd44 [7082/7120] x86: Use return-thunk in asm code
> config: x86_64-rhel-8.3-syz (https://download.01.org/0day-ci/archive/20220713/202207130531.SkRjrrn8-lkp@intel.com/config)
> compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> git fetch --no-tags linux-stable-rc linux-5.10.y
> git checkout 7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
> >> arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp
Please add the following patch to fix this. This would also be
needed for 5.15-stable.
Ben.
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 14 Jul 2022 00:39:33 +0200
Subject: [PATCH] x86/xen: Fix initialisation in hypercall_page after rethunk
The hypercall_page is special and the RETs there should not be changed
into rethunk calls (but can have SLS mitigation). Change the initial
instructions to ret + int3 padding, as was done in upstream commit
5b2fc51576ef "x86/ibt,xen: Sprinkle the ENDBR".
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/x86/xen/xen-head.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
index 38b73e7e54ba..2a3ef5fcba34 100644
--- a/arch/x86/xen/xen-head.S
+++ b/arch/x86/xen/xen-head.S
@@ -69,9 +69,9 @@ SYM_CODE_END(asm_cpu_bringup_and_idle)
SYM_CODE_START(hypercall_page)
.rept (PAGE_SIZE / 32)
UNWIND_HINT_FUNC
- .skip 31, 0x90
ANNOTATE_UNRET_SAFE
- RET
+ ret
+ .skip 31, 0xcc
.endr
#define HYPERCALL(n) \
--
Ben Hutchings
Always try to do things in chronological order;
it's less confusing that way.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [linux-stable-rc:linux-5.10.y 7082/7120] arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
2022-07-13 22:50 ` [linux-stable-rc:linux-5.10.y 7082/7120] arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction Ben Hutchings
@ 2022-07-14 6:49 ` Greg Kroah-Hartman
2022-07-14 8:28 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2022-07-14 6:49 UTC (permalink / raw)
To: Ben Hutchings
Cc: kernel test robot, Peter Zijlstra, kbuild-all, linux-kernel,
Borislav Petkov, Josh Poimboeuf, Thadeu Lima de Souza Cascardo,
stable
On Thu, Jul 14, 2022 at 12:50:16AM +0200, Ben Hutchings wrote:
> On Wed, Jul 13, 2022 at 05:38:47AM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> > head: 53b881e19526bcc3e51d9668cab955c80dcf584c
> > commit: 7575d3f3bbd1c68d6833b45d1b98ed182832bd44 [7082/7120] x86: Use return-thunk in asm code
> > config: x86_64-rhel-8.3-syz (https://download.01.org/0day-ci/archive/20220713/202207130531.SkRjrrn8-lkp@intel.com/config)
> > compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
> > reproduce (this is a W=1 build):
> > # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> > git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> > git fetch --no-tags linux-stable-rc linux-5.10.y
> > git checkout 7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> > # save the config file
> > mkdir build_dir && cp config build_dir/.config
> > make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/
> >
> > If you fix the issue, kindly add following tag where applicable
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
> >
> > --
> > 0-DAY CI Kernel Test Service
> > https://01.org/lkp
>
> Please add the following patch to fix this. This would also be
> needed for 5.15-stable.
>
> Ben.
>
> From: Ben Hutchings <ben@decadent.org.uk>
> Date: Thu, 14 Jul 2022 00:39:33 +0200
> Subject: [PATCH] x86/xen: Fix initialisation in hypercall_page after rethunk
>
> The hypercall_page is special and the RETs there should not be changed
> into rethunk calls (but can have SLS mitigation). Change the initial
> instructions to ret + int3 padding, as was done in upstream commit
> 5b2fc51576ef "x86/ibt,xen: Sprinkle the ENDBR".
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> arch/x86/xen/xen-head.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
> index 38b73e7e54ba..2a3ef5fcba34 100644
> --- a/arch/x86/xen/xen-head.S
> +++ b/arch/x86/xen/xen-head.S
> @@ -69,9 +69,9 @@ SYM_CODE_END(asm_cpu_bringup_and_idle)
> SYM_CODE_START(hypercall_page)
> .rept (PAGE_SIZE / 32)
> UNWIND_HINT_FUNC
> - .skip 31, 0x90
> ANNOTATE_UNRET_SAFE
> - RET
> + ret
> + .skip 31, 0xcc
> .endr
>
> #define HYPERCALL(n) \
>
>
That's really odd, I swear I tried this myself:
https://lore.kernel.org/r/Ys2jlGMqAe6+h1SX@kroah.com
I'll go queue this up and see if that solves the issue on my side. But
see Boris's comment about how this shouldn't be an issue in the end.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-stable-rc:linux-5.10.y 7082/7120] arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
2022-07-14 6:49 ` Greg Kroah-Hartman
@ 2022-07-14 8:28 ` Greg Kroah-Hartman
2022-07-14 8:45 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2022-07-14 8:28 UTC (permalink / raw)
To: Ben Hutchings
Cc: kernel test robot, Peter Zijlstra, kbuild-all, linux-kernel,
Borislav Petkov, Josh Poimboeuf, Thadeu Lima de Souza Cascardo,
stable
On Thu, Jul 14, 2022 at 08:49:09AM +0200, Greg Kroah-Hartman wrote:
> On Thu, Jul 14, 2022 at 12:50:16AM +0200, Ben Hutchings wrote:
> > On Wed, Jul 13, 2022 at 05:38:47AM +0800, kernel test robot wrote:
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> > > head: 53b881e19526bcc3e51d9668cab955c80dcf584c
> > > commit: 7575d3f3bbd1c68d6833b45d1b98ed182832bd44 [7082/7120] x86: Use return-thunk in asm code
> > > config: x86_64-rhel-8.3-syz (https://download.01.org/0day-ci/archive/20220713/202207130531.SkRjrrn8-lkp@intel.com/config)
> > > compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
> > > reproduce (this is a W=1 build):
> > > # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> > > git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> > > git fetch --no-tags linux-stable-rc linux-5.10.y
> > > git checkout 7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> > > # save the config file
> > > mkdir build_dir && cp config build_dir/.config
> > > make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/
> > >
> > > If you fix the issue, kindly add following tag where applicable
> > > Reported-by: kernel test robot <lkp@intel.com>
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > > >> arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
> > >
> > > --
> > > 0-DAY CI Kernel Test Service
> > > https://01.org/lkp
> >
> > Please add the following patch to fix this. This would also be
> > needed for 5.15-stable.
> >
> > Ben.
> >
> > From: Ben Hutchings <ben@decadent.org.uk>
> > Date: Thu, 14 Jul 2022 00:39:33 +0200
> > Subject: [PATCH] x86/xen: Fix initialisation in hypercall_page after rethunk
> >
> > The hypercall_page is special and the RETs there should not be changed
> > into rethunk calls (but can have SLS mitigation). Change the initial
> > instructions to ret + int3 padding, as was done in upstream commit
> > 5b2fc51576ef "x86/ibt,xen: Sprinkle the ENDBR".
> >
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > arch/x86/xen/xen-head.S | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
> > index 38b73e7e54ba..2a3ef5fcba34 100644
> > --- a/arch/x86/xen/xen-head.S
> > +++ b/arch/x86/xen/xen-head.S
> > @@ -69,9 +69,9 @@ SYM_CODE_END(asm_cpu_bringup_and_idle)
> > SYM_CODE_START(hypercall_page)
> > .rept (PAGE_SIZE / 32)
> > UNWIND_HINT_FUNC
> > - .skip 31, 0x90
> > ANNOTATE_UNRET_SAFE
> > - RET
> > + ret
> > + .skip 31, 0xcc
> > .endr
> >
> > #define HYPERCALL(n) \
> >
> >
>
> That's really odd, I swear I tried this myself:
> https://lore.kernel.org/r/Ys2jlGMqAe6+h1SX@kroah.com
>
> I'll go queue this up and see if that solves the issue on my side. But
> see Boris's comment about how this shouldn't be an issue in the end.
Ah, yes, it does fix that warning, but causes this new one:
arch/x86/kernel/head_64.o: warning: objtool: .text+0x5: unreachable instruction
I'll keep your patch here, as it makes sense, but it does just exchange
one warning for another one...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-stable-rc:linux-5.10.y 7082/7120] arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
2022-07-14 8:28 ` Greg Kroah-Hartman
@ 2022-07-14 8:45 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2022-07-14 8:45 UTC (permalink / raw)
To: Ben Hutchings
Cc: kernel test robot, Peter Zijlstra, kbuild-all, linux-kernel,
Borislav Petkov, Josh Poimboeuf, Thadeu Lima de Souza Cascardo,
stable
On Thu, Jul 14, 2022 at 10:28:54AM +0200, Greg Kroah-Hartman wrote:
> On Thu, Jul 14, 2022 at 08:49:09AM +0200, Greg Kroah-Hartman wrote:
> > On Thu, Jul 14, 2022 at 12:50:16AM +0200, Ben Hutchings wrote:
> > > On Wed, Jul 13, 2022 at 05:38:47AM +0800, kernel test robot wrote:
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.10.y
> > > > head: 53b881e19526bcc3e51d9668cab955c80dcf584c
> > > > commit: 7575d3f3bbd1c68d6833b45d1b98ed182832bd44 [7082/7120] x86: Use return-thunk in asm code
> > > > config: x86_64-rhel-8.3-syz (https://download.01.org/0day-ci/archive/20220713/202207130531.SkRjrrn8-lkp@intel.com/config)
> > > > compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
> > > > reproduce (this is a W=1 build):
> > > > # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> > > > git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
> > > > git fetch --no-tags linux-stable-rc linux-5.10.y
> > > > git checkout 7575d3f3bbd1c68d6833b45d1b98ed182832bd44
> > > > # save the config file
> > > > mkdir build_dir && cp config build_dir/.config
> > > > make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/
> > > >
> > > > If you fix the issue, kindly add following tag where applicable
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > >
> > > > All warnings (new ones prefixed by >>):
> > > >
> > > > >> arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction
> > > >
> > > > --
> > > > 0-DAY CI Kernel Test Service
> > > > https://01.org/lkp
> > >
> > > Please add the following patch to fix this. This would also be
> > > needed for 5.15-stable.
> > >
> > > Ben.
> > >
> > > From: Ben Hutchings <ben@decadent.org.uk>
> > > Date: Thu, 14 Jul 2022 00:39:33 +0200
> > > Subject: [PATCH] x86/xen: Fix initialisation in hypercall_page after rethunk
> > >
> > > The hypercall_page is special and the RETs there should not be changed
> > > into rethunk calls (but can have SLS mitigation). Change the initial
> > > instructions to ret + int3 padding, as was done in upstream commit
> > > 5b2fc51576ef "x86/ibt,xen: Sprinkle the ENDBR".
> > >
> > > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > > ---
> > > arch/x86/xen/xen-head.S | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
> > > index 38b73e7e54ba..2a3ef5fcba34 100644
> > > --- a/arch/x86/xen/xen-head.S
> > > +++ b/arch/x86/xen/xen-head.S
> > > @@ -69,9 +69,9 @@ SYM_CODE_END(asm_cpu_bringup_and_idle)
> > > SYM_CODE_START(hypercall_page)
> > > .rept (PAGE_SIZE / 32)
> > > UNWIND_HINT_FUNC
> > > - .skip 31, 0x90
> > > ANNOTATE_UNRET_SAFE
> > > - RET
> > > + ret
> > > + .skip 31, 0xcc
> > > .endr
> > >
> > > #define HYPERCALL(n) \
> > >
> > >
> >
> > That's really odd, I swear I tried this myself:
> > https://lore.kernel.org/r/Ys2jlGMqAe6+h1SX@kroah.com
> >
> > I'll go queue this up and see if that solves the issue on my side. But
> > see Boris's comment about how this shouldn't be an issue in the end.
>
> Ah, yes, it does fix that warning, but causes this new one:
> arch/x86/kernel/head_64.o: warning: objtool: .text+0x5: unreachable instruction
>
> I'll keep your patch here, as it makes sense, but it does just exchange
> one warning for another one...
Odd, I get the build warning when I build locally, but on my build
server, that does this as a clean build, no warnings at all.
Let's see what the build systems say...
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-14 8:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202207130531.SkRjrrn8-lkp@intel.com>
2022-07-13 22:50 ` [linux-stable-rc:linux-5.10.y 7082/7120] arch/x86/kernel/head_64.o: warning: objtool: xen_hypercall_mmu_update(): can't find starting instruction Ben Hutchings
2022-07-14 6:49 ` Greg Kroah-Hartman
2022-07-14 8:28 ` Greg Kroah-Hartman
2022-07-14 8:45 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).