[PATCH 1/2] sh: Remove unsupported accept4 syscall

Carmelo AMOROSO carmelo.amoroso at st.com
Mon Dec 13 08:57:55 UTC 2010


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

On 12/13/2010 8:37 AM, Carmelo AMOROSO wrote:
> * linux/sh/syscallent.h: Remove the entry for accept4. Adjust
> the check for SYS_ipc_subcall and update ipc syscall numbers
> accordingly in the comment.
> * linux/syscall.h [SH]: Do not define SYS_sub_accept4 and update
> SYS_socket_nsubcalls accordingly.
> 
> Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
> ---
>  linux/sh/syscallent.h |   35 +++++++++++++++++------------------
>  linux/syscall.h       |    7 ++++++-
>  2 files changed, 23 insertions(+), 19 deletions(-)
> 
> diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
> index f3b59db..a778639 100644
> --- a/linux/sh/syscallent.h
> +++ b/linux/sh/syscallent.h
> @@ -454,35 +454,34 @@
>  	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 415 */
>  	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
>  	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
> -	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
> -	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
> +	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 418 */
>  
> -#if SYS_ipc_subcall != 420
> +#if SYS_ipc_subcall != 419
>   #error fix me
>  #endif
>  
> -	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
> -	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
> -	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
> -	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
> -	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
> +	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
> +	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
> +	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
> +	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
> +	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
> +	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
> -	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
> -	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
> -	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
> -	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
> -	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
> +	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
> +	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
> +	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
> +	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
> +	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
>  	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
> -	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
> -	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
> -	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
> -	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
> -	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
> +	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
> +	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
> +	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
> +	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
> diff --git a/linux/syscall.h b/linux/syscall.h
> index e7348ff..5ef722e 100644
> --- a/linux/syscall.h
> +++ b/linux/syscall.h
> @@ -228,10 +228,15 @@ int sys_osf_utimes();
>  #define SYS_sub_getsockopt	(SYS_socket_subcall + 15)
>  #define SYS_sub_sendmsg		(SYS_socket_subcall + 16)
>  #define SYS_sub_recvmsg		(SYS_socket_subcall + 17)
> +# ifndef SH
>  #define SYS_sub_accept4		(SYS_socket_subcall + 18)
>  #define SYS_sub_recvmmsg	(SYS_socket_subcall + 19)
> -
>  #define SYS_socket_nsubcalls	20
> +# else
> +/* SH does not have accept4 at all */
> +#define SYS_sub_recvmmsg	(SYS_socket_subcall + 18)
> +#define SYS_socket_nsubcalls	19
> +# endif
>  #endif /* !(ALPHA || MIPS || HPPA) */
>  
>  /* sys_ipc subcalls */

Hi,
please discard this one. Indeed I've found that accept4 is also defined
for SH but not exposed to the user space through unistd.h.

I'll post a fix to linux-sh guys to expose it too.

Carmelo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0F4BMACgkQoRq/3BrK1s9LAQCgywKh9/ZfsJLG8Yq/AqwCFt5x
gB8Anjb8OUwBpTrdCQZ+R+N9ZJbYwwkw
=uahW
-----END PGP SIGNATURE-----




More information about the Strace-devel mailing list