Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1845337pxy; Sun, 2 May 2021 04:17:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqNBMstENNtZqLkwjKDHdbwZqFHnUOgQHVeZT5Rvsy2h/pzQc+b88mxbPJnXQWTU4ZqXRT X-Received: by 2002:a17:906:168d:: with SMTP id s13mr12119987ejd.81.1619954255877; Sun, 02 May 2021 04:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619954255; cv=none; d=google.com; s=arc-20160816; b=sF9wZyMxJtK8uMq7wzwvtrCE93X/MkACnezirgeCpEDAIgj7EZIG+RwEiSFw2v6NiW W9p39MqfiAcMfK0D96TK7urpeEXPl2e4d5vav/PuCbx60WSvSiGX04I9J0HfZtLy2/34 +D34rlTJ0gy1Vna0CFIPwSnkbVqtC3jvH6S3AEyE7K4RCBB7RWwgL7pBMj2CyOAXfvh4 iSSTlkqAzfczzPbiWxbyVMIaXlJZdMzSCyWVV2rJGtK1b4uFwTgeaqiYU6DaMA2Y9gUJ Ez2VnPNQeBytPUiBjkVnV5qbcAAihTMdU6w2uTuYA0T99vAEN4VRPEtjAIqJONS3N9EZ VGGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=hegzbX+BG3ARJokqf9dzmUxJ1A8+FLEQIrCPeGFPuyc=; b=RJEyhz1Wx/0PmVogeAu9Ts+jUFXiKeTO/642z9XrDpzX4SgzdvwxH8brDm4S4vUXi4 ROnIdOVbXSo/gxdUVWnZq1LJwmGXqK3mwDVY4eM+vH8Nbi8J/BCQKzVi/e4Lzp4oPG6a qRCMTygHFfdp8KmT39X1QLcxDzZHHBHO7sLYq9H91aZvJkdkMtmUbjhCneIeMyjWdCwH Ttzgc9s3eUXYo6sDv+/LhMmmvj0N1fcGS4CBFRRTBZJMspC/7hc/w75sD4pMZSwReG6f oMO4O3LzfMVwCnToCxK8smrlBzIyx0bima30qezD5ZJFB9ZBO2Aq4YAra+ncWLOaOSIW dPPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tdx1rLv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds10si9323524ejc.709.2021.05.02.04.17.09; Sun, 02 May 2021 04:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tdx1rLv8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231657AbhEBLRJ (ORCPT + 99 others); Sun, 2 May 2021 07:17:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbhEBLRJ (ORCPT ); Sun, 2 May 2021 07:17:09 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADB38C06174A; Sun, 2 May 2021 04:16:17 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id y7so3679824ejj.9; Sun, 02 May 2021 04:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to; bh=hegzbX+BG3ARJokqf9dzmUxJ1A8+FLEQIrCPeGFPuyc=; b=Tdx1rLv8CwXhcmPAtpYne5+asLQjsSFJZ34ac061bpRMRbd9YY1qi4F+BDP53GZUku dmwPpzaVQJjCcsTy6wU+LZAQp3dj7HaUemaFhUkQd8FM3QjIAkCFmH1tgUXlK3znP+Cp cqfAscrz6Re0B1Y6ViUWHdmeVvsoMO493qgiGDLGSBQ4dqp38+uEqUa8OQu5OkpzbXHA kglUeqkjJ8o4ectasYRy035ns7UFKbDCx7s6wUVwkXMi2BwUE9ETuEAmPZsw8elskF8b iOs8REJJR3JaiUK+kCINza4HRp1UOAvOGt8O2nlMrSdWuQO/zn3UdT+ALJp1t0+i+JNa VMvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to; bh=hegzbX+BG3ARJokqf9dzmUxJ1A8+FLEQIrCPeGFPuyc=; b=Q8pGPbGlyaUJoyCxhUsLRoWO4yYLWixqLiwGnS9XrMM+7e8avmJ2b8UPbVHkXWGUSZ qlt2mSTXSt1F8YrfxwAlgMTwxbgibckM/u29cE0Mt876cbLUqZmzgT28UIbbohDieSwL 7cmoAoIYfob6LltCtzSDkWcSEnSYIfMX9RnPv/PILcwUA2STPxc7TLSd6k1vJDeQVZXe 9+AsBpgzPfw7eorcUxCRiOsnyUi9S6TVjoFoFmCOf1ptj0jGuzAKsS7yQ/Iom8PY0KZx ErtmFiMScbZhtLunz+cJZpN+A/G1LPoQp3XhkpbAQajRRWtD5FqZYe8hkp0QSJKsPvzS J29g== X-Gm-Message-State: AOAM5317UvmQ1ZmUXInWM0TRSxP43sNaZ8hDh/+ByHikXplAIZ8eELOa MWVan088G/SAhVkLEkj0DgI= X-Received: by 2002:a17:906:cb2:: with SMTP id k18mr12575167ejh.183.1619954176335; Sun, 02 May 2021 04:16:16 -0700 (PDT) Received: from pevik ([62.201.25.198]) by smtp.gmail.com with ESMTPSA id r15sm5406495edp.62.2021.05.02.04.16.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 04:16:15 -0700 (PDT) Date: Sun, 2 May 2021 13:16:12 +0200 From: Petr Vorel To: Heiko Thiery Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Hemminger Subject: Re: [PATCH iproute2-next v2] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented Message-ID: Reply-To: Petr Vorel References: <20210430062632.21304-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Hi Petr, > Am Fr., 30. Apr. 2021 um 21:29 Uhr schrieb Petr Vorel : > > Hi, > > > > +++ b/lib/fs.c > > > > @@ -30,6 +30,27 @@ > > > > /* if not already mounted cgroup2 is mounted here for iproute2's use */ > > > > #define MNT_CGRP2_PATH "/var/run/cgroup2" > > > > + > > > > +#ifndef defined HAVE_HANDLE_AT > > > This is also wrong, it must be: > > > #ifndef HAVE_HANDLE_AT > > > > +struct file_handle { > > > > + unsigned handle_bytes; > > > > + int handle_type; > > > > + unsigned char f_handle[]; > > > > +}; > > > > + > > > > +int name_to_handle_at(int dirfd, const char *pathname, > > > > + struct file_handle *handle, int *mount_id, int flags) > > > > +{ > > > > + return syscall(name_to_handle_at, 5, dirfd, pathname, handle, > > > > + mount_id, flags); > > > Also I overlooked bogus 5 parameter, why is here? Correct is: > > > return syscall(__NR_name_to_handle_at, dfd, pathname, handle, > > > mount_id, flags); > > Uh, one more typo on my side, sorry (dfd => dirfd): > > return syscall(__NR_name_to_handle_at, dirfd, pathname, handle, > > mount_id, flags); > Thanks for the review and finding the sloppiness. I really should test > the changes before. Nevertheless, I will prepare a new version and > test it this time. I tested ss with changed I proposed and it looks like it's ok. But I run ss on qemu without any daemon running => I'll retest your v3 once you post it with some daemons running so that the code is really triggered. Kind regards, Petr > BR,