mirror of https://github.com/mkerrisk/man-pages
![]() When calling msgrcv() with the MSG_COPY flag, it will report EINVAL error even we if have disabled CONFIG_CHECKPOINT_RESTORE. ENOSYS will be reported only if we also specify the IPC_NOWAIT flag. [mtk: edited commit message] Notes from mtk: The relevant kernel code is this: [[ #ifdef CONFIG_CHECKPOINT_RESTORE ... #else static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz) { return ERR_PTR(-ENOSYS); } ... static long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgflg, long (*msg_handler)(void __user *, struct msg_msg *, size_t)) { ... if (msgflg & MSG_COPY) { if ((msgflg & MSG_EXCEPT) || !(msgflg & IPC_NOWAIT)) return -EINVAL; copy = prepare_copy(buf, min_t(size_t, bufsz, ns->msg_ctlmax)); ... } ]] We'll only hit the ENOSYS error if: (1) MSG_COPY was specified; (2) IPC_NOWAIT was not specified; and (3) CONFIG_CHECKPOINT_RESTORE was not enabled. Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com> |
||
---|---|---|
man1 | ||
man2 | ||
man3 | ||
man4 | ||
man5 | ||
man6 | ||
man7 | ||
man8 | ||
scripts | ||
CONTRIBUTING | ||
Changes | ||
Changes.old | ||
Makefile | ||
README | ||
man-pages-5.09.Announce | ||
man-pages-5.09.lsm |
README
This package contains Linux man pages for sections 1 through 8. Some more information is given in the 'man-pages-x.y.Announce' file. Homepage ======== For information about the Linux man-pages project, see http://www.kernel.org/doc/man-pages/index.html. Bug reports and contributing ============================ If you have corrections and additions to suggest, see http://www.kernel.org/doc/man-pages/contributing.html (Although there is a mirror of this repository on GitHub, please don't report issues via the GitHub issue tracker!) For further information on contributing, see the CONTRIBUTING file. Installing and uninstalling =========================== "make install" will copy these man pages to /usr/share/man/man[1-8]. To install to a path different from /usr, use "make install prefix=/install/path". "make remove" or "make uninstall" will remove any man page in this distribution from its destination. Use with caution, and remember to use "prefix" if desired, as with the "install" target. "make" or "make all" will perform "make uninstall" followed by "make install". Copyrights ========== See the 'man-pages-x.y.Announce' file.