1. 15 Apr, 2021 1 commit
  2. 24 Mar, 2021 1 commit
    • Arnd Bergmann's avatar
      security: commoncap: fix -Wstringop-overread warning · 82e5d8cc
      Arnd Bergmann authored
      gcc-11 introdces a harmless warning for cap_inode_getsecurity:
      
      security/commoncap.c: In function ‘cap_inode_getsecurity’:
      security/commoncap.c:440:33: error: ‘memcpy’ reading 16 bytes from a region of size 0 [-Werror=stringop-overread]
        440 |                                 memcpy(&nscap->data, &cap->data, sizeof(__le32) * 2 * VFS_CAP_U32);
            |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      The problem here is that tmpbuf is initialized to NULL, so gcc assumes
      it is not accessible unless it gets set by vfs_getxattr_alloc().  This is
      a legitimate warning as far as I can tell, but the code is correct since
      it correctly handles the error when that function fails.
      
      Add a separate NULL check to tell gcc about it as well.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
      Signed-off-by: default avatarJames Morris <jamorris@linux.microsoft.com>
      82e5d8cc
  3. 14 Feb, 2021 7 commits
  4. 13 Feb, 2021 12 commits
  5. 12 Feb, 2021 13 commits
  6. 11 Feb, 2021 6 commits