1. 17 Jan, 2017 1 commit
  2. 18 Apr, 2016 1 commit
  3. 08 Jan, 2015 1 commit
  4. 01 Jul, 2014 1 commit
  5. 22 Nov, 2013 1 commit
  6. 17 Oct, 2013 1 commit
  7. 15 Sep, 2013 1 commit
  8. 11 Sep, 2013 8 commits
  9. 30 Apr, 2013 1 commit
  10. 28 Feb, 2013 1 commit
  11. 23 Nov, 2012 1 commit
    • Stephen Warren's avatar
      block: store partition_meta_info.uuid as a string · 1ad7e899
      Stephen Warren authored
      This will allow other types of UUID to be stored here, aside from true
      UUIDs.  This also simplifies code that uses this field, since it's usually
      constructed from a, used as a, or compared to other, strings.
      Note: A simplistic approach here would be to set uuid_str[36]=0 whenever a
      /PARTNROFF option was found to be present.  However, this modifies the
      input string, and causes subsequent calls to devt_from_partuuid() not to
      see the /PARTNROFF option, which causes different results.  In order to
      avoid misleading future maintainers, this parameter is marked const.
      Signed-off-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
  12. 04 Jan, 2012 1 commit
  13. 27 May, 2011 1 commit
    • Timo Warns's avatar
      fs/partitions/efi.c: corrupted GUID partition tables can cause kernel oops · 3eb8e74e
      Timo Warns authored
      The kernel automatically evaluates partition tables of storage devices.
      The code for evaluating GUID partitions (in fs/partitions/efi.c) contains
      a bug that causes a kernel oops on certain corrupted GUID partition
      This bug has security impacts, because it allows, for example, to
      prepare a storage device that crashes a kernel subsystem upon connecting
      the device (e.g., a "USB Stick of (Partial) Death").
      	crc = efi_crc32((const unsigned char *) (*gpt), le32_to_cpu((*gpt)->header_size));
      computes a CRC32 checksum over gpt covering (*gpt)->header_size bytes.
      There is no validation of (*gpt)->header_size before the efi_crc32 call.
      A corrupted partition table may have large values for (*gpt)->header_size.
       In this case, the CRC32 computation access memory beyond the memory
      allocated for gpt, which may cause a kernel heap overflow.
      Validate value of GUID partition table header size.
      [akpm@linux-foundation.org: fix layout and indenting]
      Signed-off-by: default avatarTimo Warns <warns@pre-sense.de>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: Eugene Teo <eugeneteo@kernel.sg>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  14. 06 May, 2011 1 commit
  15. 15 Sep, 2010 1 commit
  16. 11 Aug, 2010 1 commit
  17. 21 May, 2010 2 commits
    • Cesar Eduardo Barros's avatar
      fs/partitions: use ADDPART_FLAG_RAID instead of magic number · cc910624
      Cesar Eduardo Barros authored
      ADDPART_FLAG_RAID was introduced in commit d18d7682
      , and most places were
      converted to use it instead of a hardcoded value. However, some places seem
      to have been missed.
      Change all of them to the symbolic names via the following semantic patch:
      struct parsed_partitions *state;
      expression E;
      - state->parts[E].flags = 1
      + state->parts[E].flags = ADDPART_FLAG_RAID
      - state->parts[E].flags |= 1
      + state->parts[E].flags |= ADDPART_FLAG_RAID
      - state->parts[E].flags = 2
      + state->parts[E].flags = ADDPART_FLAG_WHOLEDISK
      - state->parts[E].flags |= 2
      + state->parts[E].flags |= ADDPART_FLAG_WHOLEDISK
      Signed-off-by: default avatarCesar Eduardo Barros <cesarb@cesarb.net>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    • Tejun Heo's avatar
      block: use struct parsed_partitions *state universally in partition check code · 1493bf21
      Tejun Heo authored
      Make the following changes to partition check code.
      * Add ->bdev to struct parsed_partitions.
      * Introduce read_part_sector() which is a simple wrapper around
        read_dev_sector() which takes struct parsed_partitions *state
        instead of @bdev.
      * For functions which used to take @state and @bdev, drop @bdev.  For
        functions which used to take @bdev, replace it with @state.
      * While updating, drop superflous checks on NULL state/bdev in ldm.c.
      This cleans up the API a bit and enables better handling of IO errors
      during partition check as the generic partition check code now has
      much better visibility into what went wrong in the low level code
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
  18. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  19. 23 Nov, 2009 2 commits
    • Karel Zak's avatar
      partitions: read whole sector with EFI GPT header · 87038c2d
      Karel Zak authored
      The size of EFI GPT header is not static, but whole sector is
      allocated for the header. The HeaderSize field must be greater
      than 92 (= sizeof(struct gpt_header) and must be less than or
      equal to the logical block size.
      It means we have to read whole sector with the header, because the
      header crc32 checksum is calculated according to HeaderSize.
      For more details see UEFI standard (version 2.3, May 2009):
        - 5.3.1 GUID Format overview, page 93
        - Table 13. GUID Partition Table Header, page 96
      Signed-off-by: default avatarKarel Zak <kzak@redhat.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
    • Karel Zak's avatar
      partitions: use sector size for EFI GPT · 7d13af32
      Karel Zak authored
      Currently, kernel uses strictly 512-byte sectors for EFI GPT parsing.
      That's wrong.
      UEFI standard (version 2.3, May 2009, 5.3.1 GUID Format overview, page
      95) defines that LBA is always based on the logical block size. It
      means bdev_logical_block_size() (aka BLKSSZGET) for Linux.
      This patch removes static sector size from EFI GPT parser.
      The problem is reproducible with the latest GNU Parted:
       # modprobe scsi_debug dev_size_mb=50 sector_size=4096
        # ./parted /dev/sdb print
        Model: Linux scsi_debug (scsi)
        Disk /dev/sdb: 52.4MB
        Sector size (logical/physical): 4096B/4096B
        Partition Table: gpt
        Number  Start   End     Size    File system  Name     Flags
         1      24.6kB  3002kB  2978kB               primary
         2      3002kB  6001kB  2998kB               primary
         3      6001kB  9003kB  3002kB               primary
        # blockdev --rereadpt /dev/sdb
        # dmesg | tail -1
         sdb: unknown partition table      <---- !!!
      with this patch:
        # blockdev --rereadpt /dev/sdb
        # dmesg | tail -1
         sdb: sdb1 sdb2 sdb3
      Signed-off-by: default avatarKarel Zak <kzak@redhat.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
  20. 25 Jul, 2008 1 commit
  21. 11 May, 2007 1 commit
  22. 27 Sep, 2006 1 commit
  23. 30 Jun, 2006 1 commit
  24. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      Let it rip!