1. 05 Feb, 2018 3 commits
  2. 28 Jan, 2018 6 commits
  3. 27 Jan, 2018 5 commits
  4. 05 Nov, 2017 6 commits
    • Henrique de Moraes Holschuh's avatar
      iucode_tool(8): document changes to --scan-system · 99a0a85d
      Henrique de Moraes Holschuh authored
      Document the new --scan-system behavior as well as its modes of
      operation in the manpage.
      99a0a85d
    • Henrique de Moraes Holschuh's avatar
      iucode_tool: select scan-system strategy change at runtime · b97d0909
      Henrique de Moraes Holschuh authored
      Instead of selecting the scan-system strategy at compile time, enhance
      the long-version of the --scan-system option to take an optional
      argument, and select the strategy.
      
      Available strategies are: 0 (auto), 1 (fast), and 2 (exact).  Fast uses
      just the cpuid instruction and activates all steppings.  Exact will
      query all processors using the kernel cpuid driver.  Auto (the default)
      is currently the same as fast.
      
      The short option -S is equivalent to --scan-system=auto.  This way, we
      don't break backwards command line behavior, and something like
      "iucode_tool -Sl" will still work.
      
      In --scan-system=exact mode, when a /dev/cpu/#/cpuid scan fails, it will
      use the result from the cpuid instruction and also add every other
      stepping for any signatures found before the failure.  This goes well
      beyond the required, since it actually means iucode_tool supports
      multi-signature systems in --scan-system=exact mode...
      b97d0909
    • Henrique de Moraes Holschuh's avatar
      gitignore: rearrange, and ignore backup and vim swap files · 0d14ade7
      Henrique de Moraes Holschuh authored
      * Add comments
      * Reorder so that iucode-tool-specific objects are all together
      * Add backup (*~) and vim swap (*.swp) files to .gitignore.
      0d14ade7
    • Henrique de Moraes Holschuh's avatar
      iucode_tool: move scan_system_processor() one layer down · f626ff7a
      Henrique de Moraes Holschuh authored
      scan_system_processor() should be able to fill in any filter list,
      so give it the filter list it should modify as a parameter, moving
      the hardcoding of the use of uc_filter_list to its caller.
      f626ff7a
    • Henrique de Moraes Holschuh's avatar
      iucode_tool: do not scan-system while parsing · 75eb1d8e
      Henrique de Moraes Holschuh authored
      Instead of processing -s and -S/--scan-system while parsing, queue all
      filters so that we can call scan_system_processors() later.  This was
      the only complex operation that was being carried out while parsing the
      command line.
      
      This change ensures that global options such as -q and -v, that are not
      supposed to be sensitive to their position in the command line, will
      work as expected.
      75eb1d8e
    • Henrique de Moraes Holschuh's avatar
      iucode_tool: add two command-line parser helpers · ab9e562d
      Henrique de Moraes Holschuh authored
      Add two command-line parser helpers:
       * cmdline_get_int() to parse integer parameters;
       * cmdline_get_enumstr() to parse named parameters;
      
      The helpers work with the notion of a default value which is left
      untouched when arg is null (so they handle an optional arg) or when
      parsing fails.
      ab9e562d
  5. 29 Aug, 2017 1 commit
  6. 28 Aug, 2017 1 commit
  7. 26 Aug, 2017 3 commits
  8. 22 May, 2017 2 commits
  9. 12 Apr, 2017 2 commits
  10. 11 Mar, 2017 3 commits
    • Henrique de Moraes Holschuh's avatar
      configure.ac: support libargp as an alternative to glibc argp · b14bed67
      Henrique de Moraes Holschuh authored
      iucode_tool uses the GNU Argp API, which is not part of POSIX, but which
      is included in glibc.  For other systems, a standalone implementation of
      GNU Argp is required, e.g. from libargp or from gnulib.
      
      Change configure to look for argp_parse() in libargp when it can't be
      found in the standard library set.  Header files must be in the default
      system path, though.
      
      This is useful for embedded systems that do not use glibc, such as those
      based on MUSL or uClibc.
      b14bed67
    • Henrique de Moraes Holschuh's avatar
      intel_microcode: do not request inlining for is_zero_checksum() · 069fd48c
      Henrique de Moraes Holschuh authored
      There is no benefit from inlining is_zero_checksum(), and gcc usually
      wouldn't do it anyway even when not vectorizing.
      
      When vectorizing, the function becomes too large to inline since it is
      called by two different points of the code.
      069fd48c
    • Henrique de Moraes Holschuh's avatar
      iucode_tool: use fprintf(stdout) instead of printf() · 0ff45221
      Henrique de Moraes Holschuh authored
      Be explicit about which standard stream we will output to.
      
      This triggers a cool optimization: gcc and clang will replace the
      fprintf(stdout) call with a fwrite() call with static parameters
      calculated at compile time.
      
      This is way better than the lame optimization these two compilers use
      for printf("something\n"): they would replace it with puts("something"),
      which has to scan over the string at runtime, etc.
      0ff45221
  11. 07 Mar, 2017 7 commits
    • Henrique de Moraes Holschuh's avatar
      intel_microcode: declare intel_ucode_errstr() as const · 8fc244d1
      Henrique de Moraes Holschuh authored
      Declare function intel_ucode_errstr() with attribute const in the
      intel_microcode.h header, as the compiler won't be able to notice it by
      itself unless doing LTO.
      
      Add a warning about it to the function body, to help future maintenance.
      8fc244d1
    • Henrique de Moraes Holschuh's avatar
      iucode_tool: ensure printf %x args are unsigned · dc252417
      Henrique de Moraes Holschuh authored
      Correctly cast (int)foo to (unsigned int)foo for printf "%x" arguments.
      This is not fixing any real bug on any sane compiler in the planet, but
      still...
      
      This squashes a number of -Wformat-signedness warnings.
      dc252417
    • Henrique de Moraes Holschuh's avatar
      README: add an example of microcode with multiple sigs · 642ba7e2
      Henrique de Moraes Holschuh authored
      Document iucode_tool's output for microcode with an extended signature
      table, using a real-world example.
      642ba7e2
    • Henrique de Moraes Holschuh's avatar
      configure.ac: add --enable-extend-flags to change default build flags · 1265e861
      Henrique de Moraes Holschuh authored
      Add a way to not completely override the C/CPP/LDFLAGS configure.ac
      would like to set.
      1265e861
    • Henrique de Moraes Holschuh's avatar
      configure: default build to hardened -O3 PIE with lots of warnings · 19d13848
      Henrique de Moraes Holschuh authored
      Override the autoconf default CFLAGS, CPPFLAGS and LDFLAGS for a more
      optimized, hardened build by default.  Also, print the value of these
      variables in configure output.
      
      The standard methods to override the default CFLAGS, CPPFLAGS and
      LDFLAGS in configure still work, and will bypass the new defaults.
      Linux distros that override these on every build should not see any
      changes.
      
      Should the compiler not be detected as gcc-compatible, no change to
      CFLAGS/CPPFLAGS/LDFLAGS will be made.  Note that clang is explicitly
      supported, and works just fine.
      
      The build will default to a baseline of "-O3 -g" and will attempt to
      selectively enable the following warning options:
      
        -Wall -Wextra -Wformat=2 -Werror=format-security -Wtrampolines
        -Wformat-signedness -Wformat-overflow=2 -Wformat-truncation=2
        -Wtrampolines -Wcast-align -Wsign-conversion -Wnull-dereference
        -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
        -Wredundant-decls -Wstrict-overflow -Winit-self -Wshadow
        -Wrestrict -Wpointer-arith -Wlogical-op -Wbad-function-cast
        -Wwrite-strings -Wduplicated-branches -Wduplicated-cond
        -Walloca -Wvla -Walloc-zero -Walloc-size-larger-than=1073741824
      
      and the following hardening options:
      
        -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wstack-protector
        -fPIE -Wl,-z,relro -Wl,-z,now -pie
      
      configure will attempt to detect the set of compiler and linker driver
      flags that would work from the above list.
      
      Caveats: autoconf 2.69 and automake 1.13 or later are now required.
      19d13848
    • Henrique de Moraes Holschuh's avatar
      configure: minor cosmetic fixes · e5a987a8
      Henrique de Moraes Holschuh authored
      Break some excessively long lines, no functional changes.
      e5a987a8
    • Henrique de Moraes Holschuh's avatar
      configure.ac: whitespace fixes · 762725a1
      Henrique de Moraes Holschuh authored
      Expand all tabs in configure.ac.  This is a whitespace-only change.
      762725a1
  12. 15 Feb, 2017 1 commit