From patchwork Mon May 7 03:32:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Min Zhao X-Patchwork-Id: 909508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40fSr83R7nz9s1w for ; Mon, 7 May 2018 13:33:12 +1000 (AEST) Received: from localhost ([::1]:44025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fFWth-0000xU-Vg for incoming@patchwork.ozlabs.org; Sun, 06 May 2018 23:33:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fFWt6-0000wa-UE for qemu-devel@nongnu.org; Sun, 06 May 2018 23:32:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fFWt3-0002bN-Qo for qemu-devel@nongnu.org; Sun, 06 May 2018 23:32:32 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fFWt3-0002ap-IU for qemu-devel@nongnu.org; Sun, 06 May 2018 23:32:29 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w473TWV2074178 for ; Sun, 6 May 2018 23:32:27 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hte6c98ke-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 06 May 2018 23:32:27 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 6 May 2018 23:32:26 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sun, 6 May 2018 23:32:24 -0400 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w473WNJa45875358; Mon, 7 May 2018 03:32:23 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 730A4AE034; Sun, 6 May 2018 23:34:20 -0400 (EDT) Received: from zyimindembp.cn.ibm.com (unknown [9.115.193.83]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id 141D4AE03B; Sun, 6 May 2018 23:34:17 -0400 (EDT) From: Yi Min Zhao To: qemu-devel@nongnu.org Date: Mon, 7 May 2018 11:32:14 +0800 X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180507033214.19219-1-zyimin@linux.ibm.com> References: <20180507033214.19219-1-zyimin@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050703-0052-0000-0000-000002E9FB83 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008984; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000258; SDB=6.01028625; UDB=6.00525538; IPR=6.00807758; MB=3.00020962; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-07 03:32:25 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050703-0053-0000-0000-00005C9751C2 Message-Id: <20180507033214.19219-2-zyimin@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-06_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805070035 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 1/1] sandbox: avoid to compile options if CONFIG_SECCOMP undefined X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: otubo@redhat.com, fiuczy@linux.ibm.com, jtomko@redhat.com, borntraeger@de.ibm.com, zyimin@linux.ibm.com, jferlan@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" If CONFIG_SECCOMP is undefined, the option 'elevatorprivileges' remains complied. This would make libvirt set the corresponding capability and then trigger the guest startup fails. So let's wrap the options with CONFIG_SECCOMP. Signed-off-by: Yi Min Zhao Acked-by: Eduardo Otubo --- vl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vl.c b/vl.c index fce1fd12d8..cb07b19c02 100644 --- a/vl.c +++ b/vl.c @@ -268,6 +268,7 @@ static QemuOptsList qemu_sandbox_opts = { .name = "enable", .type = QEMU_OPT_BOOL, }, +#ifdef CONFIG_SECCOMP { .name = "obsolete", .type = QEMU_OPT_STRING, @@ -284,6 +285,7 @@ static QemuOptsList qemu_sandbox_opts = { .name = "resourcecontrol", .type = QEMU_OPT_STRING, }, +#endif { /* end of list */ } }, };