17 Aug, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    [ bp: Merge all EDAC patches into a single one. ]

    Signed-off-by: Alexander A. Klimov
    Signed-off-by: Borislav Petkov
    Acked-by: Tero Kristo # ti_edac
    Link: https://lkml.kernel.org/r/20200708113546.14135-1-grandmaster@al2klimov.de

    Alexander A. Klimov
     

09 Nov, 2019

1 commit

  • The EDAC_DIMM_PTR() macro takes 3 arguments from struct mem_ctl_info.
    Clean up this interface to only pass the mci struct and replace this
    macro with a new function edac_get_dimm().

    Also introduce an edac_get_dimm_by_index() function for later use.
    This allows it to get a DIMM pointer only by a given index. This can
    be useful if the DIMM's position within the layers of the memory
    controller or the exact size of the layers are unknown.

    Small style changes made for some hunks after applying the semantic
    patch.

    Semantic patch used:

    @@ expression mci, a, b,c; @@

    -EDAC_DIMM_PTR(mci->layers, mci->dimms, mci->n_layers, a, b, c)
    +edac_get_dimm(mci, a, b, c)

    [ bp: Touchups. ]

    Signed-off-by: Robert Richter
    Signed-off-by: Borislav Petkov
    Reviewed-by: Mauro Carvalho Chehab
    Cc: "linux-edac@vger.kernel.org"
    Cc: James Morse
    Cc: Jason Baron
    Cc: Qiuxu Zhuo
    Cc: Tero Kristo
    Cc: Tony Luck
    Link: https://lkml.kernel.org/r/20191106093239.25517-2-rrichter@marvell.com

    Robert Richter
     

01 Oct, 2019

2 commits


31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this file may be distributed under the terms of the gnu general
    public license version 2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 9 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.395589349@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

17 Jul, 2017

1 commit

  • It is a write-only variable so get rid of it.

    Signed-off-by: Borislav Petkov
    Acked-by: Robert Richter
    Acked-by: Michal Simek
    Acked-by: Thor Thayer
    Acked-by: Tony Luck
    Cc: Mark Gross
    Cc: Tim Small
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: Jason Baron
    Cc: "Sören Brinkmann"
    Cc: Ralf Baechle
    Cc: David Daney
    Cc: Loc Ho
    Cc: linux-edac@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-mips@linux-mips.org

    Borislav Petkov
     

26 Jan, 2017

1 commit

  • REDMEMB[17] is the ECC_Locator bit, which, when set, identifies the
    CS[3:2] as the simbols in error. And thus the second channel.

    The macro computing it was wrong so get rid of it (it was used at one
    place only) and get rid of the conditional too. Generates better code
    this way anyway.

    Signed-off-by: Borislav Petkov
    Reported-by: David Binderman
    Reviewed-by: Mauro Carvalho Chehab

    Borislav Petkov
     

15 Dec, 2016

1 commit


11 Mar, 2014

1 commit

  • Linux 3.14-rc5

    * tag 'v3.14-rc5': (1117 commits)
    Linux 3.14-rc5
    drm/vmwgfx: avoid null pointer dereference at failure paths
    drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date.
    drm/vmwgfx: Remove some unused surface formats
    MAINTAINERS: add maintainer entry for Armada DRM driver
    arm64: Fix !CONFIG_SMP kernel build
    arm64: mm: Add double logical invert to pte accessors
    dm cache: fix truncation bug when mapping I/O to >2TB fast device
    perf tools: Fix strict alias issue for find_first_bit
    powerpc/powernv: Fix indirect XSCOM unmangling
    powerpc/powernv: Fix opal_xscom_{read,write} prototype
    powerpc/powernv: Refactor PHB diag-data dump
    powerpc/powernv: Dump PHB diag-data immediately
    powerpc: Increase stack redzone for 64-bit userspace to 512 bytes
    powerpc/ftrace: bugfix for test_24bit_addr
    powerpc/crashdump : Fix page frame number check in copy_oldmem_page
    powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
    kvm, vmx: Really fix lazy FPU on nested guest
    perf tools: fix BFD detection on opensuse
    drm/radeon: enable speaker allocation setup on dce3.2
    ...

    Mauro Carvalho Chehab
     

25 Feb, 2014

1 commit

  • pci_get_device() decrements the reference count of "from" (last
    argument) so when we break off the loop successfully we have only one
    device reference - and we don't know which device we have. If we want
    a reference to each device, we must take them explicitly and let
    the pci_get_device() walk complete to avoid duplicate references.

    This is serious, as over-putting device references will cause
    the device to eventually disappear. Without this fix, the kernel
    crashes after a few insmod/rmmod cycles.

    Tested on an Intel S7000FC4UR system with a 7300 chipset.

    Signed-off-by: Jean Delvare
    Link: http://lkml.kernel.org/r/20140224111656.09bbb7ed@endymion.delvare
    Cc: Mauro Carvalho Chehab
    Cc: Doug Thompson
    Cc: stable@vger.kernel.org
    Signed-off-by: Borislav Petkov

    Jean Delvare
     

07 Feb, 2014

1 commit


06 Dec, 2013

1 commit

  • Currently, there is no other bus that has something like this macro for
    their device ids. Thus, DEFINE_PCI_DEVICE_TABLE macro should be removed.

    Signed-off-by: Jingoo Han
    Link: http://lkml.kernel.org/r/001c01ceefb3$5724d860$056e8920$%han@samsung.com
    [ Boris: swap commit message with better one. ]
    Signed-off-by: Borislav Petkov

    Jingoo Han
     

29 Apr, 2013

1 commit

  • When the machine is on single mode, only branch 0 channel 0
    is valid. However, the code is not honouring it:

    [ 1952.639341] EDAC DEBUG: i7300_get_mc_regs: Memory controller operating on single mode
    ...
    [ 1952.639351] EDAC DEBUG: i7300_init_csrows: AMB-present CH0 = 0x1:
    [ 1952.639353] EDAC DEBUG: i7300_init_csrows: AMB-present CH1 = 0x0:
    [ 1952.639355] EDAC DEBUG: i7300_init_csrows: AMB-present CH2 = 0x0:
    [ 1952.639358] EDAC DEBUG: i7300_init_csrows: AMB-present CH3 = 0x0:
    ...
    [ 1952.639360] EDAC DEBUG: decode_mtr: MTR0 CH0: DIMMs are Present (mtr)
    [ 1952.639362] EDAC DEBUG: decode_mtr: WIDTH: x8
    [ 1952.639363] EDAC DEBUG: decode_mtr: ELECTRICAL THROTTLING is enabled
    [ 1952.639364] EDAC DEBUG: decode_mtr: NUMBANK: 4 bank(s)
    [ 1952.639366] EDAC DEBUG: decode_mtr: NUMRANK: single
    [ 1952.639367] EDAC DEBUG: decode_mtr: NUMROW: 16,384 - 14 rows
    [ 1952.639368] EDAC DEBUG: decode_mtr: NUMCOL: 1,024 - 10 columns
    [ 1952.639370] EDAC DEBUG: decode_mtr: SIZE: 512 MB
    [ 1952.639371] EDAC DEBUG: decode_mtr: ECC code is 8-byte-over-32-byte SECDED+ code
    [ 1952.639373] EDAC DEBUG: decode_mtr: Scrub algorithm for x8 is on enhanced mode
    [ 1952.639374] EDAC DEBUG: decode_mtr: MTR0 CH1: DIMMs are Present (mtr)
    [ 1952.639376] EDAC DEBUG: decode_mtr: WIDTH: x8
    [ 1952.639377] EDAC DEBUG: decode_mtr: ELECTRICAL THROTTLING is enabled
    [ 1952.639379] EDAC DEBUG: decode_mtr: NUMBANK: 4 bank(s)
    [ 1952.639380] EDAC DEBUG: decode_mtr: NUMRANK: single
    [ 1952.639381] EDAC DEBUG: decode_mtr: NUMROW: 16,384 - 14 rows
    [ 1952.639383] EDAC DEBUG: decode_mtr: NUMCOL: 1,024 - 10 columns
    [ 1952.639384] EDAC DEBUG: decode_mtr: SIZE: 512 MB
    [ 1952.639385] EDAC DEBUG: decode_mtr: ECC code is 8-byte-over-32-byte SECDED+ code
    [ 1952.639387] EDAC DEBUG: decode_mtr: Scrub algorithm for x8 is on enhanced mode
    ...
    [ 1952.639449] EDAC DEBUG: print_dimm_size: channel 0 | channel 1 | channel 2 | channel 3 |
    [ 1952.639451] EDAC DEBUG: print_dimm_size: -------------------------------------------------------------
    [ 1952.639453] EDAC DEBUG: print_dimm_size: csrow/SLOT 0 512 MB | 512 MB | 0 MB | 0 MB |
    [ 1952.639456] EDAC DEBUG: print_dimm_size: csrow/SLOT 1 0 MB | 0 MB | 0 MB | 0 MB |
    [ 1952.639458] EDAC DEBUG: print_dimm_size: csrow/SLOT 2 0 MB | 0 MB | 0 MB | 0 MB |
    [ 1952.639460] EDAC DEBUG: print_dimm_size: csrow/SLOT 3 0 MB | 0 MB | 0 MB | 0 MB |
    [ 1952.639462] EDAC DEBUG: print_dimm_size: csrow/SLOT 4 0 MB | 0 MB | 0 MB | 0 MB |
    [ 1952.639464] EDAC DEBUG: print_dimm_size: csrow/SLOT 5 0 MB | 0 MB | 0 MB | 0 MB |
    [ 1952.639466] EDAC DEBUG: print_dimm_size: csrow/SLOT 6 0 MB | 0 MB | 0 MB | 0 MB |
    [ 1952.639468] EDAC DEBUG: print_dimm_size: csrow/SLOT 7 0 MB | 0 MB | 0 MB | 0 MB |
    [ 1952.639470] EDAC DEBUG: print_dimm_size: -------------------------------------------------------------

    Instead of detecting a single memory at channel 0, it is showing
    twice the memory.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, and __devexit
    from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Doug Thompson
    Cc: Borislav Petkov
    Cc: Mark Gross
    Cc: Jason Uhlenkott
    Cc: Mauro Carvalho Chehab
    Cc: Tim Small
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: Ralf Baechle
    Cc: David Daney
    Cc: Egor Martovetsky
    Cc: Olof Johansson
    Cc: Chris Metcalf
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 Oct, 2012

1 commit

  • * Right-shift the values in GET_FBD_FAT_IDX and GET_FBD_NF_IDX, so
    that the callers get the result they expect.
    * Fix definition of FERR_FAT_FBD_ERR_MASK.
    * Call GET_FBD_NF_IDX, not GET_FBD_FAT_IDX, when operating on
    register FERR_NF_FBD. We were lucky they have the same definition.

    This fixes kernel bug #44131:
    https://bugzilla.kernel.org/show_bug.cgi?id=44131

    Signed-off-by: Jean Delvare
    Cc: Mauro Carvalho Chehab
    Cc: Doug Thompson
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Jean Delvare
     

12 Jun, 2012

5 commits

  • In order to avoid loosing error events, it is desirable to group
    error events together and generate a single trace for several identical
    errors.

    The trace API already allows reporting multiple errors. Change the
    handle_error function to also allow that.

    The changes at the drivers were made by this small script:

    $file .=$_ while (<>);
    $file =~ s/(edac_mc_handle_error)\s*\(([^\,]+)\,([^\,]+)\,/$1($2,$3, 1,/g;
    print $file;

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Remove the arch-dependent parameter, as it were not used,
    as the MCE tracepoint weren't implemented. It probably doesn't
    make sense to have an MCE-specific tracepoint, as this will
    cost more bytes at the tracepoint, and tracepoint is not free.

    The changes at the EDAC drivers were done by this small perl script:

    $file .=$_ while (<>);
    $file =~ s/(edac_mc_handle_error)\s*\(([^\;]+)\,([^\,\)]+)\s*\)/$1($2)/g;
    print $file;

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Use a more common debugging style.

    Remove __FILE__ uses, add missing newlines,
    coalesce formats and align arguments.

    Signed-off-by: Joe Perches
    Signed-off-by: Mauro Carvalho Chehab

    Joe Perches
     
  • Convert macros to a simpler style and enforce appropriate
    format checking when not CONFIG_EDAC_DEBUG.

    Use fmt and __VA_ARGS__, neaten macros.

    Move some string arrays to the debugfx uses and remove the
    now unnecessary CONFIG_EDAC_DEBUG variable block definitions.

    Signed-off-by: Joe Perches
    Signed-off-by: Mauro Carvalho Chehab

    Joe Perches
     
  • The debug macro already adds that. Most of the work here was
    made by this small script:

    $f .=$_ while (<>);

    $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*": /\1"/g;
    $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*/\1/g;
    $f =~ s/(debugf[0-9]\s*\(\s*)__FILE__\s*"MC: /\1"/g;

    $f =~ s/(debugf[0-9]\s*\(\")\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+)__func__\s*\,\s*/\1\2/g;
    $f =~ s/(debugf[0-9]\s*\(\")\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+),\s*__func__\s*\)/\1\2)/g;
    $f =~ s/(debugf[0-9]\s*\(\"MC\:\s*)\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+)__func__\s*\,\s*/\1\2/g;
    $f =~ s/(debugf[0-9]\s*\(\"MC\:\s*)\%s[\:\,\(\)]*\s*([^\"]*\s*[^\)]+),\s*__func__\s*\)/\1\2)/g;

    $f =~ s/\"MC\: \\n\"/"MC:\\n"/g;

    print $f;

    After running the script, manual cleanups were done to fix it the remaining
    places.

    While here, removed the __LINE__ on most places, as it doesn't actually give
    useful info on most places.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

11 Jun, 2012

1 commit

  • As EDAC doesn't use struct device itself, it created a parent dev
    pointer called as "pdev". Now that we'll be converting it to use
    struct device, instead of struct devsys, this needs to be fixed.

    No functional changes.

    Reviewed-by: Aristeu Rozanski
    Acked-by: Chris Metcalf
    Cc: Doug Thompson
    Cc: Borislav Petkov
    Cc: Mark Gross
    Cc: Jason Uhlenkott
    Cc: Tim Small
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: Olof Johansson
    Cc: Egor Martovetsky
    Cc: Michal Marek
    Cc: Jiri Kosina
    Cc: Joe Perches
    Cc: Dmitry Eremin-Solenikov
    Cc: Benjamin Herrenschmidt
    Cc: Hitoshi Mitake
    Cc: Andrew Morton
    Cc: "Niklas Söderlund"
    Cc: Shaohui Xie
    Cc: Josh Boyer
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

29 May, 2012

5 commits

  • Now that all drivers got converted to use the new ABI, we can
    drop the old one.

    Acked-by: Chris Metcalf
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The legacy edac ABI is going to be removed. Port the driver to use
    and benefit from the new API functionality.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The number of pages is a dimm property. Move it to the dimm struct.

    After this change, it is possible to add sysfs nodes for the DIMM's that
    will properly represent the DIMM stick properties, including its size.

    A TODO fix here is to properly represent dual-rank/quad-rank DIMMs when
    the memory controller represents the memory via chip select rows.

    Reviewed-by: Aristeu Rozanski
    Acked-by: Borislav Petkov
    Acked-by: Chris Metcalf
    Cc: Doug Thompson
    Cc: Mark Gross
    Cc: Jason Uhlenkott
    Cc: Tim Small
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: Olof Johansson
    Cc: Egor Martovetsky
    Cc: Michal Marek
    Cc: Jiri Kosina
    Cc: Joe Perches
    Cc: Dmitry Eremin-Solenikov
    Cc: Benjamin Herrenschmidt
    Cc: Hitoshi Mitake
    Cc: Andrew Morton
    Cc: "Niklas Söderlund"
    Cc: Shaohui Xie
    Cc: Josh Boyer
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Almost all edac drivers initialize csrow_info->first_page,
    csrow_info->last_page and csrow_info->page_mask. Those vars are
    used inside the EDAC core, in order to calculate the csrow affected
    by an error, by using the routine edac_mc_find_csrow_by_page().

    However, very few drivers actually use it:
    e752x_edac.c
    e7xxx_edac.c
    i3000_edac.c
    i82443bxgx_edac.c
    i82860_edac.c
    i82875p_edac.c
    i82975x_edac.c
    r82600_edac.c

    There also a few other drivers that have their own calculus
    formula internally using those vars.

    All the others are just wasting time by initializing those
    data.

    While initializing data without using them won't cause any troubles, as
    those information is stored at the wrong place (at csrows structure), it
    is better to remove what is unused, in order to simplify the next patch.

    Reviewed-by: Aristeu Rozanski
    Acked-by: Borislav Petkov
    Acked-by: Chris Metcalf
    Cc: Doug Thompson
    Cc: Hitoshi Mitake
    Cc: Andrew Morton
    Cc: "Niklas Söderlund"
    Cc: Josh Boyer
    Cc: Jiri Kosina
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • On systems based on chip select rows, all channels need to use memories
    with the same properties, otherwise the memories on channels A and B
    won't be recognized.

    However, such assumption is not true for all types of memory
    controllers.

    Controllers for FB-DIMM's don't have such requirements.

    Also, modern Intel controllers seem to be capable of handling such
    differences.

    So, we need to get rid of storing the DIMM information into a per-csrow
    data, storing it, instead at the right place.

    The first step is to move grain, mtype, dtype and edac_mode to the
    per-dimm struct.

    Reviewed-by: Aristeu Rozanski
    Reviewed-by: Borislav Petkov
    Acked-by: Chris Metcalf
    Cc: Doug Thompson
    Cc: Borislav Petkov
    Cc: Mark Gross
    Cc: Jason Uhlenkott
    Cc: Tim Small
    Cc: Ranganathan Desikan
    Cc: "Arvind R."
    Cc: Olof Johansson
    Cc: Egor Martovetsky
    Cc: Michal Marek
    Cc: Jiri Kosina
    Cc: Joe Perches
    Cc: Dmitry Eremin-Solenikov
    Cc: Benjamin Herrenschmidt
    Cc: Hitoshi Mitake
    Cc: Andrew Morton
    Cc: James Bottomley
    Cc: "Niklas Söderlund"
    Cc: Shaohui Xie
    Cc: Josh Boyer
    Cc: Mike Williams
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

19 Mar, 2012

1 commit

  • These const tables are currently marked __devinitdata, but
    Documentation/PCI/pci.txt says:

    "o The ID table array should be marked __devinitconst; this is done
    automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE()."

    So use DEFINE_PCI_DEVICE_TABLE(x).

    Based on PaX and earlier work by Andi Kleen.

    Signed-off-by: Lionel Debroux
    Signed-off-by: Borislav Petkov

    Lionel Debroux
     

01 Nov, 2011

1 commit


27 May, 2011

1 commit

  • * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
    gfs2: Drop __TIME__ usage
    isdn/diva: Drop __TIME__ usage
    atm: Drop __TIME__ usage
    dlm: Drop __TIME__ usage
    wan/pc300: Drop __TIME__ usage
    parport: Drop __TIME__ usage
    hdlcdrv: Drop __TIME__ usage
    baycom: Drop __TIME__ usage
    pmcraid: Drop __DATE__ usage
    edac: Drop __DATE__ usage
    rio: Drop __DATE__ usage
    scsi/wd33c93: Drop __TIME__ usage
    scsi/in2000: Drop __TIME__ usage
    aacraid: Drop __TIME__ usage
    media/cx231xx: Drop __TIME__ usage
    media/radio-maxiradio: Drop __TIME__ usage
    nozomi: Drop __TIME__ usage
    cyclades: Drop __TIME__ usage

    Linus Torvalds
     

19 Apr, 2011

1 commit

  • The kernel already prints its build timestamp during boot, no need to
    repeat it in random drivers and produce different object files each
    time.

    Cc: Doug Thompson
    Cc: bluesmoke-devel@lists.sourceforge.net
    Cc: linux-edac@vger.kernel.org
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Michal Marek

    Michal Marek
     

31 Mar, 2011

1 commit


19 Jan, 2011

1 commit

  • Fix a bunch of
    warning: ‘inline’ is not at beginning of declaration
    messages when building a 'make allyesconfig' kernel with -Wextra.

    These warnings are trivial to kill, yet rather annoying when building with
    -Wextra.
    The more we can cut down on pointless crap like this the better (IMHO).

    A previous patch to do this for a 'allnoconfig' build has already been
    merged. This just takes the cleanup a little further.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Jiri Kosina

    Jesper Juhl
     

25 Sep, 2010

2 commits


31 Aug, 2010

6 commits