mbox series

[v5,0/6] arm64: vdso32: Address various issues

Message ID 20191003174838.8872-1-vincenzo.frascino@arm.com (mailing list archive)
Headers show
Series arm64: vdso32: Address various issues | expand

Message

Vincenzo Frascino Oct. 3, 2019, 5:48 p.m. UTC
This patch series is meant to address the various compilation issues
reported recently for arm64 vdso32 [1].

From v4, the series contains a cleanup of lib/vdso Kconfig as well since
CROSS_COMPILE_COMPAT_VDSO is not required anymore by any architecture.

Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

[1] https://www.spinics.net/lists/kernel/msg3260702.html

---

v5:
  - Add a check on empty CROSS_COMPILE_COMPAT

v4:
  - Drop __arm64__ workaround
  - Remove COMPAT_CC_IS_GCC check
  - Remove unused configuration parameter from lib/vdso
  - Address Review Comments

v3:
  - Exposed COMPATCC
  - Addressed Review Comments
 
v2:
  - Fixed binutils detection
  - Addressed review comments

Vincenzo Frascino (6):
  arm64: vdso32: Fix syncconfig errors.
  arm64: vdso32: Detect binutils support for dmb ishld
  arm64: Remove gettimeofday.S
  arm64: vdso32: Remove jump label config option in Makefile
  arm64: Remove vdso_datapage.h
  lib: vdso: Remove CROSS_COMPILE_COMPAT_VDSO

 arch/arm64/Kconfig                           |  5 ++-
 arch/arm64/Makefile                          | 18 +++--------
 arch/arm64/include/asm/vdso/compat_barrier.h |  2 +-
 arch/arm64/include/asm/vdso_datapage.h       | 33 --------------------
 arch/arm64/kernel/vdso/gettimeofday.S        |  0
 arch/arm64/kernel/vdso32/Makefile            | 14 ++++++---
 lib/vdso/Kconfig                             |  9 ------
 7 files changed, 19 insertions(+), 62 deletions(-)
 delete mode 100644 arch/arm64/include/asm/vdso_datapage.h
 delete mode 100644 arch/arm64/kernel/vdso/gettimeofday.S

Comments

Will Deacon Oct. 7, 2019, 1:31 p.m. UTC | #1
Hi Vincenzo,

On Thu, Oct 03, 2019 at 06:48:32PM +0100, Vincenzo Frascino wrote:
> This patch series is meant to address the various compilation issues
> reported recently for arm64 vdso32 [1].
> 
> From v4, the series contains a cleanup of lib/vdso Kconfig as well since
> CROSS_COMPILE_COMPAT_VDSO is not required anymore by any architecture.

I've queued this up as fixes for 5.4, but I ended up making quite a few
additional changes to address some other issues and minor inconsistencies
I ran into. In particular, with my changes, you can now easily build the
kernel with clang but the compat vDSO with gcc. The header files still need
sorting out properly, but I think this is a decent starting point:

https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/fixes

Please have a look.

Will
Vincenzo Frascino Oct. 7, 2019, 1:54 p.m. UTC | #2
Hi Will,

On 07/10/2019 14:31, Will Deacon wrote:
> Hi Vincenzo,
> 
> On Thu, Oct 03, 2019 at 06:48:32PM +0100, Vincenzo Frascino wrote:
>> This patch series is meant to address the various compilation issues
>> reported recently for arm64 vdso32 [1].
>>
>> From v4, the series contains a cleanup of lib/vdso Kconfig as well since
>> CROSS_COMPILE_COMPAT_VDSO is not required anymore by any architecture.
> 
> I've queued this up as fixes for 5.4, but I ended up making quite a few
> additional changes to address some other issues and minor inconsistencies
> I ran into. In particular, with my changes, you can now easily build the
> kernel with clang but the compat vDSO with gcc. The header files still need
> sorting out properly, but I think this is a decent starting point:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/fixes
> 
> Please have a look.
> 

Thank you for letting me know, I will have a look.

I see acked-by Catalin on the patches, did you post them in review somewhere? I
could not find them. Sorry

> Will
>
Will Deacon Oct. 7, 2019, 2:15 p.m. UTC | #3
On Mon, Oct 07, 2019 at 02:54:29PM +0100, Vincenzo Frascino wrote:
> On 07/10/2019 14:31, Will Deacon wrote:
> > On Thu, Oct 03, 2019 at 06:48:32PM +0100, Vincenzo Frascino wrote:
> >> This patch series is meant to address the various compilation issues
> >> reported recently for arm64 vdso32 [1].
> >>
> >> From v4, the series contains a cleanup of lib/vdso Kconfig as well since
> >> CROSS_COMPILE_COMPAT_VDSO is not required anymore by any architecture.
> > 
> > I've queued this up as fixes for 5.4, but I ended up making quite a few
> > additional changes to address some other issues and minor inconsistencies
> > I ran into. In particular, with my changes, you can now easily build the
> > kernel with clang but the compat vDSO with gcc. The header files still need
> > sorting out properly, but I think this is a decent starting point:
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/fixes
> > 
> > Please have a look.
> > 
> 
> Thank you for letting me know, I will have a look.

Thanks.

> I see acked-by Catalin on the patches, did you post them in review somewhere? I
> could not find them. Sorry

I pushed them out to a temporary vdso branch on Friday and Catalin looked at
that. If you'd like me to post them as well, please let me know, although
I'm keen to get this stuff sorted out by -rc3 without disabling the compat
vDSO altogether (i.e. [1]). In other words, if you're ok with my changes on
top of yours then let's go for that, otherwise let's punt this to 5.5 and
try to fix the header mess at the same time.

Will

[1] https://lkml.kernel.org/r/20190925130926.50674-1-catalin.marinas@arm.com
Vincenzo Frascino Oct. 7, 2019, 2:37 p.m. UTC | #4
On 07/10/2019 15:15, Will Deacon wrote:
> On Mon, Oct 07, 2019 at 02:54:29PM +0100, Vincenzo Frascino wrote:
>> On 07/10/2019 14:31, Will Deacon wrote:
>>> On Thu, Oct 03, 2019 at 06:48:32PM +0100, Vincenzo Frascino wrote:
>>>> This patch series is meant to address the various compilation issues
>>>> reported recently for arm64 vdso32 [1].
>>>>
>>>> From v4, the series contains a cleanup of lib/vdso Kconfig as well since
>>>> CROSS_COMPILE_COMPAT_VDSO is not required anymore by any architecture.
>>>
>>> I've queued this up as fixes for 5.4, but I ended up making quite a few
>>> additional changes to address some other issues and minor inconsistencies
>>> I ran into. In particular, with my changes, you can now easily build the
>>> kernel with clang but the compat vDSO with gcc. The header files still need
>>> sorting out properly, but I think this is a decent starting point:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/fixes
>>>
>>> Please have a look.
>>>
>>
>> Thank you for letting me know, I will have a look.
> 
> Thanks.
> 
>> I see acked-by Catalin on the patches, did you post them in review somewhere? I
>> could not find them. Sorry
> 
> I pushed them out to a temporary vdso branch on Friday and Catalin looked at
> that. If you'd like me to post them as well, please let me know, although
> I'm keen to get this stuff sorted out by -rc3 without disabling the compat
> vDSO altogether (i.e. [1]). In other words, if you're ok with my changes on
> top of yours then let's go for that, otherwise let's punt this to 5.5 and
> try to fix the header mess at the same time.
> 

No need to repost them. I just got confused by the fact that they got acked and
I could not find them anywhere, hence my question.

I am keen to sort this thing as well, my personal preference is to not disable
compat vdso in 5.4.

I will download your tree, have a look at it and let you know my thoughts.

> Will
> 
> [1] https://lkml.kernel.org/r/20190925130926.50674-1-catalin.marinas@arm.com
>
Vincenzo Frascino Oct. 7, 2019, 5:48 p.m. UTC | #5
Hi Will,

On 07/10/2019 15:37, Vincenzo Frascino wrote:
> On 07/10/2019 15:15, Will Deacon wrote:
>> On Mon, Oct 07, 2019 at 02:54:29PM +0100, Vincenzo Frascino wrote:
>>> On 07/10/2019 14:31, Will Deacon wrote:
>>>> On Thu, Oct 03, 2019 at 06:48:32PM +0100, Vincenzo Frascino wrote:
>>>>> This patch series is meant to address the various compilation issues
>>>>> reported recently for arm64 vdso32 [1].
>>>>>
>>>>> From v4, the series contains a cleanup of lib/vdso Kconfig as well since
>>>>> CROSS_COMPILE_COMPAT_VDSO is not required anymore by any architecture.
>>>>
>>>> I've queued this up as fixes for 5.4, but I ended up making quite a few
>>>> additional changes to address some other issues and minor inconsistencies
>>>> I ran into. In particular, with my changes, you can now easily build the
>>>> kernel with clang but the compat vDSO with gcc. The header files still need
>>>> sorting out properly, but I think this is a decent starting point:
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/fixes
>>>>
>>>> Please have a look.
>>>>
>>>
>>> Thank you for letting me know, I will have a look.
>>
>> Thanks.
>>
>>> I see acked-by Catalin on the patches, did you post them in review somewhere? I
>>> could not find them. Sorry
>>
>> I pushed them out to a temporary vdso branch on Friday and Catalin looked at
>> that. If you'd like me to post them as well, please let me know, although
>> I'm keen to get this stuff sorted out by -rc3 without disabling the compat
>> vDSO altogether (i.e. [1]). In other words, if you're ok with my changes on
>> top of yours then let's go for that, otherwise let's punt this to 5.5 and
>> try to fix the header mess at the same time.
>>
> 
> No need to repost them. I just got confused by the fact that they got acked and
> I could not find them anywhere, hence my question.
> 
> I am keen to sort this thing as well, my personal preference is to not disable
> compat vdso in 5.4.
> 
> I will download your tree, have a look at it and let you know my thoughts.
> 

I tested your patches and they look fine to me. I have just one request, in the
commit message of patch were you rename COMPATCC to CC_COMPAT could you please
add the make command with the update variable?

   $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
        CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- CC=clang \
        CC_COMPAT=arm-linux-gnueabihf-gcc

It took me a while to understand that the command in the commit message
(c71e88c43796 "arm64: vdso32: Don't use KBUILD_CPPFLAGS unconditionally") was
not working because of the renaming.

Thanks!

If it is not too late you can add my reviewed-by and tested-by ;)

>> Will
>>
>> [1] https://lkml.kernel.org/r/20190925130926.50674-1-catalin.marinas@arm.com
>>
>
Will Deacon Oct. 8, 2019, 9:07 a.m. UTC | #6
On Mon, Oct 07, 2019 at 06:48:00PM +0100, Vincenzo Frascino wrote:
> On 07/10/2019 15:37, Vincenzo Frascino wrote:
> > On 07/10/2019 15:15, Will Deacon wrote:
> >> On Mon, Oct 07, 2019 at 02:54:29PM +0100, Vincenzo Frascino wrote:
> >>> On 07/10/2019 14:31, Will Deacon wrote:
> >>>> I've queued this up as fixes for 5.4, but I ended up making quite a few
> >>>> additional changes to address some other issues and minor inconsistencies
> >>>> I ran into. In particular, with my changes, you can now easily build the
> >>>> kernel with clang but the compat vDSO with gcc. The header files still need
> >>>> sorting out properly, but I think this is a decent starting point:
> >>>>
> >>>> https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/log/?h=for-next/fixes
> >>>>
> >>>> Please have a look.
> >>>>
> >>>
> >>> Thank you for letting me know, I will have a look.
> >>
> >> Thanks.
> >>
> >>> I see acked-by Catalin on the patches, did you post them in review somewhere? I
> >>> could not find them. Sorry
> >>
> >> I pushed them out to a temporary vdso branch on Friday and Catalin looked at
> >> that. If you'd like me to post them as well, please let me know, although
> >> I'm keen to get this stuff sorted out by -rc3 without disabling the compat
> >> vDSO altogether (i.e. [1]). In other words, if you're ok with my changes on
> >> top of yours then let's go for that, otherwise let's punt this to 5.5 and
> >> try to fix the header mess at the same time.
> >>
> > 
> > No need to repost them. I just got confused by the fact that they got acked and
> > I could not find them anywhere, hence my question.
> > 
> > I am keen to sort this thing as well, my personal preference is to not disable
> > compat vdso in 5.4.
> > 
> > I will download your tree, have a look at it and let you know my thoughts.
> > 
> 
> I tested your patches and they look fine to me. I have just one request, in the
> commit message of patch were you rename COMPATCC to CC_COMPAT could you please
> add the make command with the update variable?
> 
>    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
>         CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- CC=clang \
>         CC_COMPAT=arm-linux-gnueabihf-gcc
> 
> It took me a while to understand that the command in the commit message
> (c71e88c43796 "arm64: vdso32: Don't use KBUILD_CPPFLAGS unconditionally") was
> not working because of the renaming.
> 
> Thanks!
> 
> If it is not too late you can add my reviewed-by and tested-by ;)

Thanks, Vincenzo. I'd prefer not to rebase that branch, but I'll mention
your tags in the pull request so they may end up in the merge commit.

Will