Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp33129pxb; Tue, 17 Nov 2020 19:32:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyMwHwKiUQOoP0RFRcM4tAsXLWPIn86HPQXHiPorjAlpMPbQjmLZqZK2O32ZkXrTWUnewvT X-Received: by 2002:a17:907:9d0:: with SMTP id bx16mr22918415ejc.426.1605670322953; Tue, 17 Nov 2020 19:32:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605670322; cv=none; d=google.com; s=arc-20160816; b=ZuHinU7ItrIf4zbEWAx+77gAXSTEcp6w1L+ILw3iFkKtItPyJQoBoxzLnubt2CHqgL p/2iFjpelxtwu8X1LPNnRat0XbdzUU8rQ07fdThGeaGDVuMltPu4lDCqgJ+sITNZxwZh tigG0hqzgqqnrZ86rpZp2XiT6b4w63XYCkd1503K29XMk9AGHnkWXfso/I49OJ+WnfBk zYwlxBdpuDOklJNoMQPC37GuSTYIgtUkkbfx/jD1heGHEu/Pbgoz9KWYDniUTCv7RrS0 +gBttMiz/pqenmQT1mjIzEQiPz9DBgyitNGpC7NsHX3nQOK3U6bZrPfIBJ/sHjeSP2q+ SHbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XrSiG9xznB8GJD/9NmFHZ/SeQhUvYNoPoJsVJUHKSFk=; b=nC1suiznVKrl/qQ6pv9LPCp1gUytUIXv+HX2U5eACQcvURTZtIHlPmIvBxYCuCDRqW kMbXaESgz+/Rarvv5sKRQnL1U0Z9oemIVgpnCrmDZNPYmmU0vg+iFoTREY543fU8cYnc HcI8WRhjGzpOz7PZrlUV63Z7xXmDj8TvkDtv/nJZnShxBzH390tkj/1YdCINHU5Pb/Zk pB1Er1Dk7CxynGW4qb3YhOaonXzJF33X2rHmO0tUQNNEHKQPjKU23APJmSXNUkqI7hde jiHASZNTf0lO/7/vMLZTGvxMULT0tsC/hXfip2AIAFHCPEymrHoGfdked43/lmwZ7BMb 93bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si9824235eje.754.2020.11.17.19.31.40; Tue, 17 Nov 2020 19:32:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727698AbgKRD3J (ORCPT + 99 others); Tue, 17 Nov 2020 22:29:09 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:55370 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbgKRD3I (ORCPT ); Tue, 17 Nov 2020 22:29:08 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id F387C1F44AB3 From: Gabriel Krisman Bertazi To: luto@kernel.org, tglx@linutronix.de, keescook@chromium.org Cc: christian.brauner@ubuntu.com, peterz@infradead.org, willy@infradead.org, shuah@kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-kselftest@vger.kernel.org, x86@kernel.org, gofmanp@gmail.com, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH v7 2/7] signal: Expose SYS_USER_DISPATCH si_code type Date: Tue, 17 Nov 2020 22:28:35 -0500 Message-Id: <20201118032840.3429268-3-krisman@collabora.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201118032840.3429268-1-krisman@collabora.com> References: <20201118032840.3429268-1-krisman@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SYS_USER_DISPATCH will be triggered when a syscall is sent to userspace by the Syscall User Dispatch mechanism. This adjusts eventual BUILD_BUG_ON around the tree. Signed-off-by: Gabriel Krisman Bertazi Acked-by: Kees Cook Acked-by: Christian Brauner --- arch/x86/kernel/signal_compat.c | 2 +- include/uapi/asm-generic/siginfo.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c index a7f3e12cfbdb..d7b51870f16b 100644 --- a/arch/x86/kernel/signal_compat.c +++ b/arch/x86/kernel/signal_compat.c @@ -31,7 +31,7 @@ static inline void signal_compat_build_tests(void) BUILD_BUG_ON(NSIGBUS != 5); BUILD_BUG_ON(NSIGTRAP != 5); BUILD_BUG_ON(NSIGCHLD != 6); - BUILD_BUG_ON(NSIGSYS != 1); + BUILD_BUG_ON(NSIGSYS != 2); /* This is part of the ABI and can never change in size: */ BUILD_BUG_ON(sizeof(compat_siginfo_t) != 128); diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h index 7aacf9389010..d2597000407a 100644 --- a/include/uapi/asm-generic/siginfo.h +++ b/include/uapi/asm-generic/siginfo.h @@ -286,7 +286,8 @@ typedef struct siginfo { * SIGSYS si_codes */ #define SYS_SECCOMP 1 /* seccomp triggered */ -#define NSIGSYS 1 +#define SYS_USER_DISPATCH 2 /* syscall user dispatch triggered */ +#define NSIGSYS 2 /* * SIGEMT si_codes -- 2.29.2