From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755019AbbE1WJr (ORCPT ); Thu, 28 May 2015 18:09:47 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:35762 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754461AbbE1WJi (ORCPT ); Thu, 28 May 2015 18:09:38 -0400 MIME-Version: 1.0 In-Reply-To: References: <8d601ee8babe5239b7926542c713c58502b15e35.1429868795.git.agruenba@redhat.com> <20150528203332.GD31663@fieldses.org> Date: Fri, 29 May 2015 00:09:38 +0200 Message-ID: Subject: Re: [RFC v3 36/45] NFSv4: Fix GETATTR bitmap verification From: =?UTF-8?Q?Andreas_Gr=C3=BCnbacher?= To: Trond Myklebust Cc: "J. Bruce Fields" , Linux Kernel Mailing List , Linux FS-devel Mailing List , Linux NFS Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2015-05-28 23:55 GMT+02:00 Trond Myklebust : >> We already do this kind of check with the existing code. What's wrong with it? > > Actually, you're right, we don't check for the previous word, however > fixing that is a question of adding 2 extra checks in > decode_getfattr_attrs(), one in decode_getfattr_statfs(), and one in > decode_fsinfo(). > > It shouldn't require a rewrite of the entire nfs4xdr.c. I would actually prefer either verifying the reply bitmap against the request bitmap, or checking the bitmap first as this patch does --- the current approach of knocking individual bits over and checking if any "before" bits have been missed isn't exactly what I would take as a textbook example. Thanks, Andreas From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Andreas_Gr=C3=BCnbacher?= Subject: Re: [RFC v3 36/45] NFSv4: Fix GETATTR bitmap verification Date: Fri, 29 May 2015 00:09:38 +0200 Message-ID: References: <8d601ee8babe5239b7926542c713c58502b15e35.1429868795.git.agruenba@redhat.com> <20150528203332.GD31663@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "J. Bruce Fields" , Linux Kernel Mailing List , Linux FS-devel Mailing List , Linux NFS Mailing List To: Trond Myklebust Return-path: In-Reply-To: Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org 2015-05-28 23:55 GMT+02:00 Trond Myklebust : >> We already do this kind of check with the existing code. What's wrong with it? > > Actually, you're right, we don't check for the previous word, however > fixing that is a question of adding 2 extra checks in > decode_getfattr_attrs(), one in decode_getfattr_statfs(), and one in > decode_fsinfo(). > > It shouldn't require a rewrite of the entire nfs4xdr.c. I would actually prefer either verifying the reply bitmap against the request bitmap, or checking the bitmap first as this patch does --- the current approach of knocking individual bits over and checking if any "before" bits have been missed isn't exactly what I would take as a textbook example. Thanks, Andreas -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html