From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28B5AC3A59C for ; Fri, 16 Aug 2019 15:30:45 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9F04206C1; Fri, 16 Aug 2019 15:30:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lists.sourceforge.net header.i=@lists.sourceforge.net header.b="K2HsYGub"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="RJBOi2Kg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="kG2zykzZ"; dkim=neutral (0-bit key) header.d=android.com header.i=@android.com header.b="n1rDvKmV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9F04206C1 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.sourceforge.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Type:Content-Transfer-Encoding:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:Date:Message-ID: References:To:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AHpwuBsV5ugHv5PYCbGRk5vdPpttl5z1udsFInZ6aMc=; b=K2HsYGubv5gK7Wsk/phMQMJpEY O511vqpBaX5IEUfEXnGwWuhvkltukSq6gdSzPJCnUr8bMP5fq0L4hCBqJ+SMtL6cI2HL9N4xwaiq9 o6zClstk03o7JeKI6YYmI+M4sUQb27FIMHmqXR//hDhMv5rxJpQK/a5Io/cDqqqE9mxw=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1hyeBg-00031d-Jp; Fri, 16 Aug 2019 15:30:44 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1hyeBf-00031I-6z for linux-f2fs-devel@lists.sourceforge.net; Fri, 16 Aug 2019 15:30:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mfAPdWffqPCiWWdG0+diH1s9rsdeIRT69OHzvRcyJZE=; b=RJBOi2Kg5AayuGGJpMr93qvesc Oy/meKDZ/pEGD7aJYTJfwp6YcB+CMnz9EALNUcigL1a3ByCe6RpVWwV9BlNULxpJUzwPIJPSgvGkL FVQPCvuxPILkyqsojYHq9BJA7LuM3Pr/OpN03NNHGAc0Tw+Ber6Q84OnoAJ4x39Nb9rQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mfAPdWffqPCiWWdG0+diH1s9rsdeIRT69OHzvRcyJZE=; b=kG2zykzZ+cvEp15AN5pMLg4a+c sbwly+WpPV1JPFf/EUj7qX4LcYXKRFFrLiPBhC5887vlFfyq9uwnh1a1W2qebEynfEyvzoMxBNWc1 05a4DSmGTwEYsR7yGR1ZKi8TGHzOx6e4tFDhS9oD6MyBkbz/fzt+tPt/ihdeFLvJtCIE=; Received: from mail-pf1-f195.google.com ([209.85.210.195]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1hyeBb-005x6e-J5 for linux-f2fs-devel@lists.sourceforge.net; Fri, 16 Aug 2019 15:30:43 +0000 Received: by mail-pf1-f195.google.com with SMTP id w26so3275273pfq.12 for ; Fri, 16 Aug 2019 08:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=mfAPdWffqPCiWWdG0+diH1s9rsdeIRT69OHzvRcyJZE=; b=n1rDvKmVIIzl5LQ8693geFLmZfVk3SNTRXjV+iWc+8TCGMLKeW1iTeiBjvRiueqoqF D9q8mlFSvHVsZFYo8y0kE96uO6kmQFQLzsCMbZOk0QJBcZZXpIGyVUfhKCZdaUtIfVCv i/NoHfVU/jNOhInU0nZF00JzrYo84Kc4poGmJ+0xtP3BbotZEuJh4vLNcJnKiqpzbKqX VAVojoCQ9+7vUVRbeqlgJ3x1mKtd9gYqddIhEV1djd0QWV+eU6MOHKC8ZzBAyRJxBa4j h2AWL75nzhxsVUvXnKj119sMtgytuLB07uRnQLjRyRsPInJpSQZBT6UeAUBurB9zqibi wIrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=mfAPdWffqPCiWWdG0+diH1s9rsdeIRT69OHzvRcyJZE=; b=YV80twxUyMG4Ej9kgj+tbJ5WkACwA9nzQC/rZvEUSJDCbqDhYid2C1RWuH7yRC/RLe If6vnzvIxaZ4/7jvb9x9I8vNHOrwY9XPe/TJVg8xj4lnXZygsejejN2x1Cp1Bg6gHhJh ZtXTT4c+SFB2S2lxn7pIPeGAeO1gBrrsuuybrXPJgnBZhqByUCdq2j3kAUDiFii+rFWK cy7olQeTJKtpZnYHnN45e0VGM53tJCxOF33+u3Bw6flUyvC2SfQc0ryWueOGv+n3oSvj /LG/sUDeweAGJ1GDW15XXb/8QDovUXeGjV58xaQqp3u7kevA4FsxcOqiE+51oZsttPBr FnGw== X-Gm-Message-State: APjAAAX80kHuaRboQOcNSDHCyxq9bd458BGpzK2b2Oeu+8Bn83RwKW2e q5xypm+RIKi5FtqwjykSltmWHQ== X-Google-Smtp-Source: APXvYqydx2RtAVHirZjlmSa0Unc3LrMXkJsKHb448nh37ky9aF7sEwD8P8sx+d4AByX8L7k2WfP+gw== X-Received: by 2002:a17:90a:77c9:: with SMTP id e9mr7407215pjs.141.1565969433680; Fri, 16 Aug 2019 08:30:33 -0700 (PDT) Received: from nebulus.mtv.corp.google.com ([2620:15c:211:200:5404:91ba:59dc:9400]) by smtp.googlemail.com with ESMTPSA id l4sm4355544pjq.9.2019.08.16.08.30.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Aug 2019 08:30:32 -0700 (PDT) To: James Morris References: <20190812193320.200472-1-salyzyn@android.com> <20190813084801.GA972@kroah.com> <69889dec-5440-1472-ed57-380f45547581@android.com> Message-ID: <92b1df4b-6433-7d01-9c08-23de10e8d527@android.com> Date: Fri, 16 Aug 2019 08:30:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Headers-End: 1hyeBb-005x6e-J5 Subject: Re: [f2fs-dev] [PATCH] Add flags option to get xattr method paired to __vfs_getxattr X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mark Salyzyn via Linux-f2fs-devel Reply-To: Mark Salyzyn Cc: Latchesar Ionkov , Dave Kleikamp , jfs-discussion@lists.sourceforge.net, kernel-team@android.com, linux-integrity@vger.kernel.org, Martin Brandenburg , samba-technical@lists.samba.org, Dominique Martinet , Mimi Zohar , linux-unionfs@vger.kernel.org, David Howells , Chris Mason , "David S. Miller" , Andreas Dilger , Eric Paris , netdev@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-afs@lists.infradead.org, Mike Marshall , linux-xfs@vger.kernel.org, Andreas Gruenbacher , Sage Weil , Miklos Szeredi , Richard Weinberger , Mark Fasheh , Hugh Dickins , =?UTF-8?Q?Ernesto_A=2e_Fern=c3=a1ndez?= , cluster-devel@redhat.com, selinux@vger.kernel.org, Vyacheslav Dubeyko , Casey Schaufler , v9fs-developer@lists.sourceforge.net, Ilya Dryomov , linux-ext4@vger.kernel.org, Stephen Smalley , linux-mm@kvack.org, devel@lists.orangefs.org, Serge Hallyn , linux-cifs@vger.kernel.org, Eric Van Hensbergen , ecryptfs@vger.kernel.org, Josef Bacik , reiserfs-devel@vger.kernel.org, Tejun Heo , Joel Becker , linux-mtd@lists.infradead.org, David Sterba , Jaegeuk Kim , ceph-devel@vger.kernel.org, Trond Myklebust , Paul Moore , linux-nfs@vger.kernel.org, Theodore Ts'o , linux-fsdevel@vger.kernel.org, Joseph Qi , Mathieu Malaterre , Greg Kroah-Hartman , "Darrick J. Wong" , Jeff Layton , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Tyler Hicks , Steve French , linux-security-module@vger.kernel.org, ocfs2-devel@oss.oracle.com, Jan Kara , Bob Peterson , Phillip Lougher , Andrew Morton , David Woodhouse , Anna Schumaker , linux-btrfs@vger.kernel.org, Alexander Viro Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 8/15/19 3:27 PM, James Morris wrote: > On Thu, 15 Aug 2019, Mark Salyzyn wrote: > >> Good Idea, but using the same argument structure for set and get I would be >> concerned about the loss of compiler protection for the buffer argument; > Agreed, I missed that. Sadly, the pattern of struct getxattr_args args; memset(&args, 0, sizeof(args)); args.xxxx = ... __vfs_getxattr(&args}; ... __vfs_setxattr(&args); would be nice, so maybe we need to cool our jets and instead: struct xattr_gs_args { struct dentry *dentry; struct inode *inode; const char *name; union { void *buffer; const void *value; }; size_t size; int flags; }; value _must_ be referenced for all setxattr operations, buffer for getxattr operations (how can we enforce that?). >> struct getxattr_args { >> struct dentry *dentry; >> struct inode *inode; >> const char *name; >> void *buffer; >> size_t size; >> int flags; > Does 'get' need flags? > :-) That was the _whole_ point of the patch, flags is how we pass in the recursion so that a security/internal getxattr call has the rights to acquire the data in the lower layer(s). -- Mark _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel