From owner-freebsd-hackers@freebsd.org Wed Apr 28 11:30:40 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17D4E5E6BD9 for ; Wed, 28 Apr 2021 11:30:40 +0000 (UTC) (envelope-from ionut.mihalache1506@gmail.com) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FVbzM2Vhmz4YKG; Wed, 28 Apr 2021 11:30:38 +0000 (UTC) (envelope-from ionut.mihalache1506@gmail.com) Received: by mail-wr1-x434.google.com with SMTP id x7so62600172wrw.10; Wed, 28 Apr 2021 04:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jRJ51X0trcfx+jrdWhYqPkMdXXJ6HPcyOyKaMtl4RLA=; b=aKEaN1ZJesKrLHh2VxWXjTDjWz8WxBb4BrhYYLLS4dVq3pgKf9LDthycJ4PFDmT9Wv BTUVFz+dxg+gmjduPetpkUY489KDMrNCZqqQtt/P2UqpKQPQ4nszXQmWf9lHsV0WzrC3 +0sGL+QOgaajQLG7cvpfNKZjz0DarmnW4k+iLy6xeLebvKH1ngQ5uwsmMebg8n7lXvrq eHqi7y7Hnwr2D0+lbfyMT42eVgILcb9mcdeYO8PqykMp/NpdYHlKKoepnSwg4aW7D28c ybu7C6NRNGLxdJZ+7Gm6N0RPX7X2BJ3fm3jYY6QgtQeGnutyHpcMKMqWmPS2fKQaN47A 2zJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jRJ51X0trcfx+jrdWhYqPkMdXXJ6HPcyOyKaMtl4RLA=; b=p5IOpHWUhIcFz7lfpK3hmFgM7FAmvK4jEGGfOt2exfrpfBONKf4rP1R5VvuSx/Sw/s uTFlj7zw/o/4Y0MGXjkLXB5HlLWN4wRFErMnjyBaWoDeSoiZ2J/Ew89PBLUcVaRn2o14 0nlAcW9pEBsMtvGBPyTvo1PGKCLXjFNsmhwGfrr/jA0ojrRsEOQJR1SGFLQDsKwNVLdh 5clP/WmPv1wqdmQN5RUr62L0Q2eOqRE2BR8cCuGqdigSa5M3VAUKLxUhyjkPTuaPC/sh NLlMYk0w8X3eRSquv1/VONq/mtLqr5erVEeWx9ci5kyseyxi6DyHZeBtYkCT3ZEiX4CL FTKA== X-Gm-Message-State: AOAM531q17ToeGIzEajFfwUQrNfTMTnqERrpw+zWjQRnwhxsKB+MlWBK cB7QVBGBekEMBxNpN8wDXeXgVxlSeHE1jGXkCehFjznXTK0= X-Google-Smtp-Source: ABdhPJz8ivsnFJZk49uLSmpMw8w/vE97c1jzoIT59JMJCoc7Sz4XoSlXFIVY2LVnxB6Yie6t4ZEw5+c3dOxoSAoBRXg= X-Received: by 2002:a05:6000:1547:: with SMTP id 7mr3355358wry.388.1619609437460; Wed, 28 Apr 2021 04:30:37 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Ionu=C8=9B_Mihalache?= Date: Wed, 28 Apr 2021 14:30:26 +0300 Message-ID: Subject: Re: cap_sysctlbyname for hw.vmm.destroy To: Mark Johnston Cc: freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 4FVbzM2Vhmz4YKG X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=aKEaN1ZJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ionutmihalache1506@gmail.com designates 2a00:1450:4864:20::434 as permitted sender) smtp.mailfrom=ionutmihalache1506@gmail.com X-Spamd-Result: default: False [-1.38 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.62)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::434:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::434:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::434:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 11:30:40 -0000 I tried to test the example from the documentation between here [1] and here [2]. The code stops here [3]. [1] - https://github.com/FreeBSD-UPB/freebsd-src/blob/3a08ffe4839de9b8396b1760f1d= c42b066428807/usr.sbin/bhyve/bhyverun.c#L1538 [2] - https://github.com/FreeBSD-UPB/freebsd-src/blob/3a08ffe4839de9b8396b1760f1d= c42b066428807/usr.sbin/bhyve/bhyverun.c#L1585 [3] - https://github.com/FreeBSD-UPB/freebsd-src/blob/3a08ffe4839de9b8396b1760f1d= c42b066428807/usr.sbin/bhyve/bhyverun.c#L1581 =C3=8En lun., 26 apr. 2021 la 20:40, Mark Johnston a sc= ris: > On Mon, Apr 26, 2021 at 05:16:14PM +0300, Ionu=C8=9B Mihalache wrote: > > Hello, > > > > I am working on adding capsicum support for the bhyve snapshot feature. > At > > the end of the suspend process, the guest should be destroyed and the > code > > handles this part with a sysctlbyname call which is not working in > > capability mode. I don't know what is the problem but even when using > > cap_sysctlbyname I still get the same error code (EPERM). I tried the > > example from the documentation aswell [1] and still the same error code= . > > What could be the problem? I have a FreeBSD13 host and a FreeBSD13 gues= t. > > I'm not sure why it would happen unless the casper process is somehow > running as a non-root user. Can you share the code you're testing > somewhere? >