2007-05-16 09:13:34

by Oliver Falk

[permalink] [raw]
Subject: [patch] Missing defines in asm-alpha/unistd.h!?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I believe this is missing... :-) I hope I understood NR_SYSCALLS
correctly and it's the number of defined syscals - as I added 20 of
them, I increased it by 20... Maybe someone can have a look if it's correct.

- --- linux-2.6.21/include/asm-alpha/unistd.h.missing_defines
2007-05-16 10:53:02.000000000 +0200
+++ linux-2.6.21/include/asm-alpha/unistd.h 2007-05-16
10:54:44.000000000 +0200
@@ -388,9 +388,30 @@
#define __NR_inotify_add_watch 445
#define __NR_inotify_rm_watch 446

+#define __NR_openat 447
+#define __NR_mkdirat 448
+#define __NR_mknodat 449
+#define __NR_fchownat 450
+#define __NR_futimesat 451
+#define __NR_unlinkat 452
+#define __NR_renameat 453
+#define __NR_linkat 454
+#define __NR_symlinkat 455
+#define __NR_readlinkat 456
+#define __NR_fchmodat 457
+#define __NR_faccessat 458
+#define __NR_pselect6 459
+#define __NR_ppoll 460
+#define __NR_unshare 461
+#define __NR_set_robust_list 462
+#define __NR_get_robust_list 463
+#define __NR_splice 464
+#define __NR_sync_file_range 465
+#define __NR_tee 466
+
#ifdef __KERNEL__

- -#define NR_SYSCALLS 447
+#define NR_SYSCALLS 467

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR

Best,
Oliver
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGSsdcxWN5Ge8lKUMRAruUAJ9SElaGQfpU/6f5pAUhM/m+DHUuOACgx3Au
7GvsNTJnlvIKdnOPrSZBWtc=
=h2CN
-----END PGP SIGNATURE-----


2007-05-16 09:41:59

by Oliver Falk

[permalink] [raw]
Subject: Re: [patch] Missing defines in asm-alpha/unistd.h!?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/16/2007 10:57 AM, Oliver Falk wrote:
> I believe this is missing... :-) I hope I understood NR_SYSCALLS
> correctly and it's the number of defined syscals - as I added 20 of
> them, I increased it by 20... Maybe someone can have a look if it's correct.
[ ... ]

Sorry, the patch was missing one hunk/file and also the tab stops where
wrong. Attached a new working version.

- -of
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGStDwxWN5Ge8lKUMRAp9pAJ9VWmpI5zSUmW4s99I/8YC0Cw60lgCgvIHR
iRRdK8OTSVMepjQbNRWfQYA=
=HexW
-----END PGP SIGNATURE-----


Attachments:
linux-2.6.21-alpha_missing_syscalls.patch (1.97 kB)

2007-05-16 11:20:07

by Oliver Falk

[permalink] [raw]
Subject: Re: [patch] Missing defines in asm-alpha/unistd.h!?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/16/2007 11:41 AM, Oliver Falk wrote:
> On 05/16/2007 10:57 AM, Oliver Falk wrote:
>> I believe this is missing... :-) I hope I understood NR_SYSCALLS
>> correctly and it's the number of defined syscals - as I added 20 of
>> them, I increased it by 20... Maybe someone can have a look if it's correct.
> [ ... ]
>
> Sorry, the patch was missing one hunk/file and also the tab stops where
> wrong. Attached a new working version.

But. The strange error that follows after patching:
ld -static -N -o .tmp_vmlinux1 -T arch/alpha/kernel/vmlinux.lds
arch/alpha/kernel/head.o init/built-in.o --start-group usr/built-in.o
arch/alpha/kernel/built-in.o arch/alpha/mm/built-in.o
arch/alpha/math-emu/built-in.o kernel/built-in.o mm/built-in.o
fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o
block/built-in.o lib/lib.a arch/alpha/lib/lib.a lib/built-in.o
arch/alpha/lib/built-in.o drivers/built-in.o sound/built-in.o
net/built-in.o --end-group
arch/alpha/kernel/built-in.o:(.data+0x2d60): undefined reference to
`sys_pselect6'
arch/alpha/kernel/built-in.o:(.data+0x2d68): undefined reference to
`sys_ppoll'

I don't understand this... Any clue(s)?

- -of
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGSujRxWN5Ge8lKUMRAmHsAJ0fBvA+IWhxzAu+d93XCwpgYD6aPACgw2Y1
/YjrC0BcDBUrSzrgXMzPJ2w=
=NGM9
-----END PGP SIGNATURE-----

2007-05-16 13:11:00

by Oliver Falk

[permalink] [raw]
Subject: Re: [patch] Missing defines in asm-alpha/unistd.h!?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/16/2007 01:19 PM, Oliver Falk wrote:
> On 05/16/2007 11:41 AM, Oliver Falk wrote:
>> On 05/16/2007 10:57 AM, Oliver Falk wrote:
>>> I believe this is missing... :-) I hope I understood NR_SYSCALLS
>>> correctly and it's the number of defined syscals - as I added 20 of
>>> them, I increased it by 20... Maybe someone can have a look if it's correct.
>> [ ... ]
>
>> Sorry, the patch was missing one hunk/file and also the tab stops where
>> wrong. Attached a new working version.
>
> But. The strange error that follows after patching:
> ld -static -N -o .tmp_vmlinux1 -T arch/alpha/kernel/vmlinux.lds
> arch/alpha/kernel/head.o init/built-in.o --start-group usr/built-in.o
> arch/alpha/kernel/built-in.o arch/alpha/mm/built-in.o
> arch/alpha/math-emu/built-in.o kernel/built-in.o mm/built-in.o
> fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o
> block/built-in.o lib/lib.a arch/alpha/lib/lib.a lib/built-in.o
> arch/alpha/lib/built-in.o drivers/built-in.o sound/built-in.o
> net/built-in.o --end-group
> arch/alpha/kernel/built-in.o:(.data+0x2d60): undefined reference to
> `sys_pselect6'
> arch/alpha/kernel/built-in.o:(.data+0x2d68): undefined reference to
> `sys_ppoll'
>
> I don't understand this... Any clue(s)?

Needed to replace sys_pselect6 and sys_ppoll with alpha_ni_syscall... If
this is very correct way to fix it!? :-/

Can someone please have a look and correct me!?

- -of
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGSwK8xWN5Ge8lKUMRAtlmAKCCnPVI/RwU8l7gLHXy3PdQcfh3FACgijin
V1vWFNgNB+7y6llUVqKzIis=
=+BlN
-----END PGP SIGNATURE-----

2007-05-16 14:17:36

by Oliver Falk

[permalink] [raw]
Subject: Re: [patch] Missing defines in asm-alpha/unistd.h!?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/16/2007 03:10 PM, Oliver Falk wrote:
> On 05/16/2007 01:19 PM, Oliver Falk wrote:
>> On 05/16/2007 11:41 AM, Oliver Falk wrote:
>>> On 05/16/2007 10:57 AM, Oliver Falk wrote:
>>>> I believe this is missing... :-) I hope I understood NR_SYSCALLS
>>>> correctly and it's the number of defined syscals - as I added 20 of
>>>> them, I increased it by 20... Maybe someone can have a look if it's correct.
>>> [ ... ]
>>> Sorry, the patch was missing one hunk/file and also the tab stops where
>>> wrong. Attached a new working version.
>> But. The strange error that follows after patching:
>> ld -static -N -o .tmp_vmlinux1 -T arch/alpha/kernel/vmlinux.lds
>> arch/alpha/kernel/head.o init/built-in.o --start-group usr/built-in.o
>> arch/alpha/kernel/built-in.o arch/alpha/mm/built-in.o
>> arch/alpha/math-emu/built-in.o kernel/built-in.o mm/built-in.o
>> fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o
>> block/built-in.o lib/lib.a arch/alpha/lib/lib.a lib/built-in.o
>> arch/alpha/lib/built-in.o drivers/built-in.o sound/built-in.o
>> net/built-in.o --end-group
>> arch/alpha/kernel/built-in.o:(.data+0x2d60): undefined reference to
>> `sys_pselect6'
>> arch/alpha/kernel/built-in.o:(.data+0x2d68): undefined reference to
>> `sys_ppoll'
>
>> I don't understand this... Any clue(s)?
>
> Needed to replace sys_pselect6 and sys_ppoll with alpha_ni_syscall... If
> this is very correct way to fix it!? :-/
>
> Can someone please have a look and correct me!?

Sergey just told me, that this is wrong. Patch is fine, but we need
another. Please apply as well.

- -of
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGSxFcxWN5Ge8lKUMRApQjAJwOFDVvTLyU1iUnGPYZOjDsgdQc+gCgln/Z
/l4a0VXPlCgjTfzQXklaC1g=
=VFix
-----END PGP SIGNATURE-----


Attachments:
linux-2.6.21-alpha_thread_info.patch (729.00 B)

2007-05-16 19:40:17

by Heiko Carstens

[permalink] [raw]
Subject: Re: [patch] Missing defines in asm-alpha/unistd.h!?

> >> arch/alpha/kernel/built-in.o:(.data+0x2d60): undefined reference to
> >> `sys_pselect6'
> >> arch/alpha/kernel/built-in.o:(.data+0x2d68): undefined reference to
> >> `sys_ppoll'
> >
> >> I don't understand this... Any clue(s)?
> >
> > Needed to replace sys_pselect6 and sys_ppoll with alpha_ni_syscall... If
> > this is very correct way to fix it!? :-/
> >
> > Can someone please have a look and correct me!?
>
> Sergey just told me, that this is wrong. Patch is fine, but we need
> another. Please apply as well.
>
> --- linux-2.6.21.alpha/include/asm-alpha/thread_info.h.alpha_thread 2007-05-16 16:08:18.000000000 +0200
> +++ linux-2.6.21.alpha/include/asm-alpha/thread_info.h 2007-05-16 16:08:07.000000000 +0200
> @@ -76,12 +76,14 @@
> #define TIF_UAC_NOFIX 7
> #define TIF_UAC_SIGBUS 8
> #define TIF_MEMDIE 9
> +#define TIF_RESTORE_SIGMASK 11
>
> #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
> #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
> #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
> #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
> #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
> +#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)

If you want to wire up pselect6 and ppoll you need to add full
TIF_RESTORE_SIGMASK support. With your patches it compiles but is broken.
Search the git commits for "TIF_RESTORE_MASK" and see how this was
implemented on other architectures.
Also you should put the alpha maintainers on cc when sending such patches.

2007-05-21 07:38:19

by Oliver Falk

[permalink] [raw]
Subject: Re: [patch] Missing defines in asm-alpha/unistd.h!?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/16/2007 09:38 PM, Heiko Carstens wrote:
>>>> arch/alpha/kernel/built-in.o:(.data+0x2d60): undefined reference to
>>>> `sys_pselect6'
>>>> arch/alpha/kernel/built-in.o:(.data+0x2d68): undefined reference to
>>>> `sys_ppoll'
>>>> I don't understand this... Any clue(s)?
>>> Needed to replace sys_pselect6 and sys_ppoll with alpha_ni_syscall... If
>>> this is very correct way to fix it!? :-/
>>>
>>> Can someone please have a look and correct me!?
>> Sergey just told me, that this is wrong. Patch is fine, but we need
>> another. Please apply as well.
>>
>> --- linux-2.6.21.alpha/include/asm-alpha/thread_info.h.alpha_thread 2007-05-16 16:08:18.000000000 +0200
>> +++ linux-2.6.21.alpha/include/asm-alpha/thread_info.h 2007-05-16 16:08:07.000000000 +0200
>> @@ -76,12 +76,14 @@
>> #define TIF_UAC_NOFIX 7
>> #define TIF_UAC_SIGBUS 8
>> #define TIF_MEMDIE 9
>> +#define TIF_RESTORE_SIGMASK 11
>>
>> #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
>> #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
>> #define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
>> #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
>> #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
>> +#define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK)
>
> If you want to wire up pselect6 and ppoll you need to add full
> TIF_RESTORE_SIGMASK support. With your patches it compiles but is broken.
> Search the git commits for "TIF_RESTORE_MASK" and see how this was
> implemented on other architectures.
> Also you should put the alpha maintainers on cc when sending such patches.

Thx Heiko. Yes. I already saw that problem. I will add a new patch... I
was out of country the last days - I wanted to do it last week, but ...
LONG story... :-/

- -of
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGUUxZxWN5Ge8lKUMRAoXmAJ94Wj6N0Ti6Owdg7LLgUdqDpJPonQCeP1iM
8MaYwjwuytEsjPyiU5/emF8=
=lrSg
-----END PGP SIGNATURE-----