All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] regen.sh: Limit mips o32 system calls
@ 2021-07-22 12:52 zhanglianjie
  2021-07-27 12:03   ` Petr Vorel
  2021-08-02 10:20 ` Petr Vorel
  0 siblings, 2 replies; 4+ messages in thread
From: zhanglianjie @ 2021-07-22 12:52 UTC (permalink / raw)
  To: ltp

With mips architecture, 64-bit programs cannot call o32 system calls.
For example, __NR_stime, __NR_socketcall, __NR_time, etc.
Better solve the problem described in commit: 22c2c9e2f

Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>

diff --git a/include/lapi/syscalls/regen.sh b/include/lapi/syscalls/regen.sh
index 7a4f0cf44..8ac80440c 100755
--- a/include/lapi/syscalls/regen.sh
+++ b/include/lapi/syscalls/regen.sh
@@ -80,7 +80,7 @@ for arch in $(cat "${srcdir}/order") ; do
 		s390) echo "#if defined(__s390__) && !defined(__s390x__)" ;;
 		mips_n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
 		mips_n64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
-		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32)" ;;
+		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
 		*) echo "#ifdef __${arch}__" ;;
 	esac
 	while read line ; do
--
2.20.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] regen.sh: Limit mips o32 system calls
  2021-07-22 12:52 [LTP] [PATCH] regen.sh: Limit mips o32 system calls zhanglianjie
@ 2021-07-27 12:03   ` Petr Vorel
  2021-08-02 10:20 ` Petr Vorel
  1 sibling, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2021-07-27 12:03 UTC (permalink / raw)
  To: zhanglianjie; +Cc: linux-mips, Thomas Bogendoerfer, ltp

Hi zhanglianjie,

> With mips architecture, 64-bit programs cannot call o32 system calls.
> For example, __NR_stime, __NR_socketcall, __NR_time, etc.
@Thomas or somebody from MIPS folks, could you please confirm this?

> Better solve the problem described in commit: 22c2c9e2f

LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>

> diff --git a/include/lapi/syscalls/regen.sh b/include/lapi/syscalls/regen.sh
> index 7a4f0cf44..8ac80440c 100755
> --- a/include/lapi/syscalls/regen.sh
> +++ b/include/lapi/syscalls/regen.sh
> @@ -80,7 +80,7 @@ for arch in $(cat "${srcdir}/order") ; do
>  		s390) echo "#if defined(__s390__) && !defined(__s390x__)" ;;
>  		mips_n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
>  		mips_n64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
> -		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32)" ;;
> +		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
>  		*) echo "#ifdef __${arch}__" ;;
>  	esac
>  	while read line ; do

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH] regen.sh: Limit mips o32 system calls
@ 2021-07-27 12:03   ` Petr Vorel
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2021-07-27 12:03 UTC (permalink / raw)
  To: ltp

Hi zhanglianjie,

> With mips architecture, 64-bit programs cannot call o32 system calls.
> For example, __NR_stime, __NR_socketcall, __NR_time, etc.
@Thomas or somebody from MIPS folks, could you please confirm this?

> Better solve the problem described in commit: 22c2c9e2f

LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>

> diff --git a/include/lapi/syscalls/regen.sh b/include/lapi/syscalls/regen.sh
> index 7a4f0cf44..8ac80440c 100755
> --- a/include/lapi/syscalls/regen.sh
> +++ b/include/lapi/syscalls/regen.sh
> @@ -80,7 +80,7 @@ for arch in $(cat "${srcdir}/order") ; do
>  		s390) echo "#if defined(__s390__) && !defined(__s390x__)" ;;
>  		mips_n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
>  		mips_n64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
> -		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32)" ;;
> +		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
>  		*) echo "#ifdef __${arch}__" ;;
>  	esac
>  	while read line ; do

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH] regen.sh: Limit mips o32 system calls
  2021-07-22 12:52 [LTP] [PATCH] regen.sh: Limit mips o32 system calls zhanglianjie
  2021-07-27 12:03   ` Petr Vorel
@ 2021-08-02 10:20 ` Petr Vorel
  1 sibling, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2021-08-02 10:20 UTC (permalink / raw)
  To: ltp

Hi zhanglianjie,

> With mips architecture, 64-bit programs cannot call o32 system calls.
> For example, __NR_stime, __NR_socketcall, __NR_time, etc.
> Better solve the problem described in commit: 22c2c9e2f

Merged your fix and reverted 22c2c9e2f, which is not needed now.

Thanks!

Kind regards,
Petr

> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>

> diff --git a/include/lapi/syscalls/regen.sh b/include/lapi/syscalls/regen.sh
> index 7a4f0cf44..8ac80440c 100755
> --- a/include/lapi/syscalls/regen.sh
> +++ b/include/lapi/syscalls/regen.sh
> @@ -80,7 +80,7 @@ for arch in $(cat "${srcdir}/order") ; do
>  		s390) echo "#if defined(__s390__) && !defined(__s390x__)" ;;
>  		mips_n32) echo "#if defined(__mips__) && defined(_ABIN32)" ;;
>  		mips_n64) echo "#if defined(__mips__) && defined(_ABI64)" ;;
> -		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32)" ;;
> +		mips_o32) echo "#if defined(__mips__) && defined(_ABIO32) && _MIPS_SZLONG == 32" ;;
>  		*) echo "#ifdef __${arch}__" ;;
>  	esac
>  	while read line ; do

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-02 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 12:52 [LTP] [PATCH] regen.sh: Limit mips o32 system calls zhanglianjie
2021-07-27 12:03 ` Petr Vorel
2021-07-27 12:03   ` Petr Vorel
2021-08-02 10:20 ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.