From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 E0E64C4727C for ; Tue, 29 Sep 2020 15:39:20 +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 625FF207F7 for ; Tue, 29 Sep 2020 15:39:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uJZw7Ezp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 625FF207F7 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 list by lists.xenproject.org with outflank-mailman.286.756 (Exim 4.92) (envelope-from ) id 1kNHie-0001vT-4M; Tue, 29 Sep 2020 15:39:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 286.756; Tue, 29 Sep 2020 15:39:08 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNHie-0001vM-1U; Tue, 29 Sep 2020 15:39:08 +0000 Received: by outflank-mailman (input) for mailman id 286; Tue, 29 Sep 2020 15:39:06 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNHic-0001vF-9s for xen-devel@lists.xenproject.org; Tue, 29 Sep 2020 15:39:06 +0000 Received: from mail-wr1-x434.google.com (unknown [2a00:1450:4864:20::434]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e432dde8-8cdc-44df-8623-9fd1b18c2fa3; Tue, 29 Sep 2020 15:39:05 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id z4so5953783wrr.4 for ; Tue, 29 Sep 2020 08:39:05 -0700 (PDT) Received: from CBGR90WXYV0 (54-240-197-225.amazon.com. [54.240.197.225]) by smtp.gmail.com with ESMTPSA id h17sm6939300wro.27.2020.09.29.08.39.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2020 08:39:04 -0700 (PDT) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kNHic-0001vF-9s for xen-devel@lists.xenproject.org; Tue, 29 Sep 2020 15:39:06 +0000 X-Inumbo-ID: e432dde8-8cdc-44df-8623-9fd1b18c2fa3 Received: from mail-wr1-x434.google.com (unknown [2a00:1450:4864:20::434]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id e432dde8-8cdc-44df-8623-9fd1b18c2fa3; Tue, 29 Sep 2020 15:39:05 +0000 (UTC) Received: by mail-wr1-x434.google.com with SMTP id z4so5953783wrr.4 for ; Tue, 29 Sep 2020 08:39:05 -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=x23F79DTOTS9yhFANy0A3w5uo1aOZv2Tizn+Ye4IFhY=; b=uJZw7EzpPH1eKEvFWAo2pIs4bnwXPkQ6BiXxSuuuVq4+pRKaCSZofpkpF3b4U7n+v1 lkZA+NV7A6alGx3W+1U6DjhhPdBz03r0LSh+EHt8Nn2qXEmZqfnQloo2MYqRrtDoCYv8 b6Jr5xSZYZaVU+Le4oItQTrubnVFTBNwNTZ/pdM+fDvXcBRjgF2I3a1SYcF5VKlQJUL2 bx5hwp5zS15IoFYC08saftYB388bUTWVp6WxlK5pOTPA94cukXO6zpGEW4gfdOJauMkS 0WMIj62e066LjaE0DyBO8x6t3k7Q+Z6rs74SRwWVkcyIlAV0eOWSOZxxfWaeZfS1V1wp jQIA== 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=x23F79DTOTS9yhFANy0A3w5uo1aOZv2Tizn+Ye4IFhY=; b=bb/C9gEUDyexSNAg+D7guSfAtBWsgXwXKf5E6JcR7fbjrcI2sgvUeZHqngEsJwjmS+ hsF4Wy50pAAbiB3EBpr/k6DvECbLvcJn4wMjXs9fh+ba0PHPmvOBgEeaOAKrWCFyi+sb vHMUPbBTDRMtAeFBF3qBUoYOSUcumL3O0P1IV+ZlGULT5j/judgiDOIjGqIAC0fZsj89 u3JCOPHxdWZ6H476jsaCqzgMFBntCkYCrfXAQZsIXGkNJeDbJZD2s2l8KceCy8KkPJrj RS8V7E62ZUN39wDmxdm8sa5oJf2/DI1ufjYwRKefO+fRP3D+JOV7v2emMlhNnrzYKf+n oMtg== X-Gm-Message-State: AOAM531Cehjzl/n568r+gsd1qRKHZ3edXD3oYenDoO1KW6sTHFJfiz+X AEf+eXNGw53MDPdZ/ppe2Cw= X-Google-Smtp-Source: ABdhPJyn4fnivZcdFTRHMuDGXORWRohyn03N0zD8NDurehKqXTlHL6ZOF+/tM2TMbK4xB1Ky+WQYSw== X-Received: by 2002:a5d:6412:: with SMTP id z18mr5021338wru.30.1601393944793; Tue, 29 Sep 2020 08:39:04 -0700 (PDT) Received: from CBGR90WXYV0 (54-240-197-225.amazon.com. [54.240.197.225]) by smtp.gmail.com with ESMTPSA id h17sm6939300wro.27.2020.09.29.08.39.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Sep 2020 08:39:04 -0700 (PDT) From: Paul Durrant X-Google-Original-From: "Paul Durrant" Reply-To: To: "'Jan Beulich'" , Cc: "'Andrew Cooper'" , "'George Dunlap'" , "'Ian Jackson'" , "'Julien Grall'" , "'Wei Liu'" , "'Stefano Stabellini'" References: <0d5ffc89-4b04-3e06-e950-f0cb171c7419@suse.com> In-Reply-To: Subject: RE: [PATCH 01/12] evtchn: refuse EVTCHNOP_status for Xen-bound event channels Date: Tue, 29 Sep 2020 16:39:03 +0100 Message-ID: <001e01d69676$a91ff700$fb5fe500$@xen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-gb Thread-Index: AQHyn6bUUfstxLK2yDInWW9SM20ChgIMxSdDqTdHBAA= > -----Original Message----- > From: Xen-devel On Behalf Of Jan Beulich > Sent: 28 September 2020 11:56 > To: xen-devel@lists.xenproject.org > Cc: Andrew Cooper ; George Dunlap ; Ian > Jackson ; Julien Grall ; Wei Liu ; Stefano Stabellini > > Subject: [PATCH 01/12] evtchn: refuse EVTCHNOP_status for Xen-bound event channels > > Callers have no business knowing the state of the Xen end of an event > channel. > > Signed-off-by: Jan Beulich > Reviewed-by: Paul Durrant > --- a/xen/common/event_channel.c > +++ b/xen/common/event_channel.c > @@ -933,6 +933,11 @@ int evtchn_status(evtchn_status_t *statu > } > > chn = evtchn_from_port(d, port); > + if ( consumer_is_xen(chn) ) > + { > + rc = -EACCES; > + goto out; > + } > > rc = xsm_evtchn_status(XSM_TARGET, d, chn); > if ( rc ) >