Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odroidgoA: Patches to build with GCC 10 #410

Open
wants to merge 13 commits into
base: odroidgoA-4.4.y
Choose a base branch
from

Commits on Jan 25, 2021

  1. perf: cs-etm: fix duplicate def of traceid_list

    Backport of 168200b upstream
    
    Signed-off-by: Gleb Mazovetskiy <[email protected]>
    glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    7cdd201 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    62b75df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    89b28cc View commit details
    Browse the repository at this point in the history
  4. tools lib api fs: Fix gcc9 stringop-truncation compilation error

    GCC9 introduced string hardening mechanisms, which exhibits the error
    during fs api compilation:
    
    error: '__builtin_strncpy' specified bound 4096 equals destination size
    [-Werror=stringop-truncation]
    
    This comes when the length of copy passed to strncpy is is equal to
    destination size, which could potentially lead to buffer overflow.
    
    There is a need to mitigate this potential issue by limiting the size of
    destination by 1 and explicitly terminate the destination with NULL.
    
    Signed-off-by: Andrey Zhizhikin <[email protected]>
    Reviewed-by: Petr Mladek <[email protected]>
    Acked-by: Jiri Olsa <[email protected]>
    Cc: Alexei Starovoitov <[email protected]>
    Cc: Andrii Nakryiko <[email protected]>
    Cc: Daniel Borkmann <[email protected]>
    Cc: Kefeng Wang <[email protected]>
    Cc: Martin KaFai Lau <[email protected]>
    Cc: Petr Mladek <[email protected]>
    Cc: Sergey Senozhatsky <[email protected]>
    Cc: Song Liu <[email protected]>
    Cc: Yonghong Song <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Link: http://lore.kernel.org/lkml/[email protected]
    Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
    zandrey authored and glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    186f5ff View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    29d83af View commit details
    Browse the repository at this point in the history
  6. nf_conntrack_core: Fix gcc-10 compilation

    gcc-10 emits the following error:
    
    > warning: array subscript 0 is outside the bounds of an interior zero-length array 'u8[0]' {aka 'unsigned char[0]'} [-Wzero-length-bounds]
    
    Based on https://lkml.org/lkml/2020/4/30/1476
    
    Signed-off-by: Gleb Mazovetskiy <[email protected]>
    glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    0ce5411 View commit details
    Browse the repository at this point in the history
  7. wlcore: debugfs: Remove unused variable 'res'

    Fixes the following W=1 kernel build warning(s):
    
    Cc: Kalle Valo <[email protected]>
    Cc: "David S. Miller" <[email protected]>
    Cc: Jakub Kicinski <[email protected]>
    Cc: Luciano Coelho <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Kalle Valo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Lee Jones authored and glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    4e2bc2d View commit details
    Browse the repository at this point in the history
  8. usb: ehci: avoid gcc-10 zero-length-bounds warning

    Backport of https://lkml.org/lkml/2020/4/30/1475
    
    Signed-off-by: Gleb Mazovetskiy <[email protected]>
    glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    7eae4ba View commit details
    Browse the repository at this point in the history
  9. gcc-10 warnings: fix low-hanging fruit

    Backport of 9d82973
    
    Original description below
    ---
    
    Due to a bug-report that was compiler-dependent, I updated one of my
    machines to gcc-10.  That shows a lot of new warnings.  Happily they
    seem to be mostly the valid kind, but it's going to cause a round of
    churn for getting rid of them..
    
    This is the really low-hanging fruit of removing a couple of zero-sized
    arrays in some core code.  We have had a round of these patches before,
    and we'll have many more coming, and there is nothing special about
    these except that they were particularly trivial, and triggered more
    warnings than most.
    
    Signed-off-by: Linus Torvalds <[email protected]>
    torvalds authored and glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    6fb2704 View commit details
    Browse the repository at this point in the history
  10. Fix joystick/analog.c GCC-10 -Wrestrict warning

    drivers/input/joystick/analog.c: In function 'analog_connect':
    drivers/input/joystick/analog.c:444:3: warning: 'snprintf' argument 4 overlaps destination object '<unknown>' [-Wrestrict]
    error, forbidden warning:analog.c:444
      444 |   snprintf(analog->name, sizeof(analog->name), "%s %d-hat",
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      445 |     analog->name, hweight16(analog->mask & ANALOG_HATS_ALL));
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Gleb Mazovetskiy <[email protected]>
    glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    e76f457 View commit details
    Browse the repository at this point in the history
  11. drivers/net/phy/mdio_bus: Fix gcc-10 -Wrestrict

    Fixes
    
    drivers/net/phy/mdio_bus.c: In function 'phy_registers_show':
    drivers/net/phy/mdio_bus.c:665:3: warning: 'sprintf' argument 3 overlaps destination object 'buf' [-Wrestrict]
    error, forbidden warning:mdio_bus.c:665
      665 |   sprintf(buf, "%s%2d: 0x%x\n", buf, index,
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      666 |    phy_read(phydev, index));
          |    ~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/net/phy/mdio_bus.c:659:77: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
      659 | phy_registers_show(struct device *dev, struct device_attribute *attr, char *buf)
          |                                                                       ~~~~~~^~~
    
    Signed-off-by: Gleb Mazovetskiy <[email protected]>
    glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    c7c2392 View commit details
    Browse the repository at this point in the history
  12. drivers/net/wireless: Fix gcc-10 -Wrestrict

    Fixes errors such as:
    
    drivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c: In function 'rtw_mp_txpower_index':
    drivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c:573:4: warning: 'sprintf' argument 3 overlaps destination object 'extra' [-Wrestrict]
    error, forbidden warning:ioctl_mp.c:573
      573 |    sprintf(extra, "%s,pathb=%d", extra, txpower_inx);
          |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/net/wireless/rtl8821cu/os_dep/linux/ioctl_mp.c:546:34: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
      546 |     struct iw_point *wrqu, char *extra)
          |                            ~~~~~~^~~~~
    
    Signed-off-by: Gleb Mazovetskiy <[email protected]>
    glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    e14af2d View commit details
    Browse the repository at this point in the history
  13. BACKPORT: arm64: don't zero in __copy_from_user{,_inatomic}

    Signed-off-by: Al Viro <[email protected]>
    Al Viro authored and glebm committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    02bcb5a View commit details
    Browse the repository at this point in the history