From patchwork Thu Dec 12 22:35:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 1208869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; 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=kaod.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YpZV3xjKz9sPL for ; Fri, 13 Dec 2019 09:37:04 +1100 (AEDT) Received: from localhost ([::1]:38006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX4v-0000Tg-6M for incoming@patchwork.ozlabs.org; Thu, 12 Dec 2019 17:37:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33910) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX4O-0000Ry-8Y for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifX4M-0008Pj-OK for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:28 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:27920) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifX4M-0008Nv-Fs for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:26 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBCMWQ0U130886 for ; Thu, 12 Dec 2019 17:36:25 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wuhsd29xv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Dec 2019 17:36:25 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Dec 2019 22:36:23 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 12 Dec 2019 22:36:21 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBCMaKcc47251930 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Dec 2019 22:36:20 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F9E5AE05F; Thu, 12 Dec 2019 22:36:20 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B636AE05D; Thu, 12 Dec 2019 22:36:20 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 Dec 2019 22:36:20 +0000 (GMT) Received: from bahia.ibmuc.com (sig-9-145-185-241.de.ibm.com [9.145.185.241]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id C1043220110; Thu, 12 Dec 2019 23:36:19 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 1/5] virtfs-proxy-helper: switch from libcap to libcap-ng Date: Thu, 12 Dec 2019 23:35:56 +0100 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191212223601.309245-1-groug@kaod.org> References: <20191212223601.309245-1-groug@kaod.org> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19121222-0028-0000-0000-000003C7FBB5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121222-0029-0000-0000-0000248B3727 Message-Id: <20191212223601.309245-2-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-12-12_07:2019-12-12, 2019-12-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 adultscore=0 clxscore=1034 phishscore=0 mlxlogscore=999 suspectscore=8 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912120172 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id xBCMWQ0U130886 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?b?w6k=?= , Greg Kurz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini virtfs-proxy-helper is the only user of libcap; everyone else is using the simpler libcap-ng API. Switch and remove the configure code to detect libcap. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Greg Kurz [groug: - drop remaining -lcap from Makefile - fix error message in configure] Signed-off-by: Greg Kurz --- Makefile | 1 - configure | 20 +------- fsdev/virtfs-proxy-helper.c | 100 ++++++++++++++++-------------------- 3 files changed, 47 insertions(+), 74 deletions(-) diff --git a/Makefile b/Makefile index b437a346d71a..1361def1441c 100644 --- a/Makefile +++ b/Makefile @@ -575,7 +575,6 @@ qemu-keymap$(EXESUF): qemu-keymap.o ui/input-keymap.o $(COMMON_LDADDS) qemu-edid$(EXESUF): qemu-edid.o hw/display/edid-generate.o $(COMMON_LDADDS) fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS) -fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) ifdef CONFIG_MPATH diff --git a/configure b/configure index 6099be1d848c..2c72e04d23f3 100755 --- a/configure +++ b/configure @@ -3863,22 +3863,6 @@ else mpathpersist=no fi -########################################## -# libcap probe - -if test "$cap" != "no" ; then - cat > $TMPC < -#include -int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; } -EOF - if compile_prog "" "-lcap" ; then - cap=yes - else - cap=no - fi -fi - ########################################## # pthread probe PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2" @@ -6204,12 +6188,12 @@ if test "$want_tools" = "yes" ; then fi if test "$softmmu" = yes ; then if test "$linux" = yes; then - if test "$virtfs" != no && test "$cap" = yes && test "$attr" = yes ; then + if test "$virtfs" != no && test "$cap_ng" = yes && test "$attr" = yes ; then virtfs=yes tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)" else if test "$virtfs" = yes; then - error_exit "VirtFS requires libcap devel and libattr devel" + error_exit "VirtFS requires libcap-ng devel and libattr devel" fi virtfs=no fi diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 6f132c5ff15a..0d4de49dcf75 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -21,6 +20,7 @@ #ifdef CONFIG_LINUX_MAGIC_H #include #endif +#include #include "qemu-common.h" #include "qemu/sockets.h" #include "qemu/xattr.h" @@ -79,49 +79,10 @@ static void do_perror(const char *string) } } -static int do_cap_set(cap_value_t *cap_value, int size, int reset) -{ - cap_t caps; - if (reset) { - /* - * Start with an empty set and set permitted and effective - */ - caps = cap_init(); - if (caps == NULL) { - do_perror("cap_init"); - return -1; - } - if (cap_set_flag(caps, CAP_PERMITTED, size, cap_value, CAP_SET) < 0) { - do_perror("cap_set_flag"); - goto error; - } - } else { - caps = cap_get_proc(); - if (!caps) { - do_perror("cap_get_proc"); - return -1; - } - } - if (cap_set_flag(caps, CAP_EFFECTIVE, size, cap_value, CAP_SET) < 0) { - do_perror("cap_set_flag"); - goto error; - } - if (cap_set_proc(caps) < 0) { - do_perror("cap_set_proc"); - goto error; - } - cap_free(caps); - return 0; - -error: - cap_free(caps); - return -1; -} - static int init_capabilities(void) { /* helper needs following capabilities only */ - cap_value_t cap_list[] = { + int cap_list[] = { CAP_CHOWN, CAP_DAC_OVERRIDE, CAP_FOWNER, @@ -130,7 +91,34 @@ static int init_capabilities(void) CAP_MKNOD, CAP_SETUID, }; - return do_cap_set(cap_list, ARRAY_SIZE(cap_list), 1); + int i; + + capng_clear(CAPNG_SELECT_BOTH); + for (i = 0; i < ARRAY_SIZE(cap_list); i++) { + if (capng_update(CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED, + cap_list[i]) < 0) { + do_perror("capng_update"); + return -1; + } + } + if (capng_apply(CAPNG_SELECT_BOTH) < 0) { + do_perror("capng_apply"); + return -1; + } + + /* Prepare effective set for setugid. */ + for (i = 0; i < ARRAY_SIZE(cap_list); i++) { + if (cap_list[i] == CAP_DAC_OVERRIDE) { + continue; + } + + if (capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, + cap_list[i]) < 0) { + do_perror("capng_update"); + return -1; + } + } + return 0; } static int socket_read(int sockfd, void *buff, ssize_t size) @@ -295,14 +283,6 @@ static int setugid(int uid, int gid, int *suid, int *sgid) { int retval; - /* - * We still need DAC_OVERRIDE because we don't change - * supplementary group ids, and hence may be subjected DAC rules - */ - cap_value_t cap_list[] = { - CAP_DAC_OVERRIDE, - }; - *suid = geteuid(); *sgid = getegid(); @@ -316,11 +296,21 @@ static int setugid(int uid, int gid, int *suid, int *sgid) goto err_sgid; } - if (uid != 0 || gid != 0) { - if (do_cap_set(cap_list, ARRAY_SIZE(cap_list), 0) < 0) { - retval = -errno; - goto err_suid; - } + if (uid == 0 && gid == 0) { + /* Linux has already copied the permitted set to the effective set. */ + return 0; + } + + /* + * All capabilities have been cleared from the effective set. However + * we still need DAC_OVERRIDE because we don't change supplementary + * group ids, and hence may be subject to DAC rules. init_capabilities + * left the set of capabilities that we want in libcap-ng's state. + */ + if (capng_apply(CAPNG_SELECT_CAPS) < 0) { + retval = -errno; + do_perror("capng_apply"); + goto err_suid; } return 0; From patchwork Thu Dec 12 22:35:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 1208871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; 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=kaod.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Ypcl71BPz9sPh for ; Fri, 13 Dec 2019 09:39:03 +1100 (AEDT) Received: from localhost ([::1]:38022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX6r-00039P-Sb for incoming@patchwork.ozlabs.org; Thu, 12 Dec 2019 17:39:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34433) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX4R-0000UA-7u for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifX4Q-0008Ur-3Z for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:31 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:15330 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifX4P-0008Tk-Up for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:30 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBCMWO96038399 for ; Thu, 12 Dec 2019 17:36:28 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wusnb8qxa-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Dec 2019 17:36:28 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Dec 2019 22:36:26 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 12 Dec 2019 22:36:23 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBCMaMcI53674140 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Dec 2019 22:36:22 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DAEEB52071; Thu, 12 Dec 2019 22:36:22 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id C77825206C; Thu, 12 Dec 2019 22:36:22 +0000 (GMT) Received: from bahia.ibmuc.com (sig-9-145-185-241.de.ibm.com [9.145.185.241]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 45C47220110; Thu, 12 Dec 2019 23:36:22 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 2/5] docker: remove libcap development packages Date: Thu, 12 Dec 2019 23:35:57 +0100 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191212223601.309245-1-groug@kaod.org> References: <20191212223601.309245-1-groug@kaod.org> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19121222-0008-0000-0000-000003404451 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121222-0009-0000-0000-00004A604866 Message-Id: <20191212223601.309245-3-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-12-12_07:2019-12-12, 2019-12-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 suspectscore=2 impostorscore=0 phishscore=0 mlxscore=0 clxscore=1034 lowpriorityscore=0 mlxlogscore=876 priorityscore=1501 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912120172 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id xBCMWO96038399 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Greg Kurz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini Libcap was dropped from virtio-9p (commit 7e46261368d1), so remove it from the dockerfiles as well. Signed-off-by: Paolo Bonzini Acked-by: Alex Bennée [groug, mention SHA1 that dropped libcap] Signed-off-by: Greg Kurz --- tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/ubuntu.docker | 1 - tests/docker/dockerfiles/ubuntu1804.docker | 1 - 3 files changed, 3 deletions(-) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 4ddc7dd112a2..47732fc5d565 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -25,7 +25,6 @@ ENV PACKAGES \ libasan \ libattr-devel \ libblockdev-mpath-devel \ - libcap-devel \ libcap-ng-devel \ libcurl-devel \ libfdt-devel \ diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index f4864922240b..ecea155646ea 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -23,7 +23,6 @@ ENV PACKAGES flex bison \ libbrlapi-dev \ libbz2-dev \ libcacard-dev \ - libcap-dev \ libcap-ng-dev \ libcurl4-gnutls-dev \ libdrm-dev \ diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dockerfiles/ubuntu1804.docker index 3cc4f492c4a7..32a607471a0c 100644 --- a/tests/docker/dockerfiles/ubuntu1804.docker +++ b/tests/docker/dockerfiles/ubuntu1804.docker @@ -12,7 +12,6 @@ ENV PACKAGES flex bison \ libbrlapi-dev \ libbz2-dev \ libcacard-dev \ - libcap-dev \ libcap-ng-dev \ libcurl4-gnutls-dev \ libdrm-dev \ From patchwork Thu Dec 12 22:35:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 1208872 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; 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=kaod.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Ypcy41BKz9sPc for ; Fri, 13 Dec 2019 09:39:14 +1100 (AEDT) Received: from localhost ([::1]:38026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX72-0003QJ-BS for incoming@patchwork.ozlabs.org; Thu, 12 Dec 2019 17:39:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37580) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX4k-0000u8-E4 for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifX4j-0000bd-9T for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:50 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:4756) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifX4j-0000Zm-0m for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:49 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBCMWRhq079791 for ; Thu, 12 Dec 2019 17:36:48 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wugd2wmej-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Dec 2019 17:36:47 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Dec 2019 22:36:45 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 12 Dec 2019 22:36:43 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBCMa0dx15728936 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Dec 2019 22:36:00 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2FAD8A405F; Thu, 12 Dec 2019 22:36:42 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CD17A405B; Thu, 12 Dec 2019 22:36:42 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 Dec 2019 22:36:42 +0000 (GMT) Received: from bahia.ibmuc.com (sig-9-145-185-241.de.ibm.com [9.145.185.241]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 596D0220110; Thu, 12 Dec 2019 23:36:41 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 3/5] ci: Use libcap-ng Date: Thu, 12 Dec 2019 23:35:58 +0100 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191212223601.309245-1-groug@kaod.org> References: <20191212223601.309245-1-groug@kaod.org> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19121222-0012-0000-0000-000003744299 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121222-0013-0000-0000-000021B0206B Message-Id: <20191212223601.309245-4-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-12-12_07:2019-12-12, 2019-12-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=2 mlxlogscore=953 clxscore=1034 adultscore=0 malwarescore=0 priorityscore=1501 spamscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912120172 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id xBCMWRhq079791 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Greg Kurz , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Dr. David Alan Gilbert" We currently enable libcap-dev in build-clang to pick up the 9p proxy helper. Paolo's patch changes (commit 7e46261368d1) that to use libcap-ng, so switch to using it. This also means we'll be testing the scsi pr manager and the bridge helper. Signed-off-by: Dr. David Alan Gilbert Acked-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé [groug, mention SHA1 that dropped libcap] Signed-off-by: Greg Kurz --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be57c6a454a5..62a96097983d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,7 @@ build-user: build-clang: script: - - apt-get install -y -qq clang libsdl2-dev libattr1-dev libcap-dev + - apt-get install -y -qq clang libsdl2-dev libattr1-dev libcap-ng-dev xfslibs-dev libiscsi-dev libnfs-dev libseccomp-dev gnutls-dev librbd-dev - ./configure --cc=clang --cxx=clang++ --enable-werror --target-list="alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu From patchwork Thu Dec 12 22:35:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 1208870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; 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=kaod.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Ypb41cX1z9sPc for ; Fri, 13 Dec 2019 09:37:36 +1100 (AEDT) Received: from localhost ([::1]:38008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX5R-0000yp-G4 for incoming@patchwork.ozlabs.org; Thu, 12 Dec 2019 17:37:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX4m-0000v2-08 for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifX4j-0000c2-Kl for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:51 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:5992 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifX4j-0000bV-Fz for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:49 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBCMX5kL080973 for ; Thu, 12 Dec 2019 17:36:49 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2wusmk10tk-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Dec 2019 17:36:48 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Dec 2019 22:36:47 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 12 Dec 2019 22:36:45 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBCMaihH58720464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Dec 2019 22:36:44 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1F19611C054; Thu, 12 Dec 2019 22:36:44 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A77311C052; Thu, 12 Dec 2019 22:36:44 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 Dec 2019 22:36:44 +0000 (GMT) Received: from bahia.ibmuc.com (sig-9-145-185-241.de.ibm.com [9.145.185.241]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 597B3220110; Thu, 12 Dec 2019 23:36:43 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 4/5] travis.yml: Drop libcap-dev Date: Thu, 12 Dec 2019 23:35:59 +0100 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191212223601.309245-1-groug@kaod.org> References: <20191212223601.309245-1-groug@kaod.org> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19121222-0008-0000-0000-000003404458 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121222-0009-0000-0000-00004A60486D Message-Id: <20191212223601.309245-5-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-12-12_07:2019-12-12, 2019-12-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 suspectscore=2 spamscore=0 adultscore=0 mlxscore=0 mlxlogscore=879 priorityscore=1501 lowpriorityscore=0 bulkscore=0 impostorscore=0 malwarescore=0 clxscore=1034 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912120172 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-001b2d01.pphosted.com id xBCMX5kL080973 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Greg Kurz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Commit 7e46261368d1 converted virtfs-proxy-helper to using libcap-ng. There aren't any users of libcap anymore. No need to install libcap-dev. Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alex Bennée --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 445b0646c18a..6cb8af6fa599 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,6 @@ addons: - libaio-dev - libattr1-dev - libbrlapi-dev - - libcap-dev - libcap-ng-dev - libgcc-4.8-dev - libgnutls28-dev From patchwork Thu Dec 12 22:36:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 1208873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; 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=kaod.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YpfS64qvz9sPK for ; Fri, 13 Dec 2019 09:40:32 +1100 (AEDT) Received: from localhost ([::1]:38038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX8I-0005AX-Or for incoming@patchwork.ozlabs.org; Thu, 12 Dec 2019 17:40:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifX4n-0000xS-VE for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifX4m-0000hP-IZ for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:53 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifX4m-0000fU-9j for qemu-devel@nongnu.org; Thu, 12 Dec 2019 17:36:52 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBCMWR4L079832 for ; Thu, 12 Dec 2019 17:36:51 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wugd2wmgd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Dec 2019 17:36:51 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Dec 2019 22:36:49 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 12 Dec 2019 22:36:46 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBCMajrr52887572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Dec 2019 22:36:45 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 902B711C066; Thu, 12 Dec 2019 22:36:45 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7BF2811C052; Thu, 12 Dec 2019 22:36:45 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 Dec 2019 22:36:45 +0000 (GMT) Received: from bahia.ibmuc.com (sig-9-145-185-241.de.ibm.com [9.145.185.241]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id EFDD4220110; Thu, 12 Dec 2019 23:36:44 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org, Peter Maydell Subject: [PULL 5/5] virtfs: Remove the deprecated "-virtfs_synth" option Date: Thu, 12 Dec 2019 23:36:00 +0100 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191212223601.309245-1-groug@kaod.org> References: <20191212223601.309245-1-groug@kaod.org> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19121222-0016-0000-0000-000002D441B9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121222-0017-0000-0000-000033366A4A Message-Id: <20191212223601.309245-6-groug@kaod.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95, 18.0.572 definitions=2019-12-12_07:2019-12-12, 2019-12-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=2 mlxlogscore=999 clxscore=1034 adultscore=0 malwarescore=0 priorityscore=1501 spamscore=0 bulkscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912120172 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Greg Kurz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth It's been marked as deprecated since QEMU v4.1, time to remove it now. Signed-off-by: Thomas Huth Signed-off-by: Greg Kurz --- qemu-deprecated.texi | 5 ----- qemu-options.hx | 10 ---------- vl.c | 23 ----------------------- 3 files changed, 38 deletions(-) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 4b4b7425ac1e..8471eef9c22d 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -89,11 +89,6 @@ error in the future. The @code{-realtime mlock=on|off} argument has been replaced by the @code{-overcommit mem-lock=on|off} argument. -@subsection -virtfs_synth (since 4.1) - -The ``-virtfs_synth'' argument is now deprecated. Please use ``-fsdev synth'' -and ``-device virtio-9p-...'' instead. - @subsection -numa node,mem=@var{size} (since 4.1) The parameter @option{mem} of @option{-numa node} is used to assign a part of diff --git a/qemu-options.hx b/qemu-options.hx index 65c9473b7325..4cf7751adeba 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1468,16 +1468,6 @@ would still return entries from other devices). @end table ETEXI -DEF("virtfs_synth", 0, QEMU_OPTION_virtfs_synth, - "-virtfs_synth Create synthetic file system image\n", - QEMU_ARCH_ALL) -STEXI -@item -virtfs_synth -@findex -virtfs_synth -Create synthetic file system image. Note that this option is now deprecated. -Please use @code{-fsdev synth} and @code{-device virtio-9p-...} instead. -ETEXI - DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi, "-iscsi [user=user][,password=password]\n" " [,header-digest=CRC32C|CR32C-NONE|NONE-CRC32C|NONE\n" diff --git a/vl.c b/vl.c index 6a65a64bfd64..c0904b365b55 100644 --- a/vl.c +++ b/vl.c @@ -3374,29 +3374,6 @@ int main(int argc, char **argv, char **envp) qemu_opt_get(opts, "mount_tag"), &error_abort); break; } - case QEMU_OPTION_virtfs_synth: { - QemuOpts *fsdev; - QemuOpts *device; - - warn_report("'-virtfs_synth' is deprecated, please use " - "'-fsdev synth' and '-device virtio-9p-...' " - "instead"); - - fsdev = qemu_opts_create(qemu_find_opts("fsdev"), "v_synth", - 1, NULL); - if (!fsdev) { - error_report("duplicate option: %s", "virtfs_synth"); - exit(1); - } - qemu_opt_set(fsdev, "fsdriver", "synth", &error_abort); - - device = qemu_opts_create(qemu_find_opts("device"), NULL, 0, - &error_abort); - qemu_opt_set(device, "driver", "virtio-9p-pci", &error_abort); - qemu_opt_set(device, "fsdev", "v_synth", &error_abort); - qemu_opt_set(device, "mount_tag", "v_synth", &error_abort); - break; - } case QEMU_OPTION_serial: add_device_config(DEV_SERIAL, optarg); default_serial = 0;