This is the mail archive of the mailing list for the systemtap project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/18597] long_arg() doesn't correctly handle negative values in 32-on-64 environment

--- Comment #4 from David Smith <dsmith at redhat dot com> ---
(In reply to Martin Cermak from comment #1)
> Created attachment 8393 [details]
> proposed patch
> Fix reported misbehaviour of long_arg(); fix pread, pwrite and
> sync_file_range; simplify nd_syscall.io_submit as an example benefit of the
> fix.

OK, you lost me on this:

+# compat_sync_file_range _____________________________________
+# asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
+#                                             unsigned offset_hi, unsigned
+#                                             unsigned nbytes_hi, unsigned
+probe nd_syscall.compat_sync_file_range =
+       kprobe.function("compat_sys_sync_file_range2") ?
+       asmlinkage()
+       name = "sync_file_range"
+       fd = int_arg(1)
+       flags = uint_arg(2)
+       offset = (u32_arg(3) << 32) + u32_arg(4)
+       nbytes = (u32_arg(5) << 32) + u32_arg(6)
+       flags_str = _sync_file_range_flags_str(flags)
+       argstr = sprintf("%d, %d, %d, %s", fd, offset, nbytes,
+                        _sync_file_range_flags_str(flags))

If this code wasn't needed before, why is it needed now?

You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]