Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754859AbbKQWFp (ORCPT ); Tue, 17 Nov 2015 17:05:45 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:62114 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750867AbbKQWFn (ORCPT ); Tue, 17 Nov 2015 17:05:43 -0500 From: Arnd Bergmann To: Yury Norov Cc: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pinskia@gmail.com, ddaney.cavm@gmail.com, jan.dakinevich@gmail.com, Prasun.Kapoor@caviumnetworks.com, christoph.muellner@theobroma-systems.com, philipp.tomsich@theobroma-systems.com, broonie@kernel.org, andrey.konovalov@linaro.org, Nathan_Lynch@mentor.com, agraf@suse.de, bamvor.zhangjian@huawei.com, klimov.linux@gmail.com, joseph@codesourcery.com, schwab@suse.de Subject: Re: [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 Message-ID: <3754277.KmO9Nk3XLD@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1447795019-30176-15-git-send-email-ynorov@caviumnetworks.com> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> <1447795019-30176-15-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:d0bW/nAzsX+C7k8KCOi+Tov7dnB8JXEVUAWPtEQnw9suLvw4syB ZcnHIY3LahGHqCOK/Km1ovjZFuZlcUYczjG5eXaFMdDUVfsVsVXcBfCkyusX+qiPzbOpZ+g RA5mE967t5xA/l8IEGW+fgSFNkNSekNqxvx16w4vWphTOwps5bUjlhvz3ohLWod9PzC4tnX 2oarsDDSnYuLk8abJfL9A== X-UI-Out-Filterresults: notjunk:1;V01:K0:Zv4moe4jZe0=:f9P1d2CffuzSp+zKlRfrxm uT+RObIpTta/p0c/BTj3DWAKl4WK1nhEFbvebVPQt+kwJ8dLsoJC/TK9PwlTCy9g8gfy7ZTaB YqchH2M8AiyCkE4UicAheTxBJdjVyijCV3SHdWSggUL0qSZ1fPayl4GUG/gwS1P/8qkOFzRwe 2SmnL7quWbbcbossECTQ/Azk6L0rz5NNMot+YSu3tICxvsF0bGm3rOR7KIpRGc/W46aa28dvh LnVPqq71csrVPanAcy/SEDVT6raAKlD0Jvy7bS6nsyVdRw3+YUsRREO7WLxaWOvc3ah/MqhZU oW6x/+Fq27SF8idni+nn2b+SKXu6rpS5OWGg9EmxDaNMQHIe2INOBGndnAJ4oWSMcEPvJBtto udyd7Mb2KpNMhptrOhgoLet82KVUAekM2/qhJjL+MsBGfXU3ZGZYnzv0wdjMCfBITlTon0tDS UX0swZWcek6CUgEUKPFB8OpK6ewF0iq6QXuPcKIX02spzyoQh4YN2t/2je5U3ahNmioYgv0TB EpzuUe43NHlTSMh/0+/5+apLRYgErTCyB9lHJnE5W67VNqtBXNz6CTuj8EKHLNmIVf1pcHy2M 8OOaHhRg5JYxaDAKChAnHQju06ROnDM/AS8dic0Ui4hNnriYUMxYGczMXu7cYP26gBpPFApzr pRXWJm+I+93AQcjFk31knFLrSyBklMgYNLumHjE77c+8WFCJRRowZhwVI9Ol0QCPkCz1bsje/ sKiDP5kaCLsruH6u Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5135 Lines: 149 On Wednesday 18 November 2015 00:16:54 Yury Norov wrote: > From: Andrew Pinski > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/