Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5713383ybe; Tue, 10 Sep 2019 07:47:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWn+II5JIzpIkEJ7JPR5sHY9BjhzEhp6Y9tr/vOFxDAdb/n7IoZpGkiTud2mDh4nXYf1sM X-Received: by 2002:a50:ee92:: with SMTP id f18mr9384982edr.253.1568126840451; Tue, 10 Sep 2019 07:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568126840; cv=none; d=google.com; s=arc-20160816; b=kj/3sVdLLeEm/ZyqPEoXt1kDW5Ds0SdORD5S74k7ZF8ngIQLSDriIZdl72DeKSY6PI oznbBjiJWcFA9a37oe815QHmDS5WojX2Vx/Ibeygn9hA6vB6dgZZTObDSjvOswox01xO 4b7lQSqepaxygpabDbIslbBZZlLgXyl0HYLbvBpPG1HLEEY8Dywlnz+6lveImsYVPgXb Wy0KjrUhYnhuMtXBv/+csR7TthCEXTSvcoZ3CGhXrAZElOo7yUUptffALMB1Nr1StA2i BY7I4xZoTEWmgDq3mVM9MTrkAa/aMJ0khUtEjtQwmclcb/yfdwTgzKsg8BuQJIA2EwbG np5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Bht6zxMViF4XT1wMCJdPo9oHs15bVW2aoe4HG9tQmHg=; b=UQZra9vLhmjaMhZfi8AT2QWofLVYTCPvXs0DBZE5lLAJyNHaaR8aNg/zG1dwbYu6Pv sh9csyf45LkfLDp0w3XCJ+cLxup9man1Kb0wwr870i0QSOvPDLiyt5tgM3y8G64AxEzf zia50VXRl844md5boQTb1rTpRVJyMm3l855P3QyaAS80BLL9noPtzy99xbXVukccOI6l sBRNpYFKNUSErMP1bfDN8DgI0auRg9z7CuWp7/WJ3mtamjugkjfBmmxyZr6D7g51fdmH 02FjjAyH60TnH0m6plPab4VaRJIXbOBu+L74I/xIALHjg5VtUZOpES1tJQIL2Ig8gJ1e xUxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si4849205eds.252.2019.09.10.07.46.46; Tue, 10 Sep 2019 07:47:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729132AbfIJOqE (ORCPT + 99 others); Tue, 10 Sep 2019 10:46:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46482 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbfIJOqE (ORCPT ); Tue, 10 Sep 2019 10:46:04 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2CED0C04B940; Tue, 10 Sep 2019 14:46:04 +0000 (UTC) Received: from ovpn-116-252.phx2.redhat.com (ovpn-116-252.phx2.redhat.com [10.3.116.252]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFECF19C4F; Tue, 10 Sep 2019 14:46:03 +0000 (UTC) Message-ID: <2351c8f2f97d8730fa4fc4e49175b6c42ddb3484.camel@redhat.com> Subject: Re: [PATCH v2 0/2] add hash of the kerberos principal to the data being tracked by nfsdcld From: Simo Sorce To: Scott Mayhew , bfields@fieldses.org, chuck.lever@oracle.com Cc: linux-nfs@vger.kernel.org Date: Tue, 10 Sep 2019 10:46:02 -0400 In-Reply-To: <20190909201031.12323-1-smayhew@redhat.com> References: <20190909201031.12323-1-smayhew@redhat.com> Organization: Red Hat, Inc. Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 10 Sep 2019 14:46:04 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Mon, 2019-09-09 at 16:10 -0400, Scott Mayhew wrote: > At the spring bakeathon, Chuck suggested that we should store the > kerberos principal in addition to the client id string in nfsdcld. The > idea is to prevent an illegitimate client from reclaiming another > client's opens by supplying that client's id string. > > The first patch lays some groundwork for supporting multiple message > versions for the nfsdcld upcalls, adding fields for version and message > length to the nfsd4_client_tracking_ops (these fields are only used for > the nfsdcld upcalls and ignored for the other tracking methods), as well > as an upcall to get the maximum version supported by the userspace > daemon. > > The second patch actually adds the v2 message, which adds the sha256 hash > of the kerberos principal to the Cld_Create upcall and to the Cld_GraceStart > downcall (which is what loads the data in the reclaim_str_hashtbl). > > Changes since v1: > - use the sha256 hash of a principal instead of the principal itself > - prefer the cr_raw_principal (returned by gssproxy) if it exists, then > fall back to cr_principal (returned by both gssproxy and rpc.svcgssd) > > Scott Mayhew (2): > nfsd: add a "GetVersion" upcall for nfsdcld > nfsd: add support for upcall version 2 > > fs/nfsd/nfs4recover.c | 388 ++++++++++++++++++++++++++++------ > fs/nfsd/nfs4state.c | 6 +- > fs/nfsd/state.h | 3 +- > include/uapi/linux/nfsd/cld.h | 41 +++- > 4 files changed, 371 insertions(+), 67 deletions(-) > LGTM. -- Simo Sorce RHEL Crypto Team Red Hat, Inc