Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7D40C433DF for ; Fri, 26 Jun 2020 07:36:27 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7422120775 for ; Fri, 26 Jun 2020 07:36:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N+dBt36e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7422120775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1joiu2-0004g0-Q9; Fri, 26 Jun 2020 07:36:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1joiu2-0004fv-22 for xen-devel@lists.xenproject.org; Fri, 26 Jun 2020 07:36:02 +0000 X-Inumbo-ID: aea68890-b77f-11ea-b7bb-bc764e2007e4 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id aea68890-b77f-11ea-b7bb-bc764e2007e4; Fri, 26 Jun 2020 07:36:01 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id t194so8397610wmt.4 for ; Fri, 26 Jun 2020 00:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:reply-to:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:content-language :thread-index; bh=CETvD1BVCb9PYKbxPYDHyrBKH39clrmwIBRG5ovO63c=; b=N+dBt36exrfHqWQw+QtXkHpvkeYCwgTmzgXE16kXfgvci7hZ+I0hvX19V3m8RfDdCI 2Z2qIrDUE0+dP21lkqBevUjyY0XcWa21kkE6juuGKHYKKKbsWXnHoTP/eGIHu6njzdFd zmFe/HQzIzaxCyi2to/fcBwkMib19MghkfcOFoNNUvUQn1PtRZ6whPd43rHsRw2RqiA+ etJ/yCKO43zHhmTFb8XNcvw71qdhWwRgrIfPaBeU6hrRwOGgAJfVmoC9zob+iOW/FXL9 yNi4ShauLilM76BohGM7DFzDkfRIlmeDqYC/Tis85kvbmvgrFbJnnonxQm9l1bXcwtwI TUmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:reply-to:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-transfer-encoding :content-language:thread-index; bh=CETvD1BVCb9PYKbxPYDHyrBKH39clrmwIBRG5ovO63c=; b=QgtQjnvR7ilociRyThXL4C1sPNkHAE20nMT8TYJosSyHqe9lpf7GhGjKDxyxyYc3Hn sG7HtOkR6WXPi3Kn9GpVhYavDYvLjl8f4iT2qWzz9TDYH7x5rYUaPAZx3rd/T/9GWDSF VmZB8W3coCXgGyuySZrJF0bMInlyIG3tvHYwv2ugXs1sAO41eURJADIFRiQBW2aNqqbf cXLnzg9lgR4VCCs8GKYIqXyZb78s/XpNsFPeq8wm0SlVlBvxJpT2QZio7Naa/6eOoQYs YoSTkVo4PAqi99i+2gU62xiEq0ocT7nyjZGBgbNuWSJbbS3VyenO2ulyemx26bs7e2/5 uZjg== X-Gm-Message-State: AOAM531yItNl9wQ2tgEaSBKKN5C3B7y6rTNPE9m88oXUmoJAqPNosdFU F/+yvKynT1BlkgCKk1qX09o= X-Google-Smtp-Source: ABdhPJzvrywodPf1EIrM7e6rsCey4b2r6rayff/RvVF0SWLE0p5lY5Dv9ETKfn+vh2Zfso/ZGgW/Bw== X-Received: by 2002:a1c:1d46:: with SMTP id d67mr2084783wmd.152.1593156960321; Fri, 26 Jun 2020 00:36:00 -0700 (PDT) Received: from CBGR90WXYV0 (54-240-197-236.amazon.com. [54.240.197.236]) by smtp.gmail.com with ESMTPSA id 92sm28852929wrr.96.2020.06.26.00.35.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2020 00:35:59 -0700 (PDT) From: Paul Durrant X-Google-Original-From: "Paul Durrant" To: "'Ian Jackson'" , "'Jason Andryuk'" References: <691aebb4-87af-60df-b6ad-07cb6fef4167@suse.com> <24308.50838.149966.847431@mariner.uk.xensource.com> <64c6a187-bf90-ae69-793b-0651bedd4f88@suse.com> <24308.53852.871947.61151@mariner.uk.xensource.com> In-Reply-To: <24308.53852.871947.61151@mariner.uk.xensource.com> Subject: RE: [PATCH] scripts: don't rely on "stat -" support Date: Fri, 26 Jun 2020 08:35:58 +0100 Message-ID: <000301d64b8c$6fd987c0$4f8c9740$@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQHcg0OOtNH1/o2UTx36U3QnAmwfsQFzhIFdAhU3WrgCrYBjdgHUyarnqJ257BA= X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Reply-To: paul@xen.org Cc: xen-devel@lists.xenproject.org, 'Wei Liu' , 'Jan Beulich' Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" > -----Original Message----- > From: Ian Jackson > Sent: 25 June 2020 17:36 > To: Jason Andryuk > Cc: Jan Beulich ; Paul Durrant ; xen-devel@lists.xenproject.org; Wei > Liu > Subject: Re: [PATCH] scripts: don't rely on "stat -" support > > Jason Andryuk writes ("Re: [PATCH] scripts: don't rely on "stat -" support"): > > On Thu, Jun 25, 2020 at 11:47 AM Jan Beulich wrote: > > > > > > On 25.06.2020 17:45, Ian Jackson wrote: > > > > Jan Beulich writes ("[PATCH] scripts: don't rely on "stat -" support"): > > > >> While commit b72682c602b8 ("scripts: Use stat to check lock claim") > > > >> validly indicates that stat has gained support for the special "-" > > > >> command line option in 2009, we should still try to avoid breaking being > > > >> able to run on even older distros. As it has been determined, contary to > > > >> the comment in the script using /dev/stdin (/proc/self/fd/$_lockfd) is > > > >> fine here, as Linux specially treats these /proc inodes. > > > >> > > > >> Suggested-by: Ian Jackson > > > >> Signed-off-by: Jan Beulich > > > > > > > > Thanks. > > > > > > > > The only code change here is this: > > > > > > > >> --- a/tools/hotplug/Linux/locking.sh > > > >> +++ b/tools/hotplug/Linux/locking.sh > > > >> @@ -45,18 +45,14 @@ claim_lock() > > > >> - if stat=$( stat -L -c '%D.%i' - $_lockfile 0<&$_lockfd 2>/dev/null ) > > > >> + if stat=$( stat -L -c '%D.%i' /dev/stdin $_lockfile 0<&$_lockfd 2>/dev/null ) > > > > > > > > Reviewed-by: Ian Jackson > > > > > > > > Has anyone executed this ? > > > > > > I have, of course, to confirm this fixes my issue. But I'm not sure > > > that's what you've meant to ask - you may have wanted assurance > > > that someone else has also tried it. > > > > Tested-by: Jason Andryuk > > Reviewed-by: Jason Andryuk > > :-). > In which case... Release-acked-by: Paul Durrant > Thanks, > Ian.