From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36969 invoked by alias); 26 Jun 2015 12:20:12 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 36886 invoked by uid 48); 26 Jun 2015 12:20:07 -0000 From: "dsmith at redhat dot com" To: systemtap@sourceware.org Subject: [Bug tapsets/18597] long_arg() doesn't correctly handle negative values in 32-on-64 environment Date: Fri, 26 Jun 2015 12:20:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dsmith at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00219.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18597 --- Comment #4 from David Smith --- (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 offset_lo, +# unsigned nbytes_hi, unsigned nbytes_lo) +# +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.