[PATCH 2/6] powerpc: Provide syscall wrapper

Christophe Leroy christophe.leroy at csgroup.eu
Fri Jun 3 18:39:22 AEST 2022



Le 03/06/2022 à 09:09, Andrew Donnellan a écrit :
> On Fri, 2022-06-03 at 13:24 +1000, Rohan McLure wrote:
>> The implementation of ppc_personality can be immediately reworked to
>> call ksys_personality, but I can’t do the same for sys_old_select for
>> example, which is required to implement ppc_select. As such we emit
>> both
> 
> For ppc_select, I suggest we resurrect
> https://lore.kernel.org/lkml/5811950d-ef14-d416-35e6-d694ef920a7d@csgroup.eu/T/#u
> and just get rid of the hack.
> 

Not sure I understand, what would you like to resurrect ? You want to 
resurrect the discussion, or revert commit fd69d544b0e7 
("powerpc/syscalls: Use sys_old_select() in ppc_select()") ?

We are talking about a 25 years old ack ....

However calling sys_old_select() from ppc_select() is just a tail call 
so I can't see why it would require duplicating the pt_regs.

c0004ddc <ppc_select>:
c0004ddc:       28 03 0f ff     cmplwi  r3,4095
c0004de0:       41 81 00 08     bgt     c0004de8 <ppc_select+0xc>
c0004de4:       48 15 b9 98     b       c016077c <__se_sys_select>
c0004de8:       48 15 bc c0     b       c0160aa8 <__se_sys_old_select>

Christophe


More information about the Linuxppc-dev mailing list