Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp38399pxp; Thu, 10 Mar 2022 21:53:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMAaZ+d7Sdlp3SOOvREY7Nyzl3y2n3wyyhXZAqyjcoZiMa8Y84/E71uHOviYEt+9kwBeBR X-Received: by 2002:a17:90b:3b8c:b0:1bf:8842:28c9 with SMTP id pc12-20020a17090b3b8c00b001bf884228c9mr9018960pjb.169.1646978020225; Thu, 10 Mar 2022 21:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646978020; cv=none; d=google.com; s=arc-20160816; b=GYoOYlJgwjTjghp51+vChIfwDRlrG2BounpNKcAXzP7CDAxWxkBrZPahfKji+oEy7G GbdBWEZHBvyLOAABysGHP1MDvnXoxWJ42T3SyClpgHkLV8j7nJzNddJRFJSgPZUQQto+ IzIU1N8EIG8YR75L3zkMtmsaTpXlt2U2ObF6zuzvf7XQhAaCl3bMxWOz7ULxb0PwRmeH 1QxoHc2kAueP3AZvbE5qdkWAw28kdU9PbT5V6TM6QJuA+EUe3rtMNB6REO9/vBwMNppp 1fYfIYhGTHlhluyWUXnU2Te50WNqWdA6gjrVBPUrAGsWQ5kbEEjmDIkX+gwFuSze46aZ q72g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nnuiIrcQFSzbsXOsh/LY2G4ZNtvzaOflZKUI3pGP8Aw=; b=ZMkBXFKegBwZ3flV/Qe0GgAf0i4n/NskXhSsAJXJ8NHkEcIWwyhDX2PR7K0nR4XxNr qFZ+WNN9V2Vsr20an7oQHwv8F0UQqRj3aGfZLRIslyBMFZ1nzVGPu/zgy86j/HaglDj6 CL4C7Tc7MM9sN8qvvrOjdmAvj4OxGrZqJMZJnR/cfn2/0QlEP8ewAKr2VmA5xrO9WxQN 7ANsfVjvuKG/GiXJgAaT8SIBHM27fTXxzVZJGcSQcDt6x4d+mQRftUeP4HyXu5LkyjHZ /RhjccbfIb13XQo2uDFADpT6YljsxWAnqSiG8G4kXpP3ZiT81WeaLM5oF64H+N4Kyz3Y pcpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HbJiD64l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g29-20020a63565d000000b003746eb98272si7216977pgm.91.2022.03.10.21.53.24; Thu, 10 Mar 2022 21:53:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HbJiD64l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243433AbiCJOXl (ORCPT + 99 others); Thu, 10 Mar 2022 09:23:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244420AbiCJOTT (ORCPT ); Thu, 10 Mar 2022 09:19:19 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB3A6BE1F9; Thu, 10 Mar 2022 06:16:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DA757B82678; Thu, 10 Mar 2022 14:15:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D73FC340EB; Thu, 10 Mar 2022 14:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646921733; bh=dq19W6oxUYyrbAuGknlft7AXPns9xdQ4oMNvwdExZjM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HbJiD64lEXkV8NkRIbgIPh4C0vzGTM1iIypzsqgpkC04S+s948Q52vOcQbEtOEFm5 RrxGjblFtsP9/YuwynB/h6u6yLCuZKrP4inenon33gM+J6iCVqDvUK2xZROjUNTcbH NAXvHv9eV2bql9YjRKb0s0bT09DO7ELH2R/8eFwQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Juergen Gross , Jan Beulich Subject: [PATCH 4.9 36/38] xen: remove gnttab_query_foreign_access() Date: Thu, 10 Mar 2022 15:13:49 +0100 Message-Id: <20220310140809.185890974@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220310140808.136149678@linuxfoundation.org> References: <20220310140808.136149678@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Juergen Gross Commit 1dbd11ca75fe664d3e54607547771d021f531f59 upstream. Remove gnttab_query_foreign_access(), as it is unused and unsafe to use. All previous use cases assumed a grant would not be in use after gnttab_query_foreign_access() returned 0. This information is useless in best case, as it only refers to a situation in the past, which could have changed already. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Signed-off-by: Greg Kroah-Hartman --- drivers/xen/grant-table.c | 19 ------------------- include/xen/grant_table.h | 2 -- 2 files changed, 21 deletions(-) --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -113,13 +113,6 @@ struct gnttab_ops { * return the frame. */ unsigned long (*end_foreign_transfer_ref)(grant_ref_t ref); - /* - * Query the status of a grant entry. Ref parameter is reference of - * queried grant entry, return value is the status of queried entry. - * Detailed status(writing/reading) can be gotten from the return value - * by bit operations. - */ - int (*query_foreign_access)(grant_ref_t ref); }; struct unmap_refs_callback_data { @@ -254,17 +247,6 @@ int gnttab_grant_foreign_access(domid_t } EXPORT_SYMBOL_GPL(gnttab_grant_foreign_access); -static int gnttab_query_foreign_access_v1(grant_ref_t ref) -{ - return gnttab_shared.v1[ref].flags & (GTF_reading|GTF_writing); -} - -int gnttab_query_foreign_access(grant_ref_t ref) -{ - return gnttab_interface->query_foreign_access(ref); -} -EXPORT_SYMBOL_GPL(gnttab_query_foreign_access); - static int gnttab_end_foreign_access_ref_v1(grant_ref_t ref, int readonly) { u16 flags, nflags; @@ -1028,7 +1010,6 @@ static const struct gnttab_ops gnttab_v1 .update_entry = gnttab_update_entry_v1, .end_foreign_access_ref = gnttab_end_foreign_access_ref_v1, .end_foreign_transfer_ref = gnttab_end_foreign_transfer_ref_v1, - .query_foreign_access = gnttab_query_foreign_access_v1, }; static void gnttab_request_version(void) --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h @@ -118,8 +118,6 @@ int gnttab_grant_foreign_transfer(domid_ unsigned long gnttab_end_foreign_transfer_ref(grant_ref_t ref); unsigned long gnttab_end_foreign_transfer(grant_ref_t ref); -int gnttab_query_foreign_access(grant_ref_t ref); - /* * operations on reserved batches of grant references */