I've fixed syscall generation for rump code, adding proper support for syscall name aliases for userland. I've decided to rename the __pollts50 syscall to ppoll using a syscall alias. This means that the kernel & rump uses internally the __pollts50, but it exports to userland the new aliased version (SYS_ppoll, sys_rump_ppoll, etc). This is a good exercise before next libc major bump as we might want to alias the syscall names for all the versioned syscalls. Here is the code that: 1. Adds alias __pollts50 -> ppoll 2. Regenerates the syscalls. 3. Adds alias __pollts50 -> ppoll in compat32 4. Regenerates the syscalls in compat32 5. Switches userland from pollts to ppoll. On next libc major bump we will remove libc occurrences of pollts. I've marked pollts as deprecated to warn users and switch to ppoll in new code. http://netbsd.org/~kamil/patch-00264-ppoll-0001-Alias-__pollts50-to-ppoll.patch.txt http://netbsd.org/~kamil/patch-00264-ppoll-0002-Regenerate-syscalls.patch.txt http://netbsd.org/~kamil/patch-00264-ppoll-0003-Alias-netbsd32___pollts50-to-netbsd32_ppoll.patch.txt http://netbsd.org/~kamil/patch-00264-ppoll-0004-Regenerate-syscalls.patch.txt http://netbsd.org/~kamil/patch-00264-ppoll-0005-Rename-pollts-to-ppoll.patch.txt Is this OK to merge? On 01.06.2020 18:26, Kamil Rytarowski wrote: > On 01.06.2020 18:20, Kamil Rytarowski wrote: >> On 01.06.2020 18:03, Joerg Sonnenberger wrote: >>> On Tue, May 26, 2020 at 06:50:32AM +0200, Martin Husemann wrote: >>>> On Tue, May 26, 2020 at 01:37:41AM +0200, Kamil Rytarowski wrote: >>>>> I agree here with Joerg. >>>>> >>>>> At this point it's good to just add a wrapper as in the proposed patch. >>>>> Once we will bump libc major, we can rename the syscall and remove >>>>> pollts references. >>>>> >>>>> Weak alias would still be nicer, but it might be not worth the >>>>> complexity of tweaking the syscall stab code generation. >>>>> >>>>> I think it's good to test t_pollts and t_ppoll as in theory they are >>>>> different APIs. Long term t_pollts can be removed, after libc major bump. >>>> >>>> I don't think it is that complex, see the already existing >>>> >>>> /* >>>> * WSYSCALL(weak,strong) is like RSYSCALL(weak), except that weak is >>>> * a weak internal alias for the strong symbol. >>>> */ >>>> >>>> (which is of course used for something totaly different right now, but >>>> should work for this case too) and probably all it would take is a >>>> special clause in lib/libc/sys/Makefile.inc. >>>> >>>> I would >>>> >>>> - rename the syscall >>>> - either make an alias for the old name or use a wrapper as suggested (but >>>> the other way around) >>>> - check if there is a good place for a SYS_... define and add that as >>>> an alias for syscall(2) >>>> - rename the uses in the test case (just like the syscal has been renamed) >>>> - add an entry in the libc TODO file for the mythical bump >>> >>> I'm quite against the useless churn of renaming the existing system >>> call. It doesn't add any value. It might make sense if ppoll was a >>> cancellation point, but it isn't and quite unlikely to become one. >>> This literally should be a two line change and nothing more. >>> >>> Joerg >>> >> >> While there. I have renamed universally all pollts occurrences to ppoll: >> >> http://netbsd.org/~kamil/patch-00263-pollts-rename-to-ppoll.2.txt >> >> IMHO keeping concurrently pollts + ppoll in kernel / rump / libc is >> confusing, so I prefer to rename old and new pollts syscall occurrences. >> >> There are open questions whether to rename SYS___pollts50 to SYS_ppoll >> and keep SYS_pollts for the legacy entry. Or rename two pollts syscalls, >> but only redirect ppoll to SYS___ppoll50. >> >> Personally, I prefer to avoid WEAKASMPPOLL as a special case for >> pollts/ppoll. It's cleaner to implement a thin C function that wraps it. >> > > Regarding the cancellation point, pollts is used as one. I've added > ppoll to libpthread too. Why would pollts be one and ppoll not? >
Attachment:
signature.asc
Description: OpenPGP digital signature