test_120_smep_works from ubuntu_qrt_kernel_security fail on F-OEM-5.6

Bug #1880659 reported by Po-Hsu Lin
8
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

Issue found on Focal 5.6.0-1011-oem, this failure can only be reproduce on node kili, with reproduce rate 2 out of 2 attempts. Skipped on the other 2 nodes (rizzo and onibi)

  ======================================================================
  FAIL: test_120_smep_works (__main__.KernelSecurityTest)
  SMEP works
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "./test-kernel-security.py", line 1561, in test_120_smep_works
      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:
  make -C execuser
  make[1]: Entering directory '/home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/smep/execuser'
  make -C /usr/src/linux-headers-5.6.0-1011-oem M=$PWD modules
  make[2]: Entering directory '/usr/src/linux-headers-5.6.0-1011-oem'
    CC [M] /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/smep/execuser/execuser.o
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/smep/execuser/execuser.c: In function ‘execuser_init’:
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/smep/execuser/execuser.c:80:52: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     80 | PROC_CREATE(entry, "execuser_mapped", S_IRUGO, &execuser_fops_mapped);
        | ^~~~~~~~~~~~~~~~~~~~~
        | |
        | const struct file_operations *
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/smep/execuser/execuser.c:64:43: note: in definition of macro ‘PROC_CREATE’
     64 | 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/smep/execuser/execuser.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/smep/execuser/execuser.c:86:54: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     86 | PROC_CREATE(entry, "execuser_unmapped", S_IRUGO, &execuser_fops_unmapped);
        | ^~~~~~~~~~~~~~~~~~~~~~~
        | |
        | const struct file_operations *
  /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/smep/execuser/execuser.c:64:43: note: in definition of macro ‘PROC_CREATE’
     64 | 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/smep/execuser/execuser.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/smep/execuser/execuser.o] Error 1
  make[2]: *** [Makefile:1703: /home/ubuntu/autotest/client/tmp/ubuntu_qrt_kernel_security/src/qa-regression-testing/scripts/kernel-security/smep/execuser] Error 2
  make[2]: Leaving directory '/usr/src/linux-headers-5.6.0-1011-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/smep/execuser'
  make: *** [Makefile:4: all] Error 2

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.6.0-1011-oem 5.6.0-1011.11
ProcVersionSignature: User Name 5.6.0-1011.11-oem 5.6.14
Uname: Linux 5.6.0-1011-oem x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue May 26 07:41:19 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: 5.6 oem sru-20200518 ubuntu-qrt-kernel-security
Po-Hsu Lin (cypressyew)
tags: added: kqa-blocker
Revision history for this message
Steve Beattie (sbeattie) wrote :

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.

I've fixed this in QRT with some compatibility definitions in https://git.launchpad.net/qa-regression-testing/commit/?id=f815e50b3ffd0cacdca98dee62d324ff1488bcb3

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

Passed with F-oem-5.6 now. Closing this bug now.

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.