falcosecurity / driverkit

Kit for building Falco drivers: kernel modules or eBPF probes
Apache License 2.0
64 stars 53 forks source link

new: glibc 2.38 builder #316

Closed FedeDP closed 7 months ago

FedeDP commented 9 months ago

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area build /area pkg

What this PR does / why we need it:

This PR introduces a new fedora based any builder to be able to build recent kernels (6.6+) that require glibc 2.38.

Which issue(s) this PR fixes:

Fixes #303

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

new: added a new glibc 2.38 gcc 13 based builder image.
FedeDP commented 9 months ago

I was able to successfully build a kernel module for 6.6.5 arch kernel (that #303 complained we weren't able to build):

level=DEBUG msg="+ modinfo /tmp/driver/module.ko"
level=DEBUG msg="filename:       /tmp/driver/module.ko"
level=DEBUG msg="schema_version: 2.14.0"
level=DEBUG msg="api_version:    8.0.1"
level=DEBUG msg="build_commit:   master"
level=DEBUG msg="version:        master"
level=DEBUG msg="author:         the Falco authors"
level=DEBUG msg="license:        Dual MIT/GPL"
level=DEBUG msg="srcversion:     B7CD20CDABA5D0C1C1FB08F"
level=DEBUG msg="depends:        "
level=DEBUG msg="retpoline:      Y"
level=DEBUG msg="name:           falco"
level=DEBUG msg="vermagic:       6.6.5-arch1-1 SMP preempt mod_unload "
level=DEBUG msg="parm:           g_buffer_bytes_dim:This is the dimension of a single per-CPU buffer in bytes. Please note: this buffer will be mapped twice in the process virtual memory, so pay attention to its size."
level=DEBUG msg="parm:           max_consumers:Maximum number of consumers that can simultaneously open the devices (uint)"
level=DEBUG msg="parm:           verbose:Enable verbose logging (bool)"
level=DEBUG msg="log pipe close"
level=INFO msg="kernel module available" path=/tmp/mod.ko

I built the new builder image for x86_64 and pushed it to my own dockerhub repository; then:

./_output/bin/driverkit docker --target arch --kernelrelease 6.6.5.arch1-1 --output-module /tmp/mod.ko --loglevel debug --builderimage auto:latest --builderrepo docker.io/fededp/driverkit-builder
FedeDP commented 9 months ago

/cc @EXONER4TED @dwindsor

FedeDP commented 9 months ago

/hold for eventual discussion.

poiana commented 7 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EXONER4TED, FedeDP

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/falcosecurity/driverkit/blob/master/OWNERS)~~ [EXONER4TED,FedeDP] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
FedeDP commented 7 months ago

/unhold