From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 412455A005E for ; Thu, 13 Oct 2022 07:16:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665638183; 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: in-reply-to:in-reply-to:references:references; bh=+1ujiKa/IfvfM5cSeUlyZDOPyAFNHxKvym7JKZSCh+c=; b=K+1+yXP4nT5SXosURs2k95YQWTEdMVlYvLY1D/4NMs9iS3dGnR59huSH36ou+y0lIJZ0Mm 26YZD/45O9luPvJmjr+CJC9tW5rSgSoOznaCKP720cqPjNI/vIse7ukgwu7VNAYLBtKpuh LVGM9fSJsIBRakCz3dMz7r1L6cHwtUc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-319-0hSV9B6eM3yEEEsKxAZsfw-1; Thu, 13 Oct 2022 01:16:21 -0400 X-MC-Unique: 0hSV9B6eM3yEEEsKxAZsfw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6419286F12C; Thu, 13 Oct 2022 05:16:21 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-3.brq.redhat.com [10.40.208.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 08B69C56603; Thu, 13 Oct 2022 05:16:20 +0000 (UTC) Date: Thu, 13 Oct 2022 07:15:52 +0200 From: Stefano Brivio To: David Gibson Subject: Re: Alas for CAP_NET_BIND_SERVICE Message-ID: <20221013071552.3b095559@elisabeth> In-Reply-To: <20221013065426.618e88b5@elisabeth> References: <20221012075432.09e33625@elisabeth> <20221012124707.70755587@elisabeth> <20221013065426.618e88b5@elisabeth> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 27F7QB5DESS47VZFTKDR7C3IZCEZF4M4 X-Message-ID-Hash: 27F7QB5DESS47VZFTKDR7C3IZCEZF4M4 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: <> Archived-At: List-Archive: <> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 13 Oct 2022 06:54:26 +0200 Stefano Brivio wrote: > Anyway, I drafted it... but this happens. I dropped pasta symlinks for > simplicity: > > -- > > # setcap 'cap_net_bind_service=+ep' /home/sbrivio/passt/pasta.avx2 > # getcap /home/sbrivio/passt/pasta.avx2 > /home/sbrivio/passt/pasta.avx2 cap_net_bind_service=ep > > -- > > $ strace -ebind,capget,capset,readlink -f ./pasta.avx2 -f -t 81 1763943 > readlink("/proc/self/exe", "/home/sbrivio/passt/pasta.avx2", 4095) = 30 > capget({version=_LINUX_CAPABILITY_VERSION_3, pid=0}, {effective=0, permitted=0, inheritable=0}) = 0 > capset({version=_LINUX_CAPABILITY_VERSION_3, pid=0}, {effective=0, permitted=0, inheritable=0}) = 0 > bind(5, {sa_family=AF_INET, sin_port=htons(81), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EACCES (Permission denied) > bind(5, {sa_family=AF_INET, sin_port=htons(81), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EACCES (Permission denied) > bind(5, {sa_family=AF_INET6, sin6_port=htons(81), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::", &sin6_addr), sin6_scope_id=0}, 28) = -1 EACCES (Permission denied) > bind(5, {sa_family=AF_INET6, sin6_port=htons(81), sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_scope_id=0}, 28) = -1 EACCES (Permission denied) > > -- > > no fancy filesystem attributes, just a very unassuming ext4. I must be > missing something very obvious. ...oops, never mind, it's strace, of course -- that's even mentioned in man 7 capabilities. -- Stefano