Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1156681pxu; Mon, 23 Nov 2020 13:08:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEf0UJJA/0D6kKfvM5RvhUqAeh+WxXmSOjBmv0E40S/0sCKDLnOJQciK8uYzZSb1tbSUtl X-Received: by 2002:a17:906:3153:: with SMTP id e19mr1364616eje.17.1606165737369; Mon, 23 Nov 2020 13:08:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606165737; cv=none; d=google.com; s=arc-20160816; b=vk/A2h57Jr4/SehNe64HPR+bo+/EwcrWlxBwNLnljpO58/cdu4MUHvLCSWgttLBvlR V/1SOln1xnInwCNlGt7rzXEMOJB2RHRUhLOOMno0I7n0/hpYTSF1jgDeQC6XZUp5kwae i8wPxnSDvEpAmktLPSKlBkxdRc4CbgD8S+1gNaDGfkAZ2fgOTPrTekAve5t3KjkeNxOA SWnU+v/9yAgSKRXyRTvjST5elBS/bOJHCHfWIjqoeI1r2jDa8KBGmG9WxzTpVD3gwigL aFfIsVveEb26kZ03ScvlbcKBkEI3pNdNXxu4c3cBjSa93wrBTlOjY3Rrua+fPA1QZbmC 9Adg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LJyE9YuX2RfAEwKyIrOCwGZDsAcIyd05086Ij1YWFh0=; b=pkriOTOUZnCfP/XMAYGEvSvmVwZ3yUQd1JTNOkdgt22OSCIT2Bj1OD+l4Gb290BhbJ qfb8fl20ezEDgC3jpRKY2lNltQywTyqhibMrNGYS4rmNJrz/wJUrB59ujqxiqDG68Pps DTHwXQk4EI+Fkp30qTCNTSC0gnysUtkmM+ILY1uV/rp41ORBY9km4XLDREvnwjgrsKgO nHgpidOGGMGfvGEOtsgtMXao4aiQeIfM/WrNnh0X92gKlyl2VtQLR+NVcG8o7jpoyoCm +Hkufickm255jJzmAQeFjvHTA5RaFDEf3lr+Dq7SQyHUViGjhdSl11EtAJoc7DBSgIv5 4pfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AHs7K1/y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 33si7484908edq.243.2020.11.23.13.08.33; Mon, 23 Nov 2020 13:08:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="AHs7K1/y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729632AbgKWVFU (ORCPT + 99 others); Mon, 23 Nov 2020 16:05:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727847AbgKWVFT (ORCPT ); Mon, 23 Nov 2020 16:05:19 -0500 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C151C0613CF; Mon, 23 Nov 2020 13:05:18 -0800 (PST) Received: by mail-lf1-x144.google.com with SMTP id s27so5789275lfp.5; Mon, 23 Nov 2020 13:05:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LJyE9YuX2RfAEwKyIrOCwGZDsAcIyd05086Ij1YWFh0=; b=AHs7K1/yUwaw7ZLSmQipmdw+9/wHC8rAVQNTWJtBo0g+CHYLDoqvk/9V3a+aAqPFs6 4oUzdpotnVHThmXDV2Z9WbCn1i76TC31ok6gCTXX+Oyl6kXmNGjfl6ya0XlWgoQxRhru jP8cwLFLVRlwweqJ1v3WjcJESm1KaTCi6bEqQmEpVKf+qkXgEJj0INHzCdWz+WgTAM1K XQIwZa/4GToexddk14VWaks329oanEa4dVk4GD4O5frHqP5s6HQUwcLQH1TtPm4GhaBU Ff+QsAwmFxxt2UhU9q+F2Yw942eZsRj15KCUPnqmUeOPhD3do8gARwMVYWmxHpCx/bra Q83A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LJyE9YuX2RfAEwKyIrOCwGZDsAcIyd05086Ij1YWFh0=; b=cj6f1Yh+8+YTTHVZfhU5PsTEYuqxptTneDpljk+WbxavQD34/URDky8+IpaYnbHGO7 z9kZDvxSLDtNyNCewA0cn3SbsmBjkuUmCGZs2dKwKYGpzU3SsfMfEkD3Yjw0E7JHBbZv 7SA23siAUlXoNL7c2dZM+fPVHTWeUjY2akdYr/uk7QcFqoAfjhBwIQHbZKn/4JWNutII T0nfj82/uP6+gb7586mWAJiCeY5r6N5rkOX++OMK/c61eQY7T45pcGxEVnd3sat/qjlb xwS9eyS+1F7IPpoP2j3BarKNpBrUxZndbZNouHLDNh2wFDDuu9tjgOURioCjBrCdtsfP ZgMg== X-Gm-Message-State: AOAM530SMayZSqBPOljfw6nBV/xm971WjWEOdiUKy3I9hWdaVRjas6mN VfpsxfICKFFGKONNFwRYtN0= X-Received: by 2002:ac2:5092:: with SMTP id f18mr433909lfm.440.1606165516537; Mon, 23 Nov 2020 13:05:16 -0800 (PST) Received: from grain.localdomain ([5.18.91.94]) by smtp.gmail.com with ESMTPSA id s62sm85080lja.102.2020.11.23.13.05.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 13:05:14 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id B31D51A0078; Tue, 24 Nov 2020 00:05:13 +0300 (MSK) Date: Tue, 24 Nov 2020 00:05:13 +0300 From: Cyrill Gorcunov To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, criu@openvz.org, bpf@vger.kernel.org, Linus Torvalds , Alexander Viro , Christian Brauner , Oleg Nesterov , Jann Horn , Kees Cook , Daniel P =?iso-8859-1?Q?=2E_Berrang=E9?= , Jeff Layton , Miklos Szeredi , Matthew Wilcox , "J. Bruce Fields" , Trond Myklebust , Chris Wright , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh Subject: Re: [PATCH v2 13/24] kcmp: In get_file_raw_ptr use task_lookup_fd_rcu Message-ID: <20201123210513.GJ875895@grain> References: <87r1on1v62.fsf@x220.int.ebiederm.org> <20201120231441.29911-13-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120231441.29911-13-ebiederm@xmission.com> User-Agent: Mutt/1.14.6 (2020-07-11) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 05:14:30PM -0600, Eric W. Biederman wrote: > Modify get_file_raw_ptr to use task_lookup_fd_rcu. The helper > task_lookup_fd_rcu does the work of taking the task lock and verifying > that task->files != NULL and then calls files_lookup_fd_rcu. So let > use the helper to make a simpler implementation of get_file_raw_ptr. > > Signed-off-by: "Eric W. Biederman" Acked-by: Cyrill Gorcunov Since I wrote this kcmp code in first place. Thanks Eric!