All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Arun Sharma <arun.sharma@intel.com>
Cc: arnd@arndb.de, linux-arch@vger.kernel.org
Subject: Re: sys getdents64 needs compat wrapper ?
Date: Fri, 4 Jun 2004 17:28:16 -0700	[thread overview]
Message-ID: <20040604172816.259f38e8.davem@redhat.com> (raw)
In-Reply-To: <40C110C9.2060900@intel.com>


Some bug fixes needed:

+#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))

Cast must be "(char __user *)" to avoid sparse warnings.

+	if (__put_user(d_type, (char *) dirent + reclen - 1))

Again need "(char __user *)" for sparse.

+		if ((__put_user(offset, (u32 *)&dirent->d_off))
+		 || (__put_user(offset >> 32, ((u32 *)&dirent->d_off) + 1)))

Again, need "(u32 __user *)"

	 || (__put_user(ino >> 32, ((u32 *)&dirent->d_ino) + 1)))

Another "(u32 __user *)"

+	 || (__put_user(off >> 32, ((u32 *)&dirent->d_off) + 1)))

Another "(u32 __user *)"

+		__put_user(d_off, (u32 *)&lastdirent->d_off);
+		__put_user(d_off >> 32, ((u32 *)&lastdirent->d_off) + 1);

Two more "(u32 __user *)"

People really need to get into the habit of running sparse on their
changes to the compat code now that we've annotated most of it. :-)

  reply	other threads:[~2004-06-05  0:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 21:06 =?iso-8859-1?Q?Re:_sys_getdents64_needs_compat_wrapper_??= Arnd Bergmann
2004-06-05  0:16 ` =?iso-8859-1?Q?Re:_sys_getdents64_needs_compat_wrapper_??= Arun Sharma
2004-06-05  0:28   ` David S. Miller [this message]
2004-06-07 21:13     ` sys getdents64 needs compat wrapper ? Arun Sharma
2004-06-07 21:58       ` David S. Miller
2004-06-11 15:09       ` Arnd Bergmann
2004-06-14 18:15         ` Arun Sharma
2004-06-17 22:28           ` Arun Sharma
2004-06-17 23:36             ` Arnd Bergmann
2004-06-18  0:56               ` Arun Sharma
2004-06-18 17:05                 ` Arun Sharma
2004-06-20 21:50                   ` Arnd Bergmann
2004-06-22 18:21                     ` Arun Sharma
  -- strict thread matches above, loose matches on Subject: below --
2004-06-05 14:52 =?iso-8859-1?Q?Re:_Re:_Re:_sys_getdents64_needs_compat_wrapper_??= Arnd Bergmann
2004-06-05 18:41 ` sys getdents64 needs compat wrapper ? Andrew Morton
2004-06-05 19:31   ` David S. Miller
2004-05-20 18:32 sys_getdents64 " Arun Sharma
2004-05-20 20:58 ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040604172816.259f38e8.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=arnd@arndb.de \
    --cc=arun.sharma@intel.com \
    --cc=linux-arch@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.