From patchwork Wed Jul 22 21:59:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 11679289 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CAF9B6C1 for ; Wed, 22 Jul 2020 22:14:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1E2822B43 for ; Wed, 22 Jul 2020 22:14:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="V+1Ckav1"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EeJ7V0TR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733068AbgGVWL1 (ORCPT ); Wed, 22 Jul 2020 18:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733042AbgGVWL0 (ORCPT ); Wed, 22 Jul 2020 18:11:26 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EEA2C0619E1; Wed, 22 Jul 2020 15:11:26 -0700 (PDT) Message-Id: <20200722220519.404974280@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1595455883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=V20TjmN1n9jq0pcYjqfVM1GUS2Jje/9aKzst9S90g0M=; b=V+1Ckav1bl2n3nhw2Dy7IetRojALQ0RML0iVbCWHR5tqcRMvDVODaR65R6XVMVggrYvYam 4Z8es+jLyY58pTfgGe0usp5pEHmmbOzU9TAPnXR5doNaNITE+rWxaXerA5LSLnhMbHdiyc TGCX7Mstx88deWvr7MI9hNuQWC9pPheUfkOzAQRyQKHVvmxVMF2lV0c2A+hpO2+AZKrVMT 3HgPU/z1oQaolmTtTzOxWdTiFMS/Sjpbr247ifjjHetYVnP7daOkUCz9ditlpu+ahsQoo8 od5Wv0XrJ/LQ/XZJ8TM+nXqzqEizGV4xebVfXJuH/4qQlKxZ4og6p7a3pyGBGg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1595455883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=V20TjmN1n9jq0pcYjqfVM1GUS2Jje/9aKzst9S90g0M=; b=EeJ7V0TRXQTAq7HVtVDVgfGUCl9yNBv3qi+SMW0zk4jgVi6oI+bzn9f2JIrYs5xrk80gBl yRX2cEV3WGpTSuCg== Date: Wed, 22 Jul 2020 23:59:55 +0200 From: Thomas Gleixner To: LKML Cc: x86@kernel.org, linux-arch@vger.kernel.org, Will Deacon , Arnd Bergmann , Mark Rutland , Kees Cook , Keno Fischer , Paolo Bonzini , kvm@vger.kernel.org, Gabriel Krisman Bertazi , Sean Christopherson Subject: [patch V5 01/15] seccomp: Provide stub for __secure_computing() References: <20200722215954.464281930@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Thomas Gleixner To avoid #ifdeffery in the upcoming generic syscall entry work code provide a stub for __secure_computing() as this is preferred over secure_computing() because the TIF flag is already evaluated. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook --- V4: New patch --- include/linux/seccomp.h | 1 + 1 file changed, 1 insertion(+) --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -61,6 +61,7 @@ struct seccomp_filter { }; #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER static inline int secure_computing(void) { return 0; } +static inline int __secure_computing(void) { return 0; } #else static inline void secure_computing_strict(int this_syscall) { return; } #endif