From patchwork Wed Mar 16 19:18:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8603541 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9790E9F44D for ; Wed, 16 Mar 2016 19:21:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA427201ED for ; Wed, 16 Mar 2016 19:21:33 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03B3320219 for ; Wed, 16 Mar 2016 19:21:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agGyD-0005EO-Cz; Wed, 16 Mar 2016 19:19:01 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agGyB-0005EH-KS for xen-devel@lists.xen.org; Wed, 16 Mar 2016 19:18:59 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id AE/8C-25417-2A1B9E65; Wed, 16 Mar 2016 19:18:58 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1458155937!29555260!1 X-Originating-IP: [209.85.161.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17396 invoked from network); 16 Mar 2016 19:18:58 -0000 Received: from mail-yw0-f195.google.com (HELO mail-yw0-f195.google.com) (209.85.161.195) by server-12.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 16 Mar 2016 19:18:58 -0000 Received: by mail-yw0-f195.google.com with SMTP id g6so4473171ywb.0 for ; Wed, 16 Mar 2016 12:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id; bh=hEdCHu5DIo1GdTJyf9YefwATxKwNHEUyhZ4fV12HC1A=; b=NMUnE87JB1JmQk20USEZe0e/9/KEklNZvTKsEv8jUW//o/7KCxkxLrxkWgD+3+AHTp mA8XhlmHDlOTiqCHsFHFgCtl+HRmKC1h5I1DUeMenC1w2rWSdpieCYgLHMzryenPzpRA HVuQIBFFsZXg0SjTg2yROuWjnDTO+RJRcmgwQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=hEdCHu5DIo1GdTJyf9YefwATxKwNHEUyhZ4fV12HC1A=; b=ZQoLjTFf20uj8L0MqwAE7FsUuHLSGtxRlX1xIX9rvOJNGicsg1dWD3KQWY1YmJkMC3 XkQScUx5Doxc93kkLYgNOWI59cJavBhNzJQmJVTctye143maZ2j1a1Klegz41kbWodlP RYeSD1ZmvapCObbpThNGwsi8otfWC82GbS0/XSvnH/uxa42FgcGk3tv16FdRZ/akgpuI 8iECrQISsK3RBQQjXfAuWcSGOmqfe729wdadwbfF37NpweJPU70RNc889eosr4/apCiJ J79Qnn2DWzoBCijAyTMEhF8hkx6H7U2ouVPc2A83BtXj2yb+3Bt/zzbsK5YIvFrvyIT3 ZKrA== X-Gm-Message-State: AD7BkJKL7nSPDNCEETE9eUrmjX+ambkVKEf+ujPTH0SCU5q2V97bnwnThvPPttYmHzoi9g== X-Received: by 10.37.81.137 with SMTP id f131mr2654767ybb.54.1458155937251; Wed, 16 Mar 2016 12:18:57 -0700 (PDT) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id x7sm2721541ywf.35.2016.03.16.12.18.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Mar 2016 12:18:56 -0700 (PDT) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Wed, 16 Mar 2016 14:18:42 -0500 Message-Id: <1458155923-15648-1-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.7.3 Cc: Daniel De Graaf , Doug Goldstein Subject: [Xen-devel] [PATCH v2 1/2] xsm: only define XSM_MAGIC in xsm.h X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_BL_SPAMCOP_NET, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rather than have XSM_MAGIC set in the global xen/config.h and set in xsm.h if it's unset, just set it once in xsm.h since its only used in files that already include xsm.h Signed-off-by: Doug Goldstein Acked-by: Daniel De Graaf --- CC: Daniel De Graaf --- xen/include/xen/config.h | 1 - xen/include/xsm/xsm.h | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h index 96f5539..3f8c53d 100644 --- a/xen/include/xen/config.h +++ b/xen/include/xen/config.h @@ -79,7 +79,6 @@ #define STR(...) __STR(__VA_ARGS__) #ifdef CONFIG_FLASK -#define XSM_MAGIC 0xf97cff8c /* Maintain statistics on the access vector cache */ #define FLASK_AVC_STATS 1 #endif diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 3afed70..37a102a 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -23,8 +23,11 @@ DEFINE_XEN_GUEST_HANDLE(xsm_op_t); /* policy magic number (defined by XSM_MAGIC) */ typedef u32 xsm_magic_t; -#ifndef XSM_MAGIC -#define XSM_MAGIC 0x00000000 + +#ifdef CONFIG_FLASK +#define XSM_MAGIC 0xf97cff8c +#else +#define XSM_MAGIC 0x0 #endif /* These annotations are used by callers and in dummy.h to document the