1. 28 2月, 2015 1 次提交
  2. 09 12月, 2014 1 次提交
  3. 01 7月, 2014 3 次提交
    • N
      tmon: set umask to a reasonable value · 4adccf9f
      Neil Horman 提交于
      Currently, the tmon umask value is set to 0, which means whatever the permission
      mask in the shell are when starting tmon in daemon mode are what the permissions
      of any created files will be.  We should likely set something more explicit, so
      lets go with the usual 022
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      4adccf9f
    • N
      tmon: Check log file for common secuirty issues · 951fda3d
      Neil Horman 提交于
      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: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      951fda3d
    • J
      tools/thermal: tmon: fix compilation errors when building statically · 6b533269
      Javi Merino 提交于
      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: NJavi Merino <javi.merino@arm.com>
      Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
      6b533269
  4. 07 11月, 2013 1 次提交
    • J
      tools/thermal: Introduce tmon, a tool for thermal subsystem · 94f69966
      Jacob Pan 提交于
      Increasingly, Linux is running on thermally constrained devices. The simple
      thermal relationship between processor and fan has become past for modern
      computers.
      
      As hardware vendors cope with the thermal constraints on their products,
      more sensors are added, new cooling capabilities are introduced. The
      complexity of the thermal relationship can grow exponentially among cooling
      devices, zones, sensors, and trip points. They can also change dynamically.
      
      To expose such relationship to the userspace, Linux generic thermal layer
      introduced sysfs entry at /sys/class/thermal with a matrix of symbolic
      links, trip point bindings, and device instances. To traverse such
      matrix by hand is not a trivial task. Testing is also difficult in that
      thermal conditions are often exception cases that hard to reach in
      normal operations.
      
      TMON is conceived as a tool to help visualize, tune, and test the
      complex thermal subsystem.
      Signed-off-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      94f69966