Stable Archive on lore.kernel.org
 help / color / Atom feed
* stable-rc 5.4: arm64 build failed - error: ‘const struct arch_timer_erratum_workaround’ has no member named ‘disable_compat_vdso’
@ 2020-07-14 17:18 Naresh Kamboju
  2020-07-14 18:40 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Naresh Kamboju @ 2020-07-14 17:18 UTC (permalink / raw)
  To: linux- stable, lkft-triage
  Cc: Arnd Bergmann, Greg Kroah-Hartman, Sasha Levin, Will Deacon,
	Mark Rutland, Marc Zyngier

arm64 build failed on 5.4

make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu- HOSTCC=gcc CC="sccache
aarch64-linux-gnu-gcc" O=build Image
#
../drivers/clocksource/arm_arch_timer.c:484:4: error: ‘const struct
arch_timer_erratum_workaround’ has no member named
‘disable_compat_vdso’
  484 |   .disable_compat_vdso = true,
      |    ^~~~~~~~~~~~~~~~~~~
../drivers/clocksource/arm_arch_timer.c:484:26: warning:
initialization of ‘u32 (*)(void)’ {aka ‘unsigned int (*)(void)’} from
‘int’ makes pointer from integer without a cast [-Wint-conversion]
  484 |   .disable_compat_vdso = true,
      |                          ^~~~
../drivers/clocksource/arm_arch_timer.c:484:26: note: (near
initialization for ‘ool_workarounds[5].read_cntp_tval_el0’)

Could be this patch,
arm64: arch_timer: Disable the compat vdso for cores affected by
ARM64_WORKAROUND_1418040
commit 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f upstream.

ARM64_WORKAROUND_1418040 requires that AArch32 EL0 accesses to
the virtual counter register are trapped and emulated by the kernel.
This makes the vdso pretty pointless, and in some cases livelock
prone.

Provide a workaround entry that limits the vdso to 64bit tasks.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200706163802.1836732-4-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


ref:
https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/638094006

-- 
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: stable-rc 5.4: arm64 build failed - error: ‘const struct arch_timer_erratum_workaround’ has no member named ‘disable_compat_vdso’
  2020-07-14 17:18 stable-rc 5.4: arm64 build failed - error: ‘const struct arch_timer_erratum_workaround’ has no member named ‘disable_compat_vdso’ Naresh Kamboju
@ 2020-07-14 18:40 ` Greg Kroah-Hartman
  2020-07-15  6:54   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2020-07-14 18:40 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: linux- stable, lkft-triage, Arnd Bergmann, Sasha Levin,
	Will Deacon, Mark Rutland, Marc Zyngier

On Tue, Jul 14, 2020 at 10:48:14PM +0530, Naresh Kamboju wrote:
> arm64 build failed on 5.4
> 
> make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm64
> CROSS_COMPILE=aarch64-linux-gnu- HOSTCC=gcc CC="sccache
> aarch64-linux-gnu-gcc" O=build Image
> #
> ../drivers/clocksource/arm_arch_timer.c:484:4: error: ‘const struct
> arch_timer_erratum_workaround’ has no member named
> ‘disable_compat_vdso’
>   484 |   .disable_compat_vdso = true,
>       |    ^~~~~~~~~~~~~~~~~~~
> ../drivers/clocksource/arm_arch_timer.c:484:26: warning:
> initialization of ‘u32 (*)(void)’ {aka ‘unsigned int (*)(void)’} from
> ‘int’ makes pointer from integer without a cast [-Wint-conversion]
>   484 |   .disable_compat_vdso = true,
>       |                          ^~~~
> ../drivers/clocksource/arm_arch_timer.c:484:26: note: (near
> initialization for ‘ool_workarounds[5].read_cntp_tval_el0’)
> 
> Could be this patch,
> arm64: arch_timer: Disable the compat vdso for cores affected by
> ARM64_WORKAROUND_1418040
> commit 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f upstream.
> 
> ARM64_WORKAROUND_1418040 requires that AArch32 EL0 accesses to
> the virtual counter register are trapped and emulated by the kernel.
> This makes the vdso pretty pointless, and in some cases livelock
> prone.
> 
> Provide a workaround entry that limits the vdso to 64bit tasks.
> 
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> Cc: stable@vger.kernel.org
> Link: https://lore.kernel.org/r/20200706163802.1836732-4-maz@kernel.org
> Signed-off-by: Will Deacon <will@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> 
> ref:
> https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/638094006

Thanks, I've now dropped this patch.

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: stable-rc 5.4: arm64 build failed - error: ‘const struct arch_timer_erratum_workaround’ has no member named ‘disable_compat_vdso’
  2020-07-14 18:40 ` Greg Kroah-Hartman
@ 2020-07-15  6:54   ` Arnd Bergmann
  2020-07-15  9:27     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2020-07-15  6:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Naresh Kamboju, linux- stable, lkft-triage, Sasha Levin,
	Will Deacon, Mark Rutland, Marc Zyngier

On Tue, Jul 14, 2020 at 8:40 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Tue, Jul 14, 2020 at 10:48:14PM +0530, Naresh Kamboju wrote:
> > arm64 build failed on 5.4
> >
> > make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm64
> > CROSS_COMPILE=aarch64-linux-gnu- HOSTCC=gcc CC="sccache
> > aarch64-linux-gnu-gcc" O=build Image
> > #
> > ../drivers/clocksource/arm_arch_timer.c:484:4: error: ‘const struct
> > arch_timer_erratum_workaround’ has no member named
> > ‘disable_compat_vdso’
> >   484 |   .disable_compat_vdso = true,
> >       |    ^~~~~~~~~~~~~~~~~~~
> > ../drivers/clocksource/arm_arch_timer.c:484:26: warning:
> > initialization of ‘u32 (*)(void)’ {aka ‘unsigned int (*)(void)’} from
> > ‘int’ makes pointer from integer without a cast [-Wint-conversion]
> >   484 |   .disable_compat_vdso = true,
> >       |                          ^~~~
> > ../drivers/clocksource/arm_arch_timer.c:484:26: note: (near
> > initialization for ‘ool_workarounds[5].read_cntp_tval_el0’)
> >
> > Could be this patch,
> > arm64: arch_timer: Disable the compat vdso for cores affected by
> > ARM64_WORKAROUND_1418040
> > commit 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f upstream.
> >
> > ARM64_WORKAROUND_1418040 requires that AArch32 EL0 accesses to
> > the virtual counter register are trapped and emulated by the kernel.
> > This makes the vdso pretty pointless, and in some cases livelock
> > prone.
> >
> > Provide a workaround entry that limits the vdso to 64bit tasks.
> >
> > ref:
> > https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/638094006
>
> Thanks, I've now dropped this patch.

I think we do want to have it back eventually. It appears that the patch
upstream depends on the two immediately before it:

4b661d6133c5 arm64: arch_timer: Disable the compat vdso for cores
affected by ARM64_WORKAROUND_1418040
c1fbec4ac0d7 arm64: arch_timer: Allow an workaround descriptor to
disable compat vdso
97884ca8c292 arm64: Introduce a way to disable the 32bit vdso

AFAICT, the second one was missing, causing the build failure.
Do you know if that one needed a manual backport, or could you
try applying all three in sequence again?

      Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: stable-rc 5.4: arm64 build failed - error: ‘const struct arch_timer_erratum_workaround’ has no member named ‘disable_compat_vdso’
  2020-07-15  6:54   ` Arnd Bergmann
@ 2020-07-15  9:27     ` Greg Kroah-Hartman
  2020-07-15 10:16       ` Marc Zyngier
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2020-07-15  9:27 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Naresh Kamboju, linux- stable, lkft-triage, Sasha Levin,
	Will Deacon, Mark Rutland, Marc Zyngier

On Wed, Jul 15, 2020 at 08:54:33AM +0200, Arnd Bergmann wrote:
> On Tue, Jul 14, 2020 at 8:40 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Tue, Jul 14, 2020 at 10:48:14PM +0530, Naresh Kamboju wrote:
> > > arm64 build failed on 5.4
> > >
> > > make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm64
> > > CROSS_COMPILE=aarch64-linux-gnu- HOSTCC=gcc CC="sccache
> > > aarch64-linux-gnu-gcc" O=build Image
> > > #
> > > ../drivers/clocksource/arm_arch_timer.c:484:4: error: ‘const struct
> > > arch_timer_erratum_workaround’ has no member named
> > > ‘disable_compat_vdso’
> > >   484 |   .disable_compat_vdso = true,
> > >       |    ^~~~~~~~~~~~~~~~~~~
> > > ../drivers/clocksource/arm_arch_timer.c:484:26: warning:
> > > initialization of ‘u32 (*)(void)’ {aka ‘unsigned int (*)(void)’} from
> > > ‘int’ makes pointer from integer without a cast [-Wint-conversion]
> > >   484 |   .disable_compat_vdso = true,
> > >       |                          ^~~~
> > > ../drivers/clocksource/arm_arch_timer.c:484:26: note: (near
> > > initialization for ‘ool_workarounds[5].read_cntp_tval_el0’)
> > >
> > > Could be this patch,
> > > arm64: arch_timer: Disable the compat vdso for cores affected by
> > > ARM64_WORKAROUND_1418040
> > > commit 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f upstream.
> > >
> > > ARM64_WORKAROUND_1418040 requires that AArch32 EL0 accesses to
> > > the virtual counter register are trapped and emulated by the kernel.
> > > This makes the vdso pretty pointless, and in some cases livelock
> > > prone.
> > >
> > > Provide a workaround entry that limits the vdso to 64bit tasks.
> > >
> > > ref:
> > > https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/638094006
> >
> > Thanks, I've now dropped this patch.
> 
> I think we do want to have it back eventually. It appears that the patch
> upstream depends on the two immediately before it:
> 
> 4b661d6133c5 arm64: arch_timer: Disable the compat vdso for cores
> affected by ARM64_WORKAROUND_1418040
> c1fbec4ac0d7 arm64: arch_timer: Allow an workaround descriptor to
> disable compat vdso
> 97884ca8c292 arm64: Introduce a way to disable the 32bit vdso
> 
> AFAICT, the second one was missing, causing the build failure.
> Do you know if that one needed a manual backport, or could you
> try applying all three in sequence again?

The "first one", 97884ca8c292 ("arm64: Introduce a way to disable the
32bit vdso"), does not apply to 5.4.y, and neither does c1fbec4ac0d7
("arm64: arch_timer: Allow an workaround descriptor to disable compat
vdso").

So backports for all 3 would be appreciated.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: stable-rc 5.4: arm64 build failed - error: ‘const struct arch_timer_erratum_workaround’ has no member named ‘disable_compat_vdso’
  2020-07-15  9:27     ` Greg Kroah-Hartman
@ 2020-07-15 10:16       ` Marc Zyngier
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2020-07-15 10:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Arnd Bergmann, Naresh Kamboju, linux- stable, lkft-triage,
	Sasha Levin, Will Deacon, Mark Rutland

On 2020-07-15 10:27, Greg Kroah-Hartman wrote:
> On Wed, Jul 15, 2020 at 08:54:33AM +0200, Arnd Bergmann wrote:
>> On Tue, Jul 14, 2020 at 8:40 PM Greg Kroah-Hartman
>> <gregkh@linuxfoundation.org> wrote:
>> >
>> > On Tue, Jul 14, 2020 at 10:48:14PM +0530, Naresh Kamboju wrote:
>> > > arm64 build failed on 5.4
>> > >
>> > > make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm64
>> > > CROSS_COMPILE=aarch64-linux-gnu- HOSTCC=gcc CC="sccache
>> > > aarch64-linux-gnu-gcc" O=build Image
>> > > #
>> > > ../drivers/clocksource/arm_arch_timer.c:484:4: error: ‘const struct
>> > > arch_timer_erratum_workaround’ has no member named
>> > > ‘disable_compat_vdso’
>> > >   484 |   .disable_compat_vdso = true,
>> > >       |    ^~~~~~~~~~~~~~~~~~~
>> > > ../drivers/clocksource/arm_arch_timer.c:484:26: warning:
>> > > initialization of ‘u32 (*)(void)’ {aka ‘unsigned int (*)(void)’} from
>> > > ‘int’ makes pointer from integer without a cast [-Wint-conversion]
>> > >   484 |   .disable_compat_vdso = true,
>> > >       |                          ^~~~
>> > > ../drivers/clocksource/arm_arch_timer.c:484:26: note: (near
>> > > initialization for ‘ool_workarounds[5].read_cntp_tval_el0’)
>> > >
>> > > Could be this patch,
>> > > arm64: arch_timer: Disable the compat vdso for cores affected by
>> > > ARM64_WORKAROUND_1418040
>> > > commit 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f upstream.
>> > >
>> > > ARM64_WORKAROUND_1418040 requires that AArch32 EL0 accesses to
>> > > the virtual counter register are trapped and emulated by the kernel.
>> > > This makes the vdso pretty pointless, and in some cases livelock
>> > > prone.
>> > >
>> > > Provide a workaround entry that limits the vdso to 64bit tasks.
>> > >
>> > > ref:
>> > > https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/638094006
>> >
>> > Thanks, I've now dropped this patch.
>> 
>> I think we do want to have it back eventually. It appears that the 
>> patch
>> upstream depends on the two immediately before it:
>> 
>> 4b661d6133c5 arm64: arch_timer: Disable the compat vdso for cores
>> affected by ARM64_WORKAROUND_1418040
>> c1fbec4ac0d7 arm64: arch_timer: Allow an workaround descriptor to
>> disable compat vdso
>> 97884ca8c292 arm64: Introduce a way to disable the 32bit vdso
>> 
>> AFAICT, the second one was missing, causing the build failure.
>> Do you know if that one needed a manual backport, or could you
>> try applying all three in sequence again?
> 
> The "first one", 97884ca8c292 ("arm64: Introduce a way to disable the
> 32bit vdso"), does not apply to 5.4.y, and neither does c1fbec4ac0d7
> ("arm64: arch_timer: Allow an workaround descriptor to disable compat
> vdso").
> 
> So backports for all 3 would be appreciated.

These patches cannot just be backported, as 5.4 uses very different
data structures and abstractions. I'll try and come up with something
semantically equivalent by the end of the day...

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 17:18 stable-rc 5.4: arm64 build failed - error: ‘const struct arch_timer_erratum_workaround’ has no member named ‘disable_compat_vdso’ Naresh Kamboju
2020-07-14 18:40 ` Greg Kroah-Hartman
2020-07-15  6:54   ` Arnd Bergmann
2020-07-15  9:27     ` Greg Kroah-Hartman
2020-07-15 10:16       ` Marc Zyngier

Stable Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://lore.kernel.org/stable \
		stable@vger.kernel.org
	public-inbox-index stable

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git