test_072_strict_devmem from ubuntu_qrt_kernel_security failed to build on F-OEM-5.6

Bug #1879340 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QA Regression Testing
Fix Released
Undecided
Unassigned
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
linux-oem-5.6 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

  ======================================================================
  FAIL: test_072_strict_devmem (__main__.KernelSecurityTest)
  /dev/mem unreadable for kernel memory
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "./test-kernel-security.py", line 624, in test_072_strict_devmem
      self.assertShellExitEquals(0, ["make"])
    File "/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/testlib.py", line 1158, in assertShellExitEquals
      self.assertEqual(expected, rc, msg + result + report)
  AssertionError: Got exit code 2, expected 0
  Command: 'make'
  Output:
  cc -Wall -Werror -O2 readmem.c -o readmem -lcap
  make -C signpost
  make[1]: Entering directory '/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost'
  make -C /usr/src/linux-headers-5.6.0-1010-oem M=$PWD modules
  make[2]: Entering directory '/usr/src/linux-headers-5.6.0-1010-oem'
    CC [M] /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.o
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c: In function ‘signpost_init’:
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:101:50: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    101 | PROC_CREATE(entry, "signpost_virt", S_IRUGO, &signpost_virt_proc_fops);
        | ^~~~~~~~~~~~~~~~~~~~~~~~
        | |
        | const struct file_operations *
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:78:43: note: in definition of macro ‘PROC_CREATE’
     78 | entry = proc_create(name, mode, NULL, func)
        | ^~~~
  In file included from /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:15:
  ./include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
     64 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
        | ^~~~~~~~~~~
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:107:50: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    107 | PROC_CREATE(entry, "signpost_phys", S_IRUGO, &signpost_phys_proc_fops);
        | ^~~~~~~~~~~~~~~~~~~~~~~~
        | |
        | const struct file_operations *
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:78:43: note: in definition of macro ‘PROC_CREATE’
     78 | entry = proc_create(name, mode, NULL, func)
        | ^~~~
  In file included from /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:15:
  ./include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
     64 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
        | ^~~~~~~~~~~
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:113:51: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    113 | PROC_CREATE(entry, "signpost_value", S_IRUGO, &signpost_value_proc_fops);
        | ^~~~~~~~~~~~~~~~~~~~~~~~~
        | |
        | const struct file_operations *
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:78:43: note: in definition of macro ‘PROC_CREATE’
     78 | entry = proc_create(name, mode, NULL, func)
        | ^~~~
  In file included from /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.c:15:
  ./include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
     64 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
        | ^~~~~~~~~~~
  cc1: some warnings being treated as errors
  make[3]: *** [scripts/Makefile.build:276: /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost/signpost.o] Error 1
  make[2]: *** [Makefile:1695: /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost] Error 2
  make[2]: Leaving directory '/usr/src/linux-headers-5.6.0-1010-oem'
  make[1]: *** [Makefile:4: all] Error 2
  make[1]: Leaving directory '/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/mem/signpost'
  make: *** [Makefile:6: all] Error 2

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.6.0-1010-oem 5.6.0-1010.10
ProcVersionSignature: User Name 5.6.0-1010.10-oem 5.6.8
Uname: Linux 5.6.0-1010-oem x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
Date: Mon May 18 14:47:03 2020
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-signed-oem-5.6
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
tags: added: sru-20200427 ubuntu-qrt-kernel-security
Timo Aaltonen (tjaalton)
affects: linux-signed-oem-5.6 (Ubuntu) → linux-oem-5.6 (Ubuntu)
Po-Hsu Lin (cypressyew)
tags: added: sru-20200518
Revision history for this message
Steve Beattie (sbeattie) wrote :

This issue ultimately has the same root cause as LP: #1880659, namely that in the 5.6 development cycle, the proc_fs infrastructure was modified to not use the generic file_operations struct and instead use a simplified procfs_ops struct (see d56c0d45f0e27 'proc: decouple proc from VFS with "struct proc_ops"'), which is why this test is failing.

This has been fixed in the qa-regression-testing tree in https://git.launchpad.net/qa-regression-testing/commit/?id=f815e50b3ffd0cacdca98dee62d324ff1488bcb3

Thanks.

Changed in qa-regression-testing:
status: New → Fix Released
Changed in linux-oem-5.6 (Ubuntu):
status: New → Invalid
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Issue does not exist anymore, closing this bug.

Changed in ubuntu-kernel-tests:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.