Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-30 Thread Segher Boessenkool
On Thu, Mar 31, 2022 at 12:21:03AM +1100, Michael Ellerman wrote:
> Michal Suchánek  writes:
> > On Mon, Mar 28, 2022 at 08:07:13PM +1100, Michael Ellerman wrote:
> >> Linus Torvalds  writes:
> >> > On Fri, Mar 25, 2022 at 3:25 AM Michael Ellerman  
> >> > wrote:
> >> 
> >> > That said:
> >> >
> >> >> There's a series of commits cleaning up function descriptor handling,
> >> >
> >> > For some reason I also thought that powerpc had actually moved away
> >> > from function descriptors, so I'm clearly not keeping up with the
> >> > times.
> >> 
> >> No you're right, we have moved away from them, but not entirely.
> >> 
> >> Functions descriptors are still used for 64-bit big endian, but they're
> >> not used for 64-bit little endian, or 32-bit.
> >
> > There was a patch to use ABIv2 for ppc64 big endian. I suppose that
> > would rid usof the gunction descriptors for good.
> 
> It would be nice.
> 
> The hesitation in the past was that the GNU toolchain developers don't
> officially support BE+ELFv2, though it is in use so it does work.

We do not officially support ELFv2 BE because there are no significant
users, so we cannot have the same confidence it works correctly.

It isn't tested often with GCC for example, mainly because it isn't
convenient to do without pre-packaged user space for it (and on the
other hand, there isn't much demand for it).

> > Maybe it's worth resurrecting?
> 
> Yeah maybe we should think about it again. If it builds with clang/lld
> that would be a real plus.

With GCC it should work fine still.  But no doubt you will find some
edge cases...  which you won't find until you try :-)


Segher


Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-30 Thread Arnd Bergmann
On Wed, Mar 30, 2022 at 3:21 PM Michael Ellerman  wrote:
> Michal Suchánek  writes:
> > On Mon, Mar 28, 2022 at 08:07:13PM +1100, Michael Ellerman wrote:
> >> No you're right, we have moved away from them, but not entirely.
> >>
> >> Functions descriptors are still used for 64-bit big endian, but they're
> >> not used for 64-bit little endian, or 32-bit.
> >
> > There was a patch to use ABIv2 for ppc64 big endian. I suppose that
> > would rid usof the gunction descriptors for good.
>
> It would be nice.
>
> The hesitation in the past was that the GNU toolchain developers don't
> officially support BE+ELFv2, though it is in use so it does work.

It clearly made sense to wait while BE+ELFv1 was commonly used and
well tested, but as that is getting less common each year, getting ELFv1
out of the picture would appear to make the setup less obscure, not more.

   Arnd


Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-30 Thread Michael Ellerman
Michal Suchánek  writes:
> On Mon, Mar 28, 2022 at 08:07:13PM +1100, Michael Ellerman wrote:
>> Linus Torvalds  writes:
>> > On Fri, Mar 25, 2022 at 3:25 AM Michael Ellerman  
>> > wrote:
>> 
>> > That said:
>> >
>> >> There's a series of commits cleaning up function descriptor handling,
>> >
>> > For some reason I also thought that powerpc had actually moved away
>> > from function descriptors, so I'm clearly not keeping up with the
>> > times.
>> 
>> No you're right, we have moved away from them, but not entirely.
>> 
>> Functions descriptors are still used for 64-bit big endian, but they're
>> not used for 64-bit little endian, or 32-bit.
>
> There was a patch to use ABIv2 for ppc64 big endian. I suppose that
> would rid usof the gunction descriptors for good.

It would be nice.

The hesitation in the past was that the GNU toolchain developers don't
officially support BE+ELFv2, though it is in use so it does work.

> Maybe it's worth resurrecting?

Yeah maybe we should think about it again. If it builds with clang/lld
that would be a real plus.

cheers


Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-30 Thread Michal Suchánek
On Mon, Mar 28, 2022 at 08:07:13PM +1100, Michael Ellerman wrote:
> Linus Torvalds  writes:
> > On Fri, Mar 25, 2022 at 3:25 AM Michael Ellerman  
> > wrote:

> 
> > That said:
> >
> >> There's a series of commits cleaning up function descriptor handling,
> >
> > For some reason I also thought that powerpc had actually moved away
> > from function descriptors, so I'm clearly not keeping up with the
> > times.
> 
> No you're right, we have moved away from them, but not entirely.
> 
> Functions descriptors are still used for 64-bit big endian, but they're
> not used for 64-bit little endian, or 32-bit.

There was a patch to use ABIv2 for ppc64 big endian. I suppose that
would rid usof the gunction descriptors for good.

Somehow the discussion of that change tralied off without any results.

Maybe it's worth resurrecting?

Thanks

Michal


Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-28 Thread Michael Ellerman
Linus Torvalds  writes:
> On Fri, Mar 25, 2022 at 3:25 AM Michael Ellerman  wrote:
>>
>> Livepatch support for 32-bit is probably the standout new feature, otherwise 
>> mostly just
>> lots of bits and pieces all over the board.
>
> Heh. I would have expected 32-bit ppc to be entirely legacy by now, so
> it's a bit surprising to see that being a standout feature.

We still get the odd bug report from people running mainline, or recent
stable kernels, on 32-bit.

And obviously Christophe has been doing lots of work on the Linux side,
so in that sense 32-bit is alive and well.

Having said that I don't think we'll see any new 32-bit CPU designs, so
the clock is slowly ticking.

> That said:
>
>> There's a series of commits cleaning up function descriptor handling,
>
> For some reason I also thought that powerpc had actually moved away
> from function descriptors, so I'm clearly not keeping up with the
> times.

No you're right, we have moved away from them, but not entirely.

Functions descriptors are still used for 64-bit big endian, but they're
not used for 64-bit little endian, or 32-bit.

cheers


Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-25 Thread pr-tracker-bot
The pull request you sent on Fri, 25 Mar 2022 21:25:02 +1100:

> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git 
> tags/powerpc-5.18-1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/1f1c153e406a7375ae0fc3d6000b64e7ba27cf8a

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html


Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-25 Thread Linus Torvalds
On Fri, Mar 25, 2022 at 3:25 AM Michael Ellerman  wrote:
>
> Livepatch support for 32-bit is probably the standout new feature, otherwise 
> mostly just
> lots of bits and pieces all over the board.

Heh. I would have expected 32-bit ppc to be entirely legacy by now, so
it's a bit surprising to see that being a standout feature.

That said:

> There's a series of commits cleaning up function descriptor handling,

For some reason I also thought that powerpc had actually moved away
from function descriptors, so I'm clearly not keeping up with the
times.

Anyway, unification in that odd area is all good. Pulled,

   Linus


[GIT PULL] Please pull powerpc/linux.git powerpc-5.18-1 tag

2022-03-25 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi Linus,

Please pull powerpc updates for 5.18.

Livepatch support for 32-bit is probably the standout new feature, otherwise 
mostly just
lots of bits and pieces all over the board.

There's a series of commits cleaning up function descriptor handling, which 
touches
a few other arches as well as LKDTM. It has acks from Arnd, Kees and Helge.

There's no conflicts with your current tree. There are two minor conflicts in 
linux-next,
one with the nvdimm tree[1] and the other with the tip tree[2].

cheers

1: https://lore.kernel.org/all/20220315191538.323ee...@canb.auug.org.au/
2: https://lore.kernel.org/all/20220315130857.4610e...@canb.auug.org.au/


Notable out of area changes:

  a257cacc3871 asm-generic: Define CONFIG_HAVE_FUNCTION_DESCRIPTORS:
arch/Kconfig
arch/ia64/Kconfig
arch/parisc/Kconfig
include/linux/kallsyms.h

  41a88b45479d ia64: Rename 'ip' to 'addr' in 'struct fdesc'
arch/ia64/include/asm/elf.h
arch/ia64/kernel/module.c

  e1478d8eaf27 asm-generic: Refactor dereference_[kernel]_function_descriptor()
arch/ia64/include/asm/sections.h
arch/parisc/include/asm/sections.h
arch/parisc/kernel/process.c
include/asm-generic/sections.h

  5e5a6c544165 lkdtm: Add a test for function descriptors protection
drivers/misc/lkdtm/core.c
drivers/misc/lkdtm/lkdtm.h
drivers/misc/lkdtm/perms.c
tools/testing/selftests/lkdtm/tests.txt

  kernel/extable.c  # b64913394f12 lkdtm: Really write into kernel 
text in WRITE_KERN
  kernel/livepatch/core.c   # 2f293651eca3 livepatch: Fix build failure on 
32 bits processors


The following changes since commit 26291c54e111ff6ba87a164d85d4a4e134b7315c:

  Linux 5.17-rc2 (2022-01-30 15:37:07 +0200)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git 
tags/powerpc-5.18-1

for you to fetch changes up to fe2640bd7a62f1f7c3f55fbda31084085075bc30:

  powerpc/pseries: Fix use after free in remove_phb_dynamic() (2022-03-21 
13:17:47 +1100)

- --
powerpc updates for 5.18

 - Enforce kernel RO, and implement STRICT_MODULE_RWX for 603.

 - Add support for livepatch to 32-bit.

 - Implement CONFIG_DYNAMIC_FTRACE_WITH_ARGS.

 - Merge vdso64 and vdso32 into a single directory.

 - Fix build errors with newer binutils.

 - Add support for UADDR64 relocations, which are emitted by some toolchains. 
This allows
   powerpc to build with the latest lld.

 - Fix (another) potential userspace r13 corruption in transactional memory 
handling.

 - Cleanups of function descriptor handling & related fixes to LKDTM.

Thanks to: Abdul Haleem, Alexey Kardashevskiy, Anders Roxell, Aneesh Kumar K.V, 
Anton
Blanchard, Arnd Bergmann, Athira Rajeev, Bhaskar Chowdhury, Cédric Le Goater, 
Chen
Jingwen, Christophe JAILLET, Christophe Leroy, Corentin Labbe, Daniel Axtens, 
Daniel
Henrique Barboza, David Dai, Fabiano Rosas, Ganesh Goudar, Guo Zhengkui, Hangyu 
Hua, Haren
Myneni, Hari Bathini, Igor Zhbanov, Jakob Koschel, Jason Wang, Jeremy Kerr, 
Joachim
Wiberg, Jordan Niethe, Julia Lawall, Kajol Jain, Kees Cook, Laurent Dufour, 
Madhavan
Srinivasan, Mamatha Inamdar, Maxime Bizon, Maxim Kiselev, Maxim Kochetkov, 
Michal
Suchanek, Nageswara R Sastry, Nathan Lynch, Naveen N. Rao, Nicholas Piggin, 
Nour-eddine
Taleb, Paul Menzel, Ping Fang, Pratik R. Sampat, Randy Dunlap, Ritesh Harjani, 
Rohan
McLure, Russell Currey, Sachin Sant, Segher Boessenkool, Shivaprasad G Bhat, 
Sourabh Jain,
Thierry Reding, Tobias Waldekranz, Tyrel Datwyler, Vaibhav Jain, Vladimir 
Oltean, Wedson
Almeida Filho, YueHaibing.

- --
Alexey Kardashevskiy (2):
  KVM: PPC: Merge powerpc's debugfs entry content into generic entry
  powerpc/64: Add UADDR64 relocation support

Anders Roxell (3):
  powerpc/lib/sstep: Fix 'sthcx' instruction
  powerpc: Fix build errors with newer binutils
  powerpc/lib/sstep: Fix build errors with newer binutils

Aneesh Kumar K.V (1):
  powerpc/mm: Update default hugetlb size early

Athira Rajeev (11):
  powerpc/perf: Don't use perf_hw_context for trace IMC PMU
  selftests/powerpc/pmu: Include mmap_buffer field as part of struct event
  selftests/powerpc/pmu: Add support for perf sampling tests
  selftests/powerpc/pmu: Add macro to extract mmcr0/mmcr1 fields
  selftests/powerpc/pmu/: Add interface test for mmcr0 exception bits
  selftests/powerpc/pmu/: Add interface test for mmcr0_cc56run field
  selftests/powerpc/pmu/: Add interface test for mmcr0_pmccext bit
  selftests/powerpc/pmu/: Add interface test for mmcr0_pmcjce field
  selftests/powerpc/pmu/: Add interface test for mmcr0_fc56 field using pmc1
  selftests/powerpc/pmu/: Add interface test for mmcr0_pmc56 using pmc5
  selftests/powerpc/pmu/: Add interface test for mmcr1_comb field

Bhaskar