From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH 2/2] add f_flags to struct statfs(64) Date: Wed, 7 Jul 2010 10:31:37 -0700 Message-ID: References: <20100707165325.GB12557@lst.de> <4C34B53A.6060408@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Christoph Hellwig , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org To: Ulrich Drepper Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:47599 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753945Ab0GGRbo (ORCPT ); Wed, 7 Jul 2010 13:31:44 -0400 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) (authenticated bits=0) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id o67HVh06005393 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL) for ; Wed, 7 Jul 2010 10:31:43 -0700 Received: by pwi5 with SMTP id 5so2558498pwi.19 for ; Wed, 07 Jul 2010 10:31:38 -0700 (PDT) In-Reply-To: <4C34B53A.6060408@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jul 7, 2010 at 10:11 AM, Ulrich Drepper wrote: > > How does this work with old kernels which didn't initialize f_spare? Some of the compat layers (and older kernels) don't copy the f_spare values, so user space should clear the field before doing the system call, and you should be ok. There should be no actual _uninitialized_ values copied from the kernel. IOW, either the kernel writes zero, or it doesn't write anything at all. Anything else would be a security issue anyway (ie kernel stack data leak). Afaik, no kernel does that. Problem solved. Linus