Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1607590pxb; Thu, 4 Mar 2021 16:12:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsPbVot4kmwFBFGKzww44kwLBExy95QMPSDJnnTptU9Uz4OzYprOXqhlkw3I6WCsr0IsKs X-Received: by 2002:a02:cad9:: with SMTP id f25mr6776834jap.26.1614903125189; Thu, 04 Mar 2021 16:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614903125; cv=none; d=google.com; s=arc-20160816; b=jOt+AmyuZGWPDDhi9pR3rNcy7S12XLEnlJpUpAW+Vcysp91IwMlMf5Kbgas2oqp2Va g11vbc6L/nziDq2XSTX0GZZt8rk+MwrvHzmM1CQklG/jKEiY4T70pOs41VP0E1IJFMt9 uWu+Vz5TTnu3SulKMdOC2EvM07ygjUmCK8rHLJoqtLvQt+oxscmQm2bGWWcQ5VYlb05Z UbIsGTqM3FQhNYyzwMrVGN0ucufIfWXU/kgPCKjFxu/0W87ogz19L2emu6PzD1LsEWbg dEZrOxBdnikfAZuTn+LQ6AkGbo4ZoQKzPx7qXCemlqNkHzzLByU1aFD/ItentM7A5sK9 g85g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=48o+7Ew2TEHGhvXnSGIxTpLjlrQRRnA22kMV8wVA6Xw=; b=amgJpSr/fDt6Kgb1037WgWP70B0+/fddul8tAoIfIdYaXUWdns0DRufyUraKl+IOaN kFIRDg48MnWfP3CFmP5a1LlABwWvNCaBnrFkIEAl8df9HofE6WLnOyJwqPg8ptwDGvt4 5qDsUa/nH4pWM+SWg8xk3CnPuGyIibXb6lTZ1+MWkdQ2sZCipI6Bbf6ClbTUR27/DExO nmpD2RvM4ZZt9SQ7//lMbpt6zRQNojyhkYcGNvMnzDxPzS9GH2czeblVbID/ShQiGt/I 6DD6M/qAsVZ/mfWabLU+CILYfPMGle/rugEJunw0Moe590aAhYWtkyTA3OriJA3zGbzQ rF5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=hKdnZ3TF; 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 p6si657445ilp.90.2021.03.04.16.11.51; Thu, 04 Mar 2021 16:12:05 -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=@infradead.org header.s=casper.20170209 header.b=hKdnZ3TF; 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 S240377AbhCDMVh (ORCPT + 99 others); Thu, 4 Mar 2021 07:21:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237383AbhCDMVY (ORCPT ); Thu, 4 Mar 2021 07:21:24 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24452C061574; Thu, 4 Mar 2021 04:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=48o+7Ew2TEHGhvXnSGIxTpLjlrQRRnA22kMV8wVA6Xw=; b=hKdnZ3TF7fJIicyODRx49bYmzm Rq2kGOJGMYUS/xHuikVhIFGSVSlVjlpsYjmqSj2SxmVmyxfEMnd7zhmQ4xSwkasfyC96RwabICyJv 9wniy/m0TSnUp7ZJtwM0HqhWOpN+LD3uggn5MngrkJFMrpcChnHLCJH3nqN/ch6pRCCdTKP3/7897 kLneOM40LamBpBCKxkcriN8L7eXU0rcnWagzJoAk5ZR1hkhN2B+uGejvfdzMS3c42V2yGi35zo3XC Q1mXPKOkipbNVTn9EP8oRVWkt/b/A34EMn5Q4Ksgt+xzBkqUuuva2kP0m33b+fsfriAxbxoKN5k0x iSCRrasg==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lHmvT-006ynq-Ex; Thu, 04 Mar 2021 12:18:06 +0000 Date: Thu, 4 Mar 2021 12:17:55 +0000 From: Matthew Wilcox To: Yang Li Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xattr: switch to vmemdup_user() Message-ID: <20210304121755.GJ2723601@casper.infradead.org> References: <1614666741-16796-1-git-send-email-yang.lee@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1614666741-16796-1-git-send-email-yang.lee@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 02, 2021 at 02:32:21PM +0800, Yang Li wrote: > Replace opencoded alloc and copy with vmemdup_user() > > fixed the following coccicheck: > ./fs/xattr.c:561:11-19: WARNING opportunity for vmemdup_user > > Reported-by: Abaci Robot > Signed-off-by: Yang Li Reviewed-by: Matthew Wilcox (Oracle)