Skip to content
  1. Jul 01, 2014
    • Neil Horman's avatar
      tmon: Check log file for common secuirty issues · 951fda3d
      Neil Horman authored
      
      
      The tmon logging system blindly opens its log file on a static path, making it
      very easy for someone to redirect that log information to inappropriate places
      or overwrite other users data.  Do some easy checking to make sure we're not
      logging to a symlink or a file owned by another user.
      
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      951fda3d
    • Javi Merino's avatar
      tools/thermal: tmon: fix compilation errors when building statically · 6b533269
      Javi Merino authored
      
      
      tmon fails to build statically with the following error:
      
      $ make LDFLAGS=-static
      gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -static tmon.o tui.o sysfs.o pid.o   -o tmon -lm -lpanel -lncursesw  -lpthread
      tmon.o: In function `tmon_sig_handler':
      tmon.c:(.text+0x21): undefined reference to `stdscr'
      tmon.o: In function `tmon_cleanup':
      tmon.c:(.text+0xb9): undefined reference to `stdscr'
      tmon.c:(.text+0x11e): undefined reference to `stdscr'
      tmon.c:(.text+0x123): undefined reference to `keypad'
      tmon.c:(.text+0x12d): undefined reference to `nocbreak'
      tmon.o: In function `main':
      tmon.c:(.text+0x785): undefined reference to `stdscr'
      tmon.c:(.text+0x78a): undefined reference to `nodelay'
      tui.o: In function `setup_windows':
      tui.c:(.text+0x131): undefined reference to `stdscr'
      tui.c:(.text+0x176): undefined reference to `stdscr'
      tui.c:(.text+0x19f): undefined reference to `stdscr'
      tui.c:(.text+0x1cc): undefined reference to `stdscr'
      tui.c:(.text+0x1ff): undefined reference to `stdscr'
      tui.o:tui.c:(.text+0x229): more undefined references to `stdscr' follow
      tui.o: In function `show_cooling_device':
      [...]
      
      stdscr() and friends are in libtinfo (part of ncurses) so add it to
      the libraries that are linked in when compiling tmon to fix it.
      
      Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Acked-by: default avatarJacob Pan <jacob.jun.pan@linux.intel.com>
      6b533269
  2. Jun 12, 2014
  3. Jun 11, 2014
  4. Jun 10, 2014
  5. Jun 09, 2014
  6. Jun 07, 2014
    • Steven Rostedt (Red Hat)'s avatar
      tools lib traceevent: Added support for __get_bitmask() macro · 473a778a
      Steven Rostedt (Red Hat) authored
      Coming in v3.16, trace events will be able to save bitmasks in raw
      format in the ring buffer and output it with the __get_bitmask() macro.
      
      In order for userspace tools to parse this, it must be able to handle
      the __get_bitmask() call and be able to convert the data that's in
      the ring buffer into a nice bitmask format. The output is similar to
      what the kernel uses to print bitmasks, with a comma separator every
      4 bytes (8 characters).
      
      This allows for cpumasks to also be saved efficiently.
      
      The first user is the thermal:thermal_power_limit event which has the
      following output:
      
       thermal_power_limit:  cpus=0000000f freq=1900000 cdev_state=0 power=5252
      
      Link: http://lkml.kernel.org/r/20140506132238.22e136d1@gandalf.local.home
      
      
      
      Suggested-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarJavi Merino <javi.merino@arm.com>
      Link: http://lkml.kernel.org/r/20140603032224.229186537@goodmis.org
      
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      473a778a
    • Steven Rostedt (Red Hat)'s avatar
      tools lib traceevent: Add options to function plugin · 49440828
      Steven Rostedt (Red Hat) authored
      
      
      Add the options "parent" and "indent" to the function plugin.
      
      When parent is set, the output looks like this:
      
      function:             fsnotify_modify <-- vfs_write
      function:             zone_statistics <-- get_page_from_freelist
      function:                __inc_zone_state <-- zone_statistics
      function:                inotify_inode_queue_event <-- fsnotify_modify
      function:                fsnotify_parent <-- fsnotify_modify
      function:                __inc_zone_state <-- zone_statistics
      function:                   __fsnotify_parent <-- fsnotify_parent
      function:                   inotify_dentry_parent_queue_event <-- fsnotify_parent
      function:             add_to_page_cache_lru <-- do_read_cache_page
      
      When it's not set, it looks like:
      
      function:             fsnotify_modify
      function:             zone_statistics
      function:                __inc_zone_state
      function:                inotify_inode_queue_event
      function:                fsnotify_parent
      function:                __inc_zone_state
      function:                   __fsnotify_parent
      function:                   inotify_dentry_parent_queue_event
      function:             add_to_page_cache_lru
      
      When the otpion "indent" is not set, it looks like this:
      
      function:             fsnotify_modify <-- vfs_write
      function:             zone_statistics <-- get_page_from_freelist
      function:             __inc_zone_state <-- zone_statistics
      function:             inotify_inode_queue_event <-- fsnotify_modify
      function:             fsnotify_parent <-- fsnotify_modify
      function:             __inc_zone_state <-- zone_statistics
      function:             __fsnotify_parent <-- fsnotify_parent
      function:             inotify_dentry_parent_queue_event <-- fsnotify_parent
      function:             add_to_page_cache_lru <-- do_read_cache_page
      
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/20140603032224.056940410@goodmis.org
      
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      49440828
    • Steven Rostedt's avatar
      tools lib traceevent: Add options to plugins · 5827f2fa
      Steven Rostedt authored
      
      
      The traceevent plugins allows developers to have their events print out
      information that is more advanced than what can be achieved by the
      trace event format files.
      
      As these plugins are used on the userspace side of the tracing tools, it
      is only logical that the tools should be able to produce different types
      of output for the events. The types of events still need to be defined by
      the plugins thus we need a way to pass information from the tool to the
      plugin to specify what type of information to be shown.
      
      Not only does the information need to be passed by the tool to plugin, but
      the plugin also requires a way to notify the tool of what options it can
      provide.
      
      This builds the plugin option infrastructure that is taken from trace-cmd
      that is used to allow plugins to produce different output based on the
      options specified by the tool.
      
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/20140603184154.0a4c031c@gandalf.local.home
      
      
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      5827f2fa
Loading