Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1330276ybt; Sun, 14 Jun 2020 19:12:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFLOM1ai3URyBcyz0qpigZuQ6Co6Tf98hTYeBYra7lSlojNHjsPAiDvWVAA5Oz1sgPklze X-Received: by 2002:a17:906:14db:: with SMTP id y27mr24218606ejc.225.1592187167044; Sun, 14 Jun 2020 19:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592187167; cv=none; d=google.com; s=arc-20160816; b=lgFAQJlOTd5RCrbA9lAU7C1y7fBUTWF/yPwP9xoBgsdgCfhmOdgZXwOdhcwcfibfnI PqxJ7YioeVkOURNO0ONKjueV6LK/czsIHliMvDRR2QB9GuKXXl6DQgbkRekM5Vev1x/2 ysNcWypCnwI765IommKV8gRKLwTEjMZPBHm70Zrn4AR9Fq1sVQoGQ39CKE09aECrvzYh 5MWjE1FjGXq0QsIZQxHi+LGY1I+5IdcJWazNuDWODnhd1Nl5UX5tnoM5fEpsun88TQ2t E0IR1noh0iqbI5+nUAwfZDICPayT3GE8eo35ANy/5oTOQ2TZGXTncCPNOL+2BzCN62/K ht0Q== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=V3G7It89Ncb8ul8TN8xLZoXn6AJEFvNPVG6pfsuuL/8=; b=S2xEq6igRoYZICCFzJjki5OyMoGFvEWYG2rN0q2pHy8FShiqwLazObbFvLsz7nZKVa ZXBOTRk4teB4Zqkmx4AgGK6U8ar5lRFp48Va+6YJEK9Co7QvuEUGKkwnTexU1ZgaYH35 AIb3S7jLDo53ldVMppSF1kO+CXEzqlzVFEwzRsWccC/sQFIJdQbeSf9ZWH4yr+MKr35S /YGPknYoa164QN6vmLJKLjIfqeLMVzSobb7VhYa5F3gefzjR+8qJIbvY4sNK64RElmw8 DJxe2ykxPpBY3wthxzt2ruP5991Yf8qff+yJVf9XYdRnSHobXtTaKUnNFNdhGJV0JI+M 7pZA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m11si7858579edl.424.2020.06.14.19.12.24; Sun, 14 Jun 2020 19:12:47 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728039AbgFOCK1 (ORCPT + 99 others); Sun, 14 Jun 2020 22:10:27 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53110 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727995AbgFOCK1 (ORCPT ); Sun, 14 Jun 2020 22:10:27 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5C61414AF2B502BFE427; Mon, 15 Jun 2020 10:10:19 +0800 (CST) Received: from [127.0.0.1] (10.67.102.197) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Mon, 15 Jun 2020 10:10:09 +0800 Subject: Re: [PATCH 0/3] Convert nsproxy, groups, and creds to refcount_t To: Kees Cook , Peter Zijlstra CC: David Windsor , Hans Liljestrand , Elena Reshetova , "Paul Moore" , , , David Howells , , James Morris , , , , References: <20200612183450.4189588-1-keescook@chromium.org> From: Xiaoming Ni Message-ID: <7be4d56b-0406-099b-e505-02e074c5173e@huawei.com> Date: Mon, 15 Jun 2020 10:10:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20200612183450.4189588-1-keescook@chromium.org> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.197] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/6/13 2:34, Kees Cook wrote: > This series was never applied[1], and was recently pointed out as > missing[2]. If someone has a tree for this, please take it. Otherwise, > please Ack and I'll send it to Linus. > > Thanks! > > -Kees > > [1] https://lore.kernel.org/lkml/20190306110549.7628-1-elena.reshetova@intel.com/ > [2] https://lore.kernel.org/lkml/1591957695-118312-1-git-send-email-nixiaoming@huawei.com/ > > Elena Reshetova (3): > nsproxy: convert nsproxy.count to refcount_t > groups: convert group_info.usage to refcount_t > creds: convert cred.usage to refcount_t > > include/linux/cred.h | 15 +++++++------- > include/linux/nsproxy.h | 7 +++---- > kernel/cred.c | 44 ++++++++++++++++++++--------------------- > kernel/groups.c | 2 +- > kernel/nsproxy.c | 6 +++--- > net/sunrpc/auth.c | 2 +- > 6 files changed, 38 insertions(+), 38 deletions(-) > Should mm->mm_users also be replaced by refcount_t? In addition, is it better to change all variables that use atomic_dec_and_test to control the release process to refconut_t? Thanks Xiaoming Ni