From nobody Fri Jun 17 19:40:50 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EC73D85D33E; Fri, 17 Jun 2022 19:40:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LPqCR6VT4z3hrT; Fri, 17 Jun 2022 19:40:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E59/UO02Puvt4HytK6g+aubn4qi7lv0xsVNb6nxn1ec=; b=nB7CoxaDuMBqPgyKkKkcNNVjGcpNGVn1M8ljEJpjPSZlr9ryEaTbm4tiMmONG2mU2fshse WF0DVDcdV+0ntswVRNDduQ0Nxfj+vtmcETTCe8zR+KWffOeS3HdcQnWXw9VrJXr5i2VFHh fXJEqQqPfVlvaowDHnodONm6QgDEb8MeFytdxLsFkUBPPhEbnrK7JC6dlyEHZsTGBBseJn 5btWCM1Ity+q5gzBIqukDnZuJoNDH4kKUKcRzEcNcxxeIARJXQFAxymBUsOF3FHgXduWGS Z3wgiwDkARs0Mu9OKw8VzD56BvAR+6VsVn89tlgSyq+s3SHnqpowkwS/H4ENvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6F46257F1; Fri, 17 Jun 2022 19:40:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25HJeoPn026343; Fri, 17 Jun 2022 19:40:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJeoCP026342; Fri, 17 Jun 2022 19:40:50 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:40:50 GMT Message-Id: <202206171940.25HJeoCP026342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 8d6ce3014992 - stable/13 - linux(4): Add kernel signal code definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8d6ce301499237a20625b75dcf7f9dcb6d49013d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E59/UO02Puvt4HytK6g+aubn4qi7lv0xsVNb6nxn1ec=; b=nnd5Y6hAPhANq+hORAwTKEFYHNXhIdn82p/xOVPqtkprp1aWdnSmKiOBq7R++weJ13gIZS AX8gBjUEypAL/c1muCzCJLRJa29rp19M7lA7U+CX1Y4oYm2f72yHDteRFYADm+cTUBEVWs TiztXGvqlHepuN52aGY54ahYWxkBXV8fOso9Jekn0mb6Q+A+e87VGie6/g5CxNO+MYLMo8 BOta+Ij3KRyYlej+M4VJSVPrs9VEx3xkOlchkrKOYuue5ip0dFZ6sm6w+4Y2XHdJR/xrRW ZACsHoMYZB+oz2lMX2VNELtZRyGuiLLeq6y/VS/IEs0R/S9FkDdpDiRhGquWoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494852; a=rsa-sha256; cv=none; b=kh2kdYHxpTZ31yReKU74+Ooaz6y2vOa5nMh3qx0Olc+KnK/5ppyv7wSqIUVVd+MELIyTy1 u3x10HZuZ0BXbzJSLArHJwkAsT0qyT0NxHF878NWv89ni/PJ+yCxOGsvdOiy1ghAXfY5xf oj0UiM5ojoOHBuJ4lcJOrXAIq3mp4o5B6ReXc/9vGxJFS7ZaKJtUVujwx2/y7wHyHHTa5L FuFm1ZCAW4r8IMc1pOtJqaMiiLWZEVwmjU8g/R8KiY4W0+EJaUxrOdTfe5y09bE5FFfCv1 d0QkZC0s2E9q4K9zgGjlvRfpgno7KhJ27l2xngNUR9lgxJ0jLaz4rKn0c5YxLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=8d6ce301499237a20625b75dcf7f9dcb6d49013d commit 8d6ce301499237a20625b75dcf7f9dcb6d49013d Author: Dmitry Chagin AuthorDate: 2022-05-19 16:55:56 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:35:26 +0000 linux(4): Add kernel signal code definitions In the next commit I'll convert the native signal codes into the Linux codes, since they are not 1:1 mapped. MFC after: 2 weeks (cherry picked from commit 30301975637f85172fe18b73c863dabd8ad28296) --- sys/compat/linux/linux_siginfo.h | 111 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/sys/compat/linux/linux_siginfo.h b/sys/compat/linux/linux_siginfo.h index eb9120a0208a..b0c70e1b745e 100644 --- a/sys/compat/linux/linux_siginfo.h +++ b/sys/compat/linux/linux_siginfo.h @@ -48,6 +48,116 @@ #define LINUX_SI_SIGIO -5 /* sent by queued SIGIO */ #define LINUX_SI_TKILL -6 /* sent by tkill system call */ +/* + * SIGILL si_codes + */ +#define LINUX_ILL_ILLOPC 1 /* illegal opcode */ +#define LINUX_ILL_ILLOPN 2 /* illegal operand */ +#define LINUX_ILL_ILLADR 3 /* illegal addressing mode */ +#define LINUX_ILL_ILLTRP 4 /* illegal trap */ +#define LINUX_ILL_PRVOPC 5 /* privileged opcode */ +#define LINUX_ILL_PRVREG 6 /* privileged register */ +#define LINUX_ILL_COPROC 7 /* coprocessor error */ +#define LINUX_ILL_BADSTK 8 /* internal stack error */ +#define LINUX_ILL_BADIADDR 9 /* unimplemented instruction address */ +#define LINUX___ILL_BREAK 10 /* (ia64) illegal break */ +#define LINUX___ILL_BNDMOD 11 /* (ia64) bundle-update (modification) + * in progress + */ + +/* + * SIGFPE si_codes + */ +#define LINUX_FPE_INTDIV 1 /* integer divide by zero */ +#define LINUX_FPE_INTOVF 2 /* integer overflow */ +#define LINUX_FPE_FLTDIV 3 /* floating point divide by zero */ +#define LINUX_FPE_FLTOVF 4 /* floating point overflow */ +#define LINUX_FPE_FLTUND 5 /* floating point underflow */ +#define LINUX_FPE_FLTRES 6 /* floating point inexact result */ +#define LINUX_FPE_FLTINV 7 /* floating point invalid operation */ +#define LINUX_FPE_FLTSUB 8 /* (ia64) subscript out of range */ +#define LINUX___FPE_DECOVF 9 /* (ia64) decimal overflow */ +#define LINUX___FPE_DECDIV 10 /* (ia64) decimal division by zero */ +#define LINUX___FPE_DECERR 11 /* (ia64) packed decimal error */ +#define LINUX___FPE_INVASC 12 /* (ia64) invalid ASCII digit */ +#define LINUX___FPE_INVDEC 13 /* (ia64) invalid decimal digit */ +#define LINUX_FPE_FLTUNK 14 /* undiagnosed floating-point exception */ +#define LINUX_FPE_CONDTRAP 15 /* trap on condition */ + +/* + * SIGSEGV si_codes + */ +#define LINUX_SEGV_MAPERR 1 /* address not mapped to object */ +#define LINUX_SEGV_ACCERR 2 /* invalid permissions for mapped object */ +#define LINUX_SEGV_BNDERR 3 /* failed address bound checks */ +#ifdef __ia64__ +#define LINUX___SEGV_PSTKOVF 4 /* paragraph stack overflow */ +#else +#define LINUX_SEGV_PKUERR 4 /* failed protection key checks */ +#endif +#define LINUX_SEGV_ACCADI 5 /* ADI not enabled for mapped object */ +#define LINUX_SEGV_ADIDERR 6 /* Disrupting MCD error */ +#define LINUX_SEGV_ADIPERR 7 /* Precise MCD exception */ +#define LINUX_SEGV_MTEAERR 8 /* Asynchronous ARM MTE error */ +#define LINUX_SEGV_MTESERR 9 /* Synchronous ARM MTE exception */ + +/* + * SIGBUS si_codes + */ +#define LINUX_BUS_ADRALN 1 /* invalid address alignment */ +#define LINUX_BUS_ADRERR 2 /* non-existent physical address */ +#define LINUX_BUS_OBJERR 3 /* object specific hardware error */ + +#define LINUX_BUS_MCEERR_AR 4 /* hardware memory error consumed + * on a machine check: + * action required + */ +#define LINUX_BUS_MCEERR_AO 5 /* hardware memory error detected + * in process but not consumed: + * action optional + */ + +/* + * SIGTRAP si_codes + */ +#define LINUX_TRAP_BRKPT 1 /* process breakpoint */ +#define LINUX_TRAP_TRACE 2 /* process trace trap */ +#define LINUX_TRAP_BRANCH 3 /* process taken branch trap */ +#define LINUX_TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */ +#define LINUX_TRAP_UNK 5 /* undiagnosed trap */ +#define LINUX_TRAP_PERF 6 /* perf event with sigtrap=1 */ + +/* + * SIGCHLD si_codes + */ +#define LINUX_CLD_EXITED 1 /* child has exited */ +#define LINUX_CLD_KILLED 2 /* child was killed */ +#define LINUX_CLD_DUMPED 3 /* child terminated abnormally */ +#define LINUX_CLD_TRAPPED 4 /* traced child has trapped */ +#define LINUX_CLD_STOPPED 5 /* child has stopped */ +#define LINUX_CLD_CONTINUED 6 /* stopped child has continued */ + +/* + * SIGPOLL (or any other signal without signal specific si_codes) si_codes + */ +#define LINUX_POLL_IN 1 /* data input available */ +#define LINUX_POLL_OUT 2 /* output buffers available */ +#define LINUX_POLL_MSG 3 /* input message available */ +#define LINUX_POLL_ERR 4 /* i/o error */ +#define LINUX_POLL_PRI 5 /* high priority input available */ +#define LINUX_POLL_HUP 6 /* device disconnected */ + +/* + * SIGSYS si_codes + */ +#define LINUX_SYS_SECCOMP 1 /* seccomp triggered */ +#define LINUX_SYS_USER_DISPATCH 2 /* syscall user dispatch triggered */ + +/* + * SIGEMT si_codes + */ +#define LINUX_EMT_TAGOVF 1 /* tag overflow */ + typedef union l_sigval { l_int sival_int; l_uintptr_t sival_ptr; @@ -123,3 +233,4 @@ _Static_assert(sizeof(l_siginfo_t) == LINUX_SI_MAX_SIZE, "l_siginfo_t size"); #define lsi_fd _sifields._sigpoll._fd #endif /* _LINUX_SIGINFO_H_ */ +