From nobody Wed May 15 00:02:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1651486075; cv=none; d=zohomail.com; s=zohoarc; b=RiEaL6gRmjnPdG4QqdTBg5KOZVaLPXGtutW/nrW8+z3w9wkkhcFGZ9RACPtD4raouLw0DaKGuSgu2D4wA73RnFFmF5iPC2tGzq50fAlCcBIDAh/8/lxT23R5KWO3wfPm9xlY+6elD/spNy+wv1lCoSIjmsApQf2yfxqaINI61P8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1651486075; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=dSazRnUrhG2E0eGygBKI1IfushgTILxOn4bMfGXU/uA=; b=OUCSM6t/Nbw6CG9+wN6iVzSb5vVVPLTGkZryPvvzKQ+42D0P4I+eNHGlxF/DaerMdJRzx/apxZD8veNtRp4Q4UCNdLwx71mpDpd0nocKBczmZ4hiFiUc/kLinb1z/uKeBdZGw1nPxOEVs+9NsHraij8DtsFIN2auOofqadsxA9I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1651486075418148.44286712887288; Mon, 2 May 2022 03:07:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.318763.538665 (Exim 4.92) (envelope-from ) id 1nlSxk-0002Vb-PX; Mon, 02 May 2022 10:07:28 +0000 Received: by outflank-mailman (output) from mailman id 318763.538665; Mon, 02 May 2022 10:07:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nlSxk-0002VU-Ma; Mon, 02 May 2022 10:07:28 +0000 Received: by outflank-mailman (input) for mailman id 318763; Mon, 02 May 2022 10:07:26 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nlSxi-0002VO-UX for xen-devel@lists.xenproject.org; Mon, 02 May 2022 10:07:26 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id aa9638de-c9ff-11ec-a405-831a346695d4; Mon, 02 May 2022 12:07:26 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6F2AC210E1; Mon, 2 May 2022 10:07:25 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3AAC613491; Mon, 2 May 2022 10:07:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id q2usDF2tb2IjOQAAMHmgww (envelope-from ); Mon, 02 May 2022 10:07:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: aa9638de-c9ff-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1651486045; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dSazRnUrhG2E0eGygBKI1IfushgTILxOn4bMfGXU/uA=; b=DJ/JY3vLaoNFkN3FaHETJ+PESajiRM+DJEqB2p0nlJ9vuowwjnFm4+o6LFGQhv7Gp4hTVV tCzANf5AlFaSHVgdpgf8VdNloGhRGWWgZ0XHIsORNmeNjmzkLQYCndaE5s12z+326Hmfss yAYBS6NvdYjkhbimTTrbUMCdeuSQCDc= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Julien Grall , Anthony PERARD , Raphael Ning Subject: [PATCH v2] tools/xenstore: don't let special watches be children of / Date: Mon, 2 May 2022 12:07:22 +0200 Message-Id: <20220502100722.17250-1-jgross@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1651486078048100001 Content-Type: text/plain; charset="utf-8" When firing special watches (e.g. "@releaseDomain"), they will be regarded to be valid children of the "/" node. So a domain having registered a watch for "/" and having the privilege to receive the special watches will receive those special watch events for the registered "/" watch. Fix that by calling the related fire_watches() with the "exact" parameter set to true, causing a mismatch for the "/" node. Reported-by: Raphael Ning Signed-off-by: Juergen Gross Reviewed-by: Raphael Ning Reviewed-by: Julien Grall --- V2: - use Rapahael's amazon mail address --- tools/xenstore/xenstored_domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_d= omain.c index ae065fcbee..80ba1d627b 100644 --- a/tools/xenstore/xenstored_domain.c +++ b/tools/xenstore/xenstored_domain.c @@ -231,7 +231,7 @@ static int destroy_domain(void *_domain) unmap_interface(domain->interface); } =20 - fire_watches(NULL, domain, "@releaseDomain", NULL, false, NULL); + fire_watches(NULL, domain, "@releaseDomain", NULL, true, NULL); =20 wrl_domain_destroy(domain); =20 @@ -282,7 +282,7 @@ void check_domains(void) } =20 if (notify) - fire_watches(NULL, NULL, "@releaseDomain", NULL, false, NULL); + fire_watches(NULL, NULL, "@releaseDomain", NULL, true, NULL); } =20 /* We scan all domains rather than use the information given here. */ @@ -495,7 +495,7 @@ static struct domain *introduce_domain(const void *ctx, =20 if (!is_master_domain && !restore) fire_watches(NULL, ctx, "@introduceDomain", NULL, - false, NULL); + true, NULL); } else { /* Use XS_INTRODUCE for recreating the xenbus event-channel. */ if (domain->port) --=20 2.34.1