]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 years agoFix depmod invocation on RPM %post-installation.
Nick Alcock [Wed, 12 Sep 2012 21:53:27 +0000 (22:53 +0100)]
Fix depmod invocation on RPM %post-installation.

The kernel module directory name includes the karch, so our depmod invocation
should as well.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
12 years agoAdd a specfile.
Nick Alcock [Mon, 10 Sep 2012 19:38:52 +0000 (20:38 +0100)]
Add a specfile.

No changelog for this release yet.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
12 years agoAdditional action support (and bug fixes).
Kris Van Hees [Sun, 9 Sep 2012 21:34:48 +0000 (17:34 -0400)]
Additional action support (and bug fixes).

Removed ASSIST_* definitions because they are no longer necessary (though they
may come back in the future).

Changed the behaviour of DTrace in interrupt context to base it on in_irq()
rather than in_interrupt().

On Linux it is always safe to dereference current, so there is no need to do
special casing on various process-based DIF functions.  There is no need to
fake values coming from the 0-pid process.

Added curcpu variables.

Added d_path() function.  This takes a struct path and turns it into a string.

Renumbered the register IDs to match the xlator support at userspace, and to
also match the on-stack order of registers.

Have dtrace_getreg() operate on the task rather than just a set of registers,
because (in 64-bit mode) segment registers have their value stored in fields
in the process-specific task info.

Implemented the raise() action.

Changed the deadman interal to 10s, and timeout/user to 120s.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
12 years agoChange the DTrace startup handling (at boot time) for SDT.
Kris Van Hees [Sun, 9 Sep 2012 21:18:42 +0000 (17:18 -0400)]
Change the DTrace startup handling (at boot time) for SDT.

The DTrace OS level handling was initialized at DTrace module load, which
caused major indigestion on the side of the scheduler when SDT probe points at
crucial locations in the scheduler were being patched by one CPU while another
was trying to get some real work done.  Even a nice stop_machine() based
approach turned out not to be possible, because that *cough* depends on the
scheduler also.

Instead, the DTrace OS support is initialized from the Linux boot sequence,
before SMP is enabled, which removes the complications altogether (and it is a
lot cleaner and faster).  We also call CPU-specific initialization for DTrace
during the boot sequence, albeit *after* the CPUs have been identified for SMP,
to ensure that we get accurate information.

Renamed sdt_register.c to be dtrace_sdt.c (for consistency).  And implemented
a better patching of SDT probe points.

Added a 'nosdt' kernel command line option to allow system wide diabling of
SDT probe points (at the kernel level).  This can be used when the patching of
SDT probe points somehow causes a problem.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
12 years agoCleanup (and adding) of SDT probe points.
Kris Van Hees [Sun, 9 Sep 2012 20:56:15 +0000 (16:56 -0400)]
Cleanup (and adding) of SDT probe points.

Changed io SDT probe points to be located at the buffer_head level rather than
the bio level.  This may need to be revisted depending on further analysis,
but doing it this way provides consistent semantics that were not guaranteed by
the previous bio-based placement.

Changed the sched STD probes to not pass irrelevant arguments, and to pass
specific runqueue CPU information.  The CPU information is not available from
the task structure, so it needs to be passed explicily.

Added proc SDT probes start and lwp-start.

Added proc SDT probes for signal-discard and signal-clear.

Corrected the argument to the exit proc SDT probe, which should indicate the
reason for the process termination (exit, killed, core dumped) rather than the
return code of the process.

Provided argument information for all the new (and changed) SDT probe points.
This depends on working xlator support in userspace.

Enabling of SDT probes now uses a generic dtrace_invop_(enable|disable) rather
than SDT-specific functions.

SDT probes are not destroyed correctly, to ensure that subsequent uses will not
result in unpleasant events.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
12 years agoRemove remnant of internal, for-my-use-only test code.
Kris Van Hees [Mon, 6 Aug 2012 07:41:05 +0000 (03:41 -0400)]
Remove remnant of internal, for-my-use-only test code.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoDIF_SUBR_RW_READ_HELD's parameter should be an rwlock_t.
Nick Alcock [Fri, 20 Jul 2012 22:02:56 +0000 (23:02 +0100)]
DIF_SUBR_RW_READ_HELD's parameter should be an rwlock_t.

Even if Solaris gives DIF_SUBR_RW_READ_HELD and DIF_SUBR_RW_WRITE_HELD different
parameter types, that doesn't mean we have to copy its mistake.  An rwlock is an
rwlock whether you are testing for a read or a write hold.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
13 years agoForce dtrace_ctf.ko to be loaded whenever dtrace.ko is.
Nick Alcock [Fri, 20 Jul 2012 22:00:07 +0000 (23:00 +0100)]
Force dtrace_ctf.ko to be loaded whenever dtrace.ko is.

DTrace userspace makes the simplifying assumption that dtrace_ctf.ko (containing
the CTF for the kernel, for built-in modules, and for shared types, but no code)
is always loaded whenever DTrace is usable.  (The CTF itself is in a non-loaded
section, but having dtrace_ctf.ko in the list of loaded modules means that we
can eliminate an annoying set of dtrace_ctf-related special case.)

We do this by introducing a dummy function dtrace_ctf_forceload() into the
dtrace_ctf module, which DTrace then calls: depmod will then arrange for
dtrace_ctf to be loaded when we need it.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
13 years agoMissing file.
Kris Van Hees [Wed, 23 May 2012 07:53:19 +0000 (03:53 -0400)]
Missing file.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years ago- sched-tick SDT probe.
Kris Van Hees [Thu, 19 Apr 2012 21:19:40 +0000 (17:19 -0400)]
- sched-tick SDT probe.
- FBT probe point discovery and probe creation.
- Moving code around for the kernel pseudo-module handling since it gets used
  by both the SDT code and the FBT code.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoAdd argument description info for SDT probes.
Kris Van Hees [Thu, 5 Apr 2012 11:24:03 +0000 (07:24 -0400)]
Add argument description info for SDT probes.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoImplement refcount handling in DTrace modules to ensure that they cannot be
Kris Van Hees [Tue, 14 Feb 2012 21:22:33 +0000 (16:22 -0500)]
Implement refcount handling in DTrace modules to ensure that they cannot be
unloaded while probes are enabled.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoNew DTrace option DTRACEOPT_QUIETRESIZE, and accordingly-boosted DTRACEOPT_MAX.
Nick Alcock [Thu, 9 Feb 2012 18:32:25 +0000 (18:32 +0000)]
New DTrace option DTRACEOPT_QUIETRESIZE, and accordingly-boosted DTRACEOPT_MAX.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
13 years agoChanged from using mutex_is_locked() to a new mutex_owned(), in support of the
Kris Van Hees [Tue, 7 Feb 2012 09:31:48 +0000 (04:31 -0500)]
Changed from using mutex_is_locked() to a new mutex_owned(), in support of the
Solaris MUTEX_HELD() macro.  The former was merely testing whether the mutex was
locked, whereas the real test needed here is whether the mutex is held by the
current thread.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoMake all allocations that are allowed to fail atomic, and surpress warnings
Kris Van Hees [Tue, 31 Jan 2012 10:04:53 +0000 (05:04 -0500)]
Make all allocations that are allowed to fail atomic, and surpress warnings
about out-of-memory conditions, since they are not harmful.  Also, do not allow
DTrace allocations to access the emergency pools.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoFix signed division and modulo operations in DIF.
Kris Van Hees [Tue, 17 Jan 2012 20:03:17 +0000 (15:03 -0500)]
Fix signed division and modulo operations in DIF.
Ensure that SDT probe points are patched with a NOP sequence at boot time.
Remove debugging output during SDT registration.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoForgot to commit the changes to the header file.
Kris Van Hees [Thu, 12 Jan 2012 22:34:35 +0000 (17:34 -0500)]
Forgot to commit the changes to the header file.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoThe idr_empty() macro is no longer needed.
Kris Van Hees [Thu, 12 Jan 2012 21:39:42 +0000 (16:39 -0500)]
The idr_empty() macro is no longer needed.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoFix for incorrect handling of BUFSIZE = 0. The handling of aggregations was
Kris Van Hees [Thu, 12 Jan 2012 21:36:54 +0000 (16:36 -0500)]
Fix for incorrect handling of BUFSIZE = 0.  The handling of aggregations was
flawed in that even without any ECBs with aggregation, the code logic was
assuming there was at least one aggregation (the sentinel in the IDR).  The
handling of the aggregations IDR in the DTrace state has been updated to use
an explicit counter because the IDR functionality does not provide us with an
API function to determine the amount of elements in the IDR.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoInitial values for min and max aggregate functions were incorrectly set to be
Kris Van Hees [Thu, 12 Jan 2012 20:15:15 +0000 (15:15 -0500)]
Initial values for min and max aggregate functions were incorrectly set to be
UINT64 values rather than INT64 values, causing the initial minimum value to
be -1, and the initial maximum value to be 0.  Corrected to be INT64 values.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoEnsure that the trap handler is regisstered only once.
Kris Van Hees [Thu, 12 Jan 2012 14:25:35 +0000 (09:25 -0500)]
Ensure that the trap handler is regisstered only once.
Register with first use,

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoEnsure that the die notifier hook is installed whenever DTrace is enabled,
Kris Van Hees [Wed, 11 Jan 2012 06:18:41 +0000 (01:18 -0500)]
Ensure that the die notifier hook is installed whenever DTrace is enabled,
since page fault and general protection fault handling depends on it, and that
is needed for safe memory access support in DTrace.

Work around an apparent bug in Xen where an invalid opcode fault is delivered
as a general protection failure instead.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoSupport for page fault and general protection fault detection for DTrace, to
Kris Van Hees [Wed, 14 Dec 2011 05:09:14 +0000 (00:09 -0500)]
Support for page fault and general protection fault detection for DTrace, to
ensure that DTrace memory access faults are non-fatal.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoSDT implementation (core kernel support for providing a list of static probe
Kris Van Hees [Mon, 5 Dec 2011 20:01:27 +0000 (15:01 -0500)]
SDT implementation (core kernel support for providing a list of static probe
points for the kernel pseudo-module, dtrace SDT meta-provider support, ...).
Also, new script (dtrace_sdt.sh) to extract locations of SDT probe points in
the core kernel.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoEnable processing the SDT probe point info at boot time (before SMP is actually
Kris Van Hees [Mon, 14 Nov 2011 15:17:45 +0000 (10:17 -0500)]
Enable processing the SDT probe point info at boot time (before SMP is actually
enabled), if DTrace SDT support has been enabled (built-in or as module).  For
now, provide some verbose info on the probe points getting resolved.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoFix resolving addresses of relocation records for SDT probe points. The
Kris Van Hees [Fri, 11 Nov 2011 07:34:04 +0000 (02:34 -0500)]
Fix resolving addresses of relocation records for SDT probe points.  The
addresses were being calculated based on the wrong starting point (_stext
whereas it ought to be _text), and the base was not taken into account.
Fixed the writing of NOPs in the location of the probe point calls, since
the existing case was causing kernel paging faults.  Made the add_nops()
function in alternative.c non-static so it can be used in sdt_register.
Use add_nops() to select the most appropriate NOP sequence for replacing the
probe point call, and write the NOPs using text_poke().

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoFixed the allocation of cyclics that was the cuase for some obscure crashes
Kris Van Hees [Thu, 3 Nov 2011 17:59:00 +0000 (13:59 -0400)]
Fixed the allocation of cyclics that was the cuase for some obscure crashes
during the testsuite execution.  Problem was that cyclics were being allocated
in chunks, with a new array being allocated as (prev-size + chink-size), and
then the old entries being copied over.  However, because the hrtimer struct is
embedded in the cyclic struct, this meant that hrtimer structs were being moved
outside the hrtimer code.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoHandle the case where regs (during cyclic processing) is NULL. This indicates
Kris Van Hees [Thu, 27 Oct 2011 17:15:26 +0000 (13:15 -0400)]
Handle the case where regs (during cyclic processing) is NULL.  This indicates
a bug but with this code change we'll survive that case and simply not have
meaningful PC and UPC values as argument to the probe, which is better than a
full scale OOPS due to NULL pointer dereference.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoRemoved dead code (was #if 0 ... #endif). Cleaned up ;; -> ;.
Kris Van Hees [Thu, 27 Oct 2011 15:18:38 +0000 (11:18 -0400)]
Removed dead code (was #if 0 ... #endif).  Cleaned up ;; -> ;.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoImplementation for tracing stub-based system calls. Due to the need for
Kris Van Hees [Thu, 27 Oct 2011 14:39:19 +0000 (10:39 -0400)]
Implementation for tracing stub-based system calls.  Due to the need for
specialized code handling (mainly passing in a pt_regs structure as one of
the arguments), some syscalls are called through a stub in assembly code.
We duplicate the stub cdode in dtrace_stubs_x86_64.S, but instead of calling
the actual syscall implementation code call our own syscall-specific handler,
which ensures that entry and return probes are called as enabled, and then
call the underlying implementation directly for handling the syscall.

Also removed debugging output that is no longer relevant (code cleanup).

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoStacktrace dumping has been moved to the GPL-licensed dtrace_os.c because it
Kris Van Hees [Fri, 14 Oct 2011 02:42:27 +0000 (22:42 -0400)]
Stacktrace dumping has been moved to the GPL-licensed dtrace_os.c because it
depends on a symbol that is exported as GPL-only.  Functionality in dtrace_isa
that requires stacktrace dumping can now use dtrace_stacktrace().

The GPL-licensed dtrace_os.h C header file is now made available through the
/include/linux hierarchy, and it is included in dtrace.h.

Fixed a bug in dtrace_relocs.c where section names where copied into a memory
area that was 1 byte short, causing various unpleasant forms of behaviour.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoFix porting issues from 2.6.32 to 2.6.39.
Kris Van Hees [Thu, 13 Oct 2011 16:45:48 +0000 (12:45 -0400)]
Fix porting issues from 2.6.32 to 2.6.39.
Disable stub_* based syscalls (for now).

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
13 years agoMove cyclic.h into include/linux.
Nick Alcock [Tue, 4 Oct 2011 11:58:17 +0000 (12:58 +0100)]
Move cyclic.h into include/linux.

This is so that things in dtrace/ can pick it up.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
13 years agoFinish GPL/CDDL splitting work.
Nick Alcock [Mon, 3 Oct 2011 16:20:15 +0000 (17:20 +0100)]
Finish GPL/CDDL splitting work.

kernel/dtrace and all that it #includes is now GPLv2, with the aid of a new
systrace_os.h header containing the subset of systrace.h needed by the GPL shim.
Conversely, dtrace/ is entirely CDDL.

dtrace_ioctl.h is now an exported, header in include/linux/, to ease future
sharing by the userspace side. It is probably not copyrightable (as is essential
for interoperability and contains no creative elements), but if it has any license
at all it is GPLv2 like the other headers in that directory (many of which are
include them.)

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
13 years agoSet MODULE_LICENSE to CDDL.
Nick Alcock [Fri, 30 Sep 2011 18:39:22 +0000 (19:39 +0100)]
Set MODULE_LICENSE to CDDL.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
13 years agoCDDL copyrights for everything needing it.
Nick Alcock [Fri, 30 Sep 2011 18:29:33 +0000 (19:29 +0100)]
CDDL copyrights for everything needing it.

The stuff in kernel/dtrace gets just a (C) line: dual-licensed parts will need
further adjustment.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
13 years agoInitial commit of DTrace.
Nick Alcock [Fri, 30 Sep 2011 17:55:09 +0000 (18:55 +0100)]
Initial commit of DTrace.

Build via a simple 'make' if you're already running this kernel, or via 'make
KERNELDIR=/path/to/kernel/top/level' otherwise. Installed via 'make install'.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>