From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it
Date: Tue, 17 Nov 2015 22:57:52 +0100 [thread overview]
Message-ID: <3754277.KmO9Nk3XLD@wuerfel> (raw)
In-Reply-To: <1447795019-30176-15-git-send-email-ynorov@caviumnetworks.com>
On Wednesday 18 November 2015 00:16:54 Yury Norov wrote:
> From: Andrew Pinski <apinski@cavium.com>
>
> Add a separate syscall-table for ILP32, which dispatches either to native
> LP64 system call implementation or to compat-syscalls, as appropriate.
I like it much better than the previous version, thanks for the rework!
However, it seems that you accidentally have a lot more redirects
than you should have:
> +/* Using non-compat syscalls where necessary */
> +#define compat_sys_fadvise64_64 sys_fadvise64_64
> +#define compat_sys_fallocate sys_fallocate
> +#define compat_sys_ftruncate64 sys_ftruncate
> +#define compat_sys_pread64 sys_pread64
> +#define compat_sys_pwrite64 sys_pwrite64
> +#define compat_sys_readahead sys_readahead
Makes sense. These of course all require the respective changes
in glibc as discussed in the thread regarding loff_t handling.
> +#define compat_sys_rt_sigaction sys_rt_sigaction
> +#define compat_sys_shmat sys_shmat
What's special about compat_sys_shmat?
> +#define compat_sys_sync_file_range sys_sync_file_range
> +#define compat_sys_truncate64 sys_truncate
> +#define compat_sys_sigaltstack sys_sigaltstack
> +
> +#define compat_sys_io_getevents sys_io_getevents
io_getevents seems wrong, you are passing the wrong timespec and
aio_context_t here.
> +#define compat_sys_lookup_dcookie sys_lookup_dcookie
> +#define compat_sys_epoll_pwait sys_epoll_pwait
epoll_pwait takes sigset_t, which I'd assume is different between
ilp32 and lp64, so this is probably wrong too, at least on big-endian.
> +#define compat_sys_fcntl64 compat_sys_fcntl
This uses compat_off_t, not compat_loff_t, and needs to be changed.
> +#define compat_sys_signalfd4 sys_signalfd4
> +#define compat_sys_rt_sigsuspend sys_rt_sigsuspend
> +#define compat_sys_rt_sigprocmask sys_rt_sigprocmask
> +#define compat_sys_rt_sigpending sys_rt_sigpending
sigset_t again, all four of these.
> +#define compat_sys_rt_sigqueueinfo sys_rt_sigqueueinfo
this looks ok though, as you have the 64-bit siginfo
> +#define compat_sys_semtimedop sys_semtimedop
timespec again
> +#define compat_sys_rt_tgsigqueueinfo sys_rt_tgsigqueueinfo
> +
> +#define compat_sys_timer_create sys_timer_create
> +#define compat_sys_timer_gettime sys_timer_gettime
> +#define compat_sys_timer_settime sys_timer_settime
timespec again for gettime/settime. create seems fine if you require
the use of the 64-bit sigevent (why?)
> +#define compat_sys_rt_sigtimedwait sys_rt_sigtimedwait
This one probably needs a custom wrapper as you have the 64-bit
siginfo, but the 32-bit sigset and timespec.
> +#define compat_sys_mq_open sys_mq_open
> +#define compat_sys_mq_timedsend sys_mq_timedsend
> +#define compat_sys_mq_timedreceive sys_mq_timedreceive
> +#define compat_sys_mq_getsetattr sys_mq_getsetattr
> +#define compat_sys_mq_open sys_mq_open
You have compat_sys_mq_open twice, and they all look wrong because
you get the wrong struct mq_attr.
> +#define compat_sys_open_by_handle_at sys_open_by_handle_at
The only difference here is the forced O_LARGEFILE, but that
is set by glibc anyway, right?
> +#define compat_sys_clock_adjtime sys_clock_adjtime
wrong timex structure
> +#define compat_sys_openat sys_openat
same as open_by_handle_at
> +#define compat_sys_getdents64 sys_getdents64
glibc uses linux_dirent64 for 32-bit architectures, so this looks wrong
> +#define compat_sys_waitid sys_waitid
This will probably need a separate wrapper to convert rusage but not siginfo
> +#define compat_sys_timer_settime sys_timer_settime
> +#define compat_sys_sched_rr_get_interval sys_sched_rr_get_interval
timespec again
> +#define compat_sys_execveat sys_execveat
This probably gives you the wrong struct user_arg_ptr
> +#define compat_sys_mq_notify sys_mq_notify
ok.
> +#define compat_sys_clock_nanosleep sys_clock_nanosleep
> +#define compat_sys_clock_getres sys_clock_getres
timespec
> +#define sys_lseek sys_llseek
This seems pointless, as there is no sys_lseek
> +asmlinkage long compat_sys_mmap2_wrapper(void);
> +#define sys_mmap2 compat_sys_mmap2_wrapper
> +
> +asmlinkage long compat_sys_fstatfs64_wrapper(void);
> +#define compat_sys_fstatfs64 compat_sys_fstatfs64_wrapper
> +asmlinkage long compat_sys_statfs64_wrapper(void);
> +#define compat_sys_statfs64 compat_sys_statfs64_wrapper
What are the wrappers for again? Maybe add a comment here.
> +#define compat_sys_preadv compat_sys_preadv64
> +#define compat_sys_pwritev compat_sys_pwritev64
wrong iovec.
Arnd
next prev parent reply other threads:[~2015-11-17 21:57 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 21:16 [RFC2 PATCH v6 00/19] ILP32 for ARM64 Yury Norov
2015-11-17 21:16 ` [PATCH v6 01/19] arm64:ilp32: add documentation on the ILP32 ABI " Yury Norov
2015-11-18 8:09 ` Zhangjian (Bamvor)
2015-11-17 21:16 ` [PATCH v6 02/19] arm64: ensure the kernel is compiled for LP64 Yury Norov
2015-11-17 21:16 ` [PATCH v6 03/19] arm64: rename COMPAT to AARCH32_EL0 in Kconfig Yury Norov
2015-11-17 21:16 ` [PATCH v6 04/19] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead Yury Norov
2015-12-03 12:02 ` Catalin Marinas
2015-12-04 21:58 ` Yury Norov
2015-11-17 21:16 ` [PATCH v6 05/19] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Yury Norov
2015-12-03 11:31 ` Catalin Marinas
2015-12-03 11:36 ` Dr. Philipp Tomsich
2015-11-17 21:16 ` [PATCH v6 06/19] arm64:ilp32: share signal structures between ILP32 and LP64 ABIs Yury Norov
2015-11-17 22:14 ` Arnd Bergmann
2015-11-17 21:16 ` [PATCH v6 07/19] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) Yury Norov
2015-12-03 12:13 ` Catalin Marinas
2015-12-04 17:05 ` Yury Norov
2015-12-05 11:00 ` Catalin Marinas
2015-11-17 21:16 ` [PATCH v6 08/19] arm64:ilp32: add is_ilp32_compat_{task, thread} and TIF_32BIT_AARCH64 Yury Norov
2015-11-17 21:16 ` [PATCH v6 09/19] arm64:ilp32: share HWCAP between LP64 and ILP32 Yury Norov
2015-11-17 21:16 ` [PATCH v6 10/19] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads Yury Norov
2015-12-03 12:20 ` Catalin Marinas
2015-11-17 21:16 ` [PATCH v6 11/19] arm64:ilp32: support core dump generation for ILP32 Yury Norov
2015-12-03 16:39 ` Catalin Marinas
2015-11-17 21:16 ` [PATCH v6 12/19] ptrace: Allow compat to use the native siginfo Yury Norov
2015-11-17 21:16 ` [PATCH v6 13/19] arm64: ilp32: common 32-bit wrappers Yury Norov
2015-11-17 21:16 ` [PATCH v6 14/19] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it Yury Norov
2015-11-17 21:57 ` Arnd Bergmann [this message]
2015-11-18 8:14 ` Arnd Bergmann
2015-11-19 13:21 ` Andreas Schwab
2015-11-19 13:32 ` Arnd Bergmann
2015-11-30 15:34 ` Arnd Bergmann
2015-11-30 20:21 ` Yury Norov
2015-11-30 21:49 ` Arnd Bergmann
2015-12-01 0:20 ` Andrew Pinski
2015-12-01 0:40 ` Yury Norov
2015-12-01 10:26 ` Arnd Bergmann
2015-12-01 9:20 ` Andreas Schwab
2015-12-01 10:22 ` Arnd Bergmann
2015-12-01 11:01 ` Andreas Schwab
2015-12-01 11:30 ` Arnd Bergmann
2015-12-02 0:24 ` Yury Norov
2015-12-02 10:03 ` Arnd Bergmann
2015-12-03 17:17 ` Catalin Marinas
2015-12-01 21:29 ` Yury Norov
2015-12-01 22:39 ` Arnd Bergmann
2015-12-01 23:35 ` Yury Norov
2015-12-02 8:37 ` Arnd Bergmann
2015-12-02 9:15 ` Yury Norov
2015-12-02 10:35 ` Yury Norov
2015-12-02 13:46 ` Arnd Bergmann
2015-12-02 13:54 ` Arnd Bergmann
2015-12-02 13:57 ` Will Deacon
2015-12-03 17:47 ` Catalin Marinas
2015-12-03 18:14 ` Yury Norov
2015-12-03 20:42 ` Arnd Bergmann
2015-12-02 10:01 ` Yury Norov
2015-12-02 11:03 ` Arnd Bergmann
2015-11-17 21:16 ` [PATCH v6 15/19] arm64: ilp32: force IPC_64 in msgctl, shmctl, semctl Yury Norov
2015-11-17 22:07 ` Arnd Bergmann
2015-11-18 8:25 ` Andreas Schwab
2015-11-18 9:23 ` Arnd Bergmann
2015-11-18 10:07 ` Geert Uytterhoeven
2015-11-18 12:04 ` Arnd Bergmann
2015-11-17 21:16 ` [PATCH v6 16/19] aarch64: ilp32: use generic stat64 structure Yury Norov
2015-11-17 22:09 ` Arnd Bergmann
2015-11-18 20:36 ` Yury Norov
2015-11-18 20:45 ` Arnd Bergmann
2015-11-17 21:16 ` [PATCH v6 17/19] arm64:ilp32: use the native siginfo instead of the compat siginfo Yury Norov
2015-11-17 21:16 ` [PATCH v6 18/19] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32 Yury Norov
2015-11-18 8:11 ` Zhangjian (Bamvor)
2015-11-18 11:21 ` pinskia at gmail.com
2015-11-18 20:25 ` Yury Norov
2015-11-18 21:47 ` Dr. Philipp Tomsich
2015-11-17 21:16 ` [PATCH v6 19/19] arm64:ilp32: add ARM64_ILP32 to Kconfig Yury Norov
2015-11-18 8:00 ` [RFC2 PATCH v6 00/19] ILP32 for ARM64 Zhangjian (Bamvor)
2015-11-23 16:49 ` Andreas Schwab
2015-12-03 17:59 ` Catalin Marinas
2015-12-04 15:35 ` Yury Norov
2015-12-04 17:18 ` Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3754277.KmO9Nk3XLD@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox