Code Monkey home page Code Monkey logo

Comments (6)

drakenclimber avatar drakenclimber commented on June 11, 2024 1

I think I have an aarch64 box; I'll hack around with it this morning and see if I can uncover anything

from libseccomp.

pcmoore avatar pcmoore commented on June 11, 2024

Unless we can resolve this rather quickly, I think we may need to revert commit 1852fe3 in the release-2.5 branch simply so the various packagers don't see a bunch of test failures when preparing distro packages from a release branch.

Thoughts @drakenclimber?

from libseccomp.

drakenclimber avatar drakenclimber commented on June 11, 2024

Test 29 seems to have been problematic from its inception. I went back to the commit 51c46f8 that initially added it, and the PFC looks to be incorrect from day 1.

$ ./tests/29-sim-pseudo_syscall
#
# pseudo filter code start
#
# filter for arch x86 (1073741827)
if ($arch == 1073741827)
  # default action
  action ALLOW;
# invalid architecture action
action KILL;
#
# pseudo filter code end
#

Stating the obvious here - these rule lines have never been added to the filter in any incarnation of libseccomp:

	rc = seccomp_rule_add(ctx, SCMP_ACT_KILL, SCMP_SYS(sysmips), 0);
	if (rc < 0)
		goto out;
	rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, SCMP_SYS(sysmips), 0);
	if (rc == 0)
		goto out;
	/* -10001 == 4294957295 (unsigned) */
	rc = seccomp_rule_add_exact(ctx, SCMP_ACT_KILL, -11001, 0);
	if (rc == 0)
		goto out;

Commit 1852fe3 broke the PFC generation and resulted in no PFC being generated at all. I did a little hacking, and it looks like the lookup of -10001 in the gperf code mapped to arch_prctl() (syscall 384 on x86). When the test was using -11001, it was translated to sysmips() which is a PNR on x86.

from libseccomp.

drakenclimber avatar drakenclimber commented on June 11, 2024

Based on the above findings, I think the safest and most prudent solution is:

  • Revert commit 1852fe3 in the release-2.5 branch
  • Use this issue to track the underlying problem with test 29
  • Adopt @pcmoore's pull request #407 to update the syscall table
  • Release v2.5.5

from libseccomp.

drakenclimber avatar drakenclimber commented on June 11, 2024

Reverted in the release-2.5 branch in commit 970c2b4. Since the test has been effectively broken since its inception, I've changed the milestone on this to v2.6.0. There seems to be significant issues with the test, and I doubt we will cherry-pick then into the release-2.5 branch

from libseccomp.

xry111 avatar xry111 commented on June 11, 2024

On LoongArch 64-bit the same failures happen too.

from libseccomp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.