Repository: falcosecurity/driverkit
Pull request #107 (2021-11-03 13:50:51)

new(driverkit): allow configuring the module driver and device name
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines in the [CONTRIBUTING.md](https://github.com/falcosecurity/.github/CONTRIBUTING.md) file.
2. Please label this pull request according to what type of issue you are addressing.
3. Please add a release note!
4. If the PR is unfinished while opening it specify a wip in the title before the actual title, for example, "wip: my awesome feature"
-->

**What type of PR is this?**

> Uncomment one (or more) `/kind <>` lines:

> /kind bug

> /kind cleanup

> /kind design

> /kind documentation

> /kind failing-test

/kind feature

<!--
Please remove the leading whitespace before the `/kind <>` you uncommented.
-->

**Any specific area of the project related to this PR?**

> Uncomment one (or more) `/area <>` lines:

/area build

/area cmd

/area pkg

> /area docs

> /area tests


**What this PR does / why we need it**:

The falco libs client might require a kernel module name which is not called `falco` / `falco`, depending on the client. Allow these two options to be passed as command line flags via `--moduledrivername` and `--moduledevicename`

**Which issue(s) this PR fixes**:

<!--
Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
If PR is `kind/failing-tests` or `kind/flaky-test`, please post the related issues/tests in a comment and do not use `Fixes`.
-->

Fixes #

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change?**:

<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below.
If the PR requires additional action from users switching to the new release, prepend the string "action required:".
For example, `action required: change the API interface of the rule engine`.
-->

```release-note
new(driverkit): add --moduledrivername and --moduledevicename to change the name of the built kernel module.
```


poiana: Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

:memo: **Please follow instructions in the [contributing guide](https://github.com/falcosecurity/driverkit/blob/master/CONTRIBUTING.md) to update your commits with the DCO**

Full details of the Developer Certificate of Origin can be found at [developercertificate.org](https://developercertificate.org/).

**The list of commits missing DCO signoff**:

- [4e74790](https://github.com/falcosecurity/driverkit/commits/4e747906e52eef419308e38d425277a788739db1) add moduledevicename and moduledrivername options

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>

poiana: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/falcosecurity/driverkit/pull/107#" title="Author self-approved">LucaGuerra</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **leodido** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @leodido` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://prow.falco.org/command-help?repo=falcosecurity%2Fdriverkit).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/falcosecurity/driverkit/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["leodido"]} -->
poiana: Welcome @LucaGuerra! It looks like this is your first PR to falcosecurity/driverkit 🎉
LucaGuerra: Thanks a lot for the review @leodido ! Good catch on the readme, I added a commit for the readme.
poiana: LGTM label has been added.  <details>Git tree hash: 50872ce613f3d1fa91086b05b8267cfaddea0979</details>

Patch:
diff --git a/README.md b/README.md
index 23b56e6..cbc0635 100644
--- a/README.md
+++ b/README.md
@@ -56,6 +56,11 @@ Now run driverkit using the configuration file:
 driverkit docker -c ubuntu-aws.yaml
 ```
 
+### Configure the kernel module name
+
+It is possible to customize the kernel module name that is produced by Driverkit with the `moduledevicename` and `moduledrivername` options.
+In this context, the _device name_ is the prefix used for the devices in `/dev/`, while the _driver name_ is the kernel module name as reported by `modinfo` or `lsmod` once the module is loaded.
+
 ## Supported targets
 
 ### ubuntu-generic
diff --git a/cmd/root.go b/cmd/root.go
index 1fa83e1..268aee2 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -115,6 +115,8 @@ func NewRootCmd() *RootCmd {
 	flags.StringVar(&rootOpts.KernelRelease, "kernelrelease", rootOpts.KernelRelease, "kernel release to build the module for, it can be found by executing 'uname -v'")
 	flags.StringVarP(&rootOpts.Target, "target", "t", rootOpts.Target, "the system to target the build for")
 	flags.StringVar(&rootOpts.KernelConfigData, "kernelconfigdata", rootOpts.KernelConfigData, "base64 encoded kernel config data: in some systems it can be found under the /boot directory, in other it is gzip compressed under /proc")
+	flags.StringVar(&rootOpts.ModuleDeviceName, "moduledevicename", rootOpts.ModuleDeviceName, "kernel module device name (the default is falco, so the device will be under /dev/falco*)")
+	flags.StringVar(&rootOpts.ModuleDriverName, "moduledrivername", rootOpts.ModuleDriverName, "kernel module driver name, i.e. the name you see when you check installed modules via lsmod")
 	viper.BindPFlags(flags)
 
 	// Flag annotations and custom completions
diff --git a/cmd/root_options.go b/cmd/root_options.go
index 677e14e..2076550 100644
--- a/cmd/root_options.go
+++ b/cmd/root_options.go
@@ -21,6 +21,8 @@ type RootOptions struct {
 	Architecture     string `default:"x86_64" validate:"required,oneof=x86_64" name:"architecture"`
 	DriverVersion    string `default:"dev" validate:"eq=dev|sha1|semver" name:"driver version"`
 	KernelVersion    uint16 `default:"1" validate:"omitempty,number" name:"kernel version"`
+	ModuleDriverName string `default:"falco" validate:"max=60" name:"kernel module driver name"`
+	ModuleDeviceName string `default:"falco" validate:"excludes=/,max=255" name:"kernel module device name"`
 	KernelRelease    string `validate:"required,ascii" name:"kernel release"`
 	Target           string `validate:"required,target" name:"target"`
 	KernelConfigData string `validate:"omitempty,base64" name:"kernel config data"` // fixme > tag "name" does not seem to work when used at struct level, but works when used at inner level
@@ -97,6 +99,8 @@ func (ro *RootOptions) toBuild() *builder.Build {
 		KernelConfigData: kernelConfigData,
 		ModuleFilePath:   ro.Output.Module,
 		ProbeFilePath:    ro.Output.Probe,
+		ModuleDriverName: ro.ModuleDriverName,
+		ModuleDeviceName: ro.ModuleDeviceName,
 	}
 }
 
diff --git a/pkg/driverbuilder/builder/amazonlinux.go b/pkg/driverbuilder/builder/amazonlinux.go
index c7d199a..185cba8 100644
--- a/pkg/driverbuilder/builder/amazonlinux.go
+++ b/pkg/driverbuilder/builder/amazonlinux.go
@@ -69,8 +69,9 @@ mv usr/src/kernels/*/* /tmp/kernel
 # Build the kernel module
 cd {{ .DriverBuildDir }}
 make KERNELDIR=/tmp/kernel
+mv {{ .ModuleDriverName }}.ko {{ .ModuleFullPath }}
 # Print results
-modinfo falco.ko
+modinfo {{ .ModuleFullPath }}
 {{ end }}
 
 {{ if .BuildProbe }}
@@ -85,6 +86,8 @@ type amazonlinuxTemplateData struct {
 	DriverBuildDir     string
 	ModuleDownloadURL  string
 	KernelDownloadURLs []string
+	ModuleDriverName   string
+	ModuleFullPath     string
 	BuildModule        bool
 	BuildProbe         bool
 }
@@ -125,6 +128,8 @@ func script(c Config, targetType Type) (string, error) {
 		DriverBuildDir:     DriverDirectory,
 		ModuleDownloadURL:  moduleDownloadURL(c),
 		KernelDownloadURLs: urls,
+		ModuleDriverName:   c.DriverName,
+		ModuleFullPath:     ModuleFullPath,
 		BuildModule:        len(c.Build.ModuleFilePath) > 0,
 		BuildProbe:         len(c.Build.ProbeFilePath) > 0,
 	}
diff --git a/pkg/driverbuilder/builder/build.go b/pkg/driverbuilder/builder/build.go
index 4a75530..7332860 100644
--- a/pkg/driverbuilder/builder/build.go
+++ b/pkg/driverbuilder/builder/build.go
@@ -10,4 +10,6 @@ type Build struct {
 	Architecture     string
 	ModuleFilePath   string
 	ProbeFilePath    string
+	ModuleDriverName string
+	ModuleDeviceName string
 }
diff --git a/pkg/driverbuilder/builder/builders.go b/pkg/driverbuilder/builder/builders.go
index 37fdcce..b4c4c87 100644
--- a/pkg/driverbuilder/builder/builders.go
+++ b/pkg/driverbuilder/builder/builders.go
@@ -12,16 +12,16 @@ import (
 const DriverDirectory = "/tmp/driver"
 
 // ModuleFileName is the standard file name for the kernel module.
-const ModuleFileName = "falco.ko"
+const ModuleFileName = "module.ko"
 
 // ProbeFileName is the standard file name for the eBPF probe.
 const ProbeFileName = "probe.o"
 
-// FalcoModuleFullPath is the standard path for the kernel module.
-var FalcoModuleFullPath = path.Join(DriverDirectory, ModuleFileName)
+// ModuleFullPath is the standard path for the kernel module. Builders must place the compiled module at this location.
+var ModuleFullPath = path.Join(DriverDirectory, ModuleFileName)
 
-// FalcoProbeFullPath is the standard path for the eBPF probe.
-var FalcoProbeFullPath = path.Join(DriverDirectory, "bpf", ProbeFileName)
+// ProbeFullPath is the standard path for the eBPF probe. Builders must place the compiled probe at this location.
+var ProbeFullPath = path.Join(DriverDirectory, "bpf", ProbeFileName)
 
 // Config contains all the configurations needed to build the kernel module or the eBPF probe.
 type Config struct {
diff --git a/pkg/driverbuilder/builder/centos.go b/pkg/driverbuilder/builder/centos.go
index ccc2e18..905471f 100644
--- a/pkg/driverbuilder/builder/centos.go
+++ b/pkg/driverbuilder/builder/centos.go
@@ -40,6 +40,8 @@ func (c centos) Script(cfg Config) (string, error) {
 		ModuleDownloadURL: moduleDownloadURL(cfg),
 		KernelDownloadURL: urls[0],
 		GCCVersion:        centosGccVersionFromKernelRelease(kr),
+		ModuleDriverName:  cfg.DriverName,
+		ModuleFullPath:    ModuleFullPath,
 		BuildModule:       len(cfg.Build.ModuleFilePath) > 0,
 		BuildProbe:        len(cfg.Build.ProbeFilePath) > 0,
 	}
@@ -145,6 +147,8 @@ type centosTemplateData struct {
 	ModuleDownloadURL string
 	KernelDownloadURL string
 	GCCVersion        string
+	ModuleDriverName  string
+	ModuleFullPath    string
 	BuildModule       bool
 	BuildProbe        bool
 }
@@ -177,11 +181,13 @@ mv usr/src/kernels/*/* /tmp/kernel
 ln -sf /usr/bin/gcc-{{ .GCCVersion }} /usr/bin/gcc
 
 {{ if .BuildModule }}
-# Build the kernel module
+# Build the module
 cd {{ .DriverBuildDir }}
 make KERNELDIR=/tmp/kernel
+mv {{ .ModuleDriverName }}.ko {{ .ModuleFullPath }}
+strip -g {{ .ModuleFullPath }}
 # Print results
-modinfo falco.ko
+modinfo {{ .ModuleFullPath }}
 {{ end }}
 
 {{ if .BuildProbe }}
diff --git a/pkg/driverbuilder/builder/debian.go b/pkg/driverbuilder/builder/debian.go
index 307fff9..2d74c32 100644
--- a/pkg/driverbuilder/builder/debian.go
+++ b/pkg/driverbuilder/builder/debian.go
@@ -51,6 +51,8 @@ func (v debian) Script(c Config) (string, error) {
 		ModuleDownloadURL:  fmt.Sprintf("%s/%s.tar.gz", c.DownloadBaseURL, c.Build.DriverVersion),
 		KernelDownloadURLS: urls,
 		KernelLocalVersion: kr.FullExtraversion,
+		ModuleDriverName:   c.DriverName,
+		ModuleFullPath:     ModuleFullPath,
 		BuildModule:        len(c.Build.ModuleFilePath) > 0,
 		BuildProbe:         len(c.Build.ProbeFilePath) > 0,
 	}
@@ -83,6 +85,8 @@ type debianTemplateData struct {
 	ModuleDownloadURL  string
 	KernelDownloadURLS []string
 	KernelLocalVersion string
+	ModuleDriverName   string
+	ModuleFullPath     string
 	BuildModule        bool
 	BuildProbe         bool
 }
@@ -126,9 +130,10 @@ ls -la $sourcedir
 # Build the module
 cd {{ .DriverBuildDir }}
 make CC=/usr/bin/gcc-8 KERNELDIR=$sourcedir
-strip -g falco.ko
+mv {{ .ModuleDriverName }}.ko {{ .ModuleFullPath }}
+strip -g {{ .ModuleFullPath }}
 # Print results
-modinfo falco.ko
+modinfo {{ .ModuleFullPath }}
 {{ end }}
 
 {{ if .BuildProbe }}
diff --git a/pkg/driverbuilder/builder/ubuntu.go b/pkg/driverbuilder/builder/ubuntu.go
index 601c89b..b41baf3 100644
--- a/pkg/driverbuilder/builder/ubuntu.go
+++ b/pkg/driverbuilder/builder/ubuntu.go
@@ -48,6 +48,8 @@ func (v ubuntuGeneric) Script(c Config) (string, error) {
 		KernelDownloadURLS:   urls,
 		KernelLocalVersion:   kr.FullExtraversion,
 		KernelHeadersPattern: "linux-headers*generic",
+		ModuleDriverName:     c.Build.ModuleDriverName,
+		ModuleFullPath:       ModuleFullPath,
 		BuildModule:          len(c.Build.ModuleFilePath) > 0,
 		BuildProbe:           len(c.Build.ProbeFilePath) > 0,
 		GCCVersion:           ubuntuGCCVersionFromKernelRelease(kr),
@@ -90,6 +92,8 @@ func (v ubuntuAWS) Script(c Config) (string, error) {
 		KernelDownloadURLS:   urls,
 		KernelLocalVersion:   kr.FullExtraversion,
 		KernelHeadersPattern: "linux-headers*",
+		ModuleDriverName:     c.Build.ModuleDriverName,
+		ModuleFullPath:       ModuleFullPath,
 		BuildModule:          len(c.Build.ModuleFilePath) > 0,
 		BuildProbe:           len(c.Build.ProbeFilePath) > 0,
 		GCCVersion:           ubuntuGCCVersionFromKernelRelease(kr),
@@ -285,6 +289,8 @@ type ubuntuTemplateData struct {
 	KernelDownloadURLS   []string
 	KernelLocalVersion   string
 	KernelHeadersPattern string
+	ModuleDriverName     string
+	ModuleFullPath       string
 	BuildProbe           bool
 	BuildModule          bool
 	GCCVersion           string
@@ -327,9 +333,10 @@ ln -sf /usr/bin/gcc-{{ .GCCVersion }} /usr/bin/gcc
 # Build the module
 cd {{ .DriverBuildDir }}
 make KERNELDIR=$sourcedir
-strip -g falco.ko
+mv {{ .ModuleDriverName }}.ko {{ .ModuleFullPath }}
+strip -g {{ .ModuleFullPath }}
 # Print results
-modinfo falco.ko
+modinfo {{ .ModuleFullPath }}
 {{ end }}
 
 {{ if .BuildProbe }}
diff --git a/pkg/driverbuilder/builder/vanilla.go b/pkg/driverbuilder/builder/vanilla.go
index 370e737..e8bd6d1 100644
--- a/pkg/driverbuilder/builder/vanilla.go
+++ b/pkg/driverbuilder/builder/vanilla.go
@@ -58,8 +58,10 @@ make KCONFIG_CONFIG=/tmp/kernel.config modules_prepare
 # Build the kernel module
 cd {{ .DriverBuildDir }}
 make KERNELDIR=/tmp/kernel
+mv {{ .ModuleDriverName }}.ko {{ .ModuleFullPath }}
+strip -g {{ .ModuleFullPath }}
 # Print results
-modinfo falco.ko
+modinfo {{ .ModuleFullPath }}
 {{ end }}
 
 {{ if .BuildProbe }}
@@ -75,6 +77,8 @@ type vanillaTemplateData struct {
 	ModuleDownloadURL  string
 	KernelDownloadURL  string
 	KernelLocalVersion string
+	ModuleDriverName   string
+	ModuleFullPath     string
 	BuildModule        bool
 	BuildProbe         bool
 }
@@ -100,6 +104,8 @@ func (v vanilla) Script(c Config) (string, error) {
 		ModuleDownloadURL:  moduleDownloadURL(c),
 		KernelDownloadURL:  urls[0],
 		KernelLocalVersion: kv.FullExtraversion,
+		ModuleDriverName:   c.DriverName,
+		ModuleFullPath:     ModuleFullPath,
 		BuildModule:        len(c.Build.ModuleFilePath) > 0,
 		BuildProbe:         len(c.Build.ProbeFilePath) > 0,
 	}
diff --git a/pkg/driverbuilder/docker.go b/pkg/driverbuilder/docker.go
index 499edac..822e81f 100644
--- a/pkg/driverbuilder/docker.go
+++ b/pkg/driverbuilder/docker.go
@@ -60,14 +60,14 @@ func (bp *DockerBuildProcessor) Start(b *builder.Build) error {
 		return err
 	}
 	c := builder.Config{
-		DriverName:      "falco",
-		DeviceName:      "falco",
+		DriverName:      b.ModuleDriverName,
+		DeviceName:      b.ModuleDeviceName,
 		DownloadBaseURL: "https://github.com/falcosecurity/libs/archive",
 		Build:           b,
 	}
 
 	// Generate the build script from the builder
-	res, err := v.Script(c)
+	driverkitScript, err := v.Script(c)
 	if err != nil {
 		return err
 	}
@@ -142,7 +142,7 @@ func (bp *DockerBuildProcessor) Start(b *builder.Build) error {
 	}
 
 	files := []dockerCopyFile{
-		{"/driverkit/driverkit.sh", res},
+		{"/driverkit/driverkit.sh", driverkitScript},
 		{"/driverkit/kernel.config", string(configDecoded)},
 		{"/driverkit/module-Makefile", bufMakefile.String()},
 		{"/driverkit/module-driver-config.h", bufDriverConfig.String()},
@@ -197,14 +197,14 @@ func (bp *DockerBuildProcessor) Start(b *builder.Build) error {
 	forwardLogs(hr.Reader)
 
 	if len(b.ModuleFilePath) > 0 {
-		if err := copyFromContainer(ctx, cli, cdata.ID, builder.FalcoModuleFullPath, b.ModuleFilePath); err != nil {
+		if err := copyFromContainer(ctx, cli, cdata.ID, builder.ModuleFullPath, b.ModuleFilePath); err != nil {
 			return err
 		}
 		logrus.WithField("path", b.ModuleFilePath).Info("kernel module available")
 	}
 
 	if len(b.ProbeFilePath) > 0 {
-		if err := copyFromContainer(ctx, cli, cdata.ID, builder.FalcoProbeFullPath, b.ProbeFilePath); err != nil {
+		if err := copyFromContainer(ctx, cli, cdata.ID, builder.ProbeFullPath, b.ProbeFilePath); err != nil {
 			return err
 		}
 		logrus.WithField("path", b.ProbeFilePath).Info("eBPF probe available")
diff --git a/pkg/driverbuilder/kubernetes.go b/pkg/driverbuilder/kubernetes.go
index 718701e..7797cbd 100644
--- a/pkg/driverbuilder/kubernetes.go
+++ b/pkg/driverbuilder/kubernetes.go
@@ -68,15 +68,15 @@ func (bp *KubernetesBuildProcessor) buildModule(build *builder.Build) error {
 	podClient := bp.coreV1Client.Pods(namespace)
 	configClient := bp.coreV1Client.ConfigMaps(namespace)
 
-	// create a builder based on the choosen build type
+	// create a builder based on the chosen build type
 	v, err := builder.Factory(build.TargetType)
 	if err != nil {
 		return err
 	}
 
 	c := builder.Config{
-		DriverName:      "falco",                                         // TODO: make this configurable
-		DeviceName:      "falco",                                         // TODO: make this configurable
+		DriverName:      build.ModuleDriverName,
+		DeviceName:      build.ModuleDeviceName,
 		DownloadBaseURL: "https://github.com/falcosecurity/libs/archive", // TODO: make this configurable
 		Build:           build,
 	}
diff --git a/pkg/driverbuilder/templates.go b/pkg/driverbuilder/templates.go
index 67792f7..03cefe8 100644
--- a/pkg/driverbuilder/templates.go
+++ b/pkg/driverbuilder/templates.go
@@ -10,7 +10,7 @@ import (
 var waitForModuleScript = `
 touch /tmp/module-download.lock
 while true; do
-  if [ ! -f ` + builder.FalcoModuleFullPath + ` ]; then
+  if [ ! -f ` + builder.ModuleFullPath + ` ]; then
     echo "Falco module not found - waiting for 10 seconds"
 	sleep 10
 	continue
@@ -30,13 +30,13 @@ done
 // the download file itself because it goes trough stdout
 var waitForModuleAndCat = `
 while true; do
-  if [ ! -f ` + builder.FalcoModuleFullPath + ` ]; then
+  if [ ! -f ` + builder.ModuleFullPath + ` ]; then
 	sleep 10 1>&/dev/null
 	continue
   fi
   break
 done
-cat ` + builder.FalcoModuleFullPath + `
+cat ` + builder.ModuleFullPath + `
 rm /tmp/module-download.lock 1>&/dev/null
 `
 


Test patch:
diff --git a/cmd/testdata/autohelp.txt b/cmd/testdata/autohelp.txt
index 244f7a1..8302ecd 100644
--- a/cmd/testdata/autohelp.txt
+++ b/cmd/testdata/autohelp.txt
@@ -20,6 +20,8 @@ Flags:
       --kernelrelease string      kernel release to build the module for, it can be found by executing 'uname -v'
       --kernelversion uint16      kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default 1)
   -l, --loglevel string           log level (default "info")
+      --moduledevicename string   kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco")
+      --moduledrivername string   kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco")
       --output-module string      filepath where to save the resulting kernel module
       --output-probe string       filepath where to save the resulting eBPF probe
       --proxy string              the proxy to use to download data
diff --git a/cmd/testdata/dockernoopts.txt b/cmd/testdata/dockernoopts.txt
index 2b58975..b6e0cba 100644
--- a/cmd/testdata/dockernoopts.txt
+++ b/cmd/testdata/dockernoopts.txt
@@ -15,6 +15,8 @@ Flags:
       --kernelrelease string      kernel release to build the module for, it can be found by executing 'uname -v'
       --kernelversion uint16      kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default 1)
   -l, --loglevel string           log level (default "info")
+      --moduledevicename string   kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco")
+      --moduledrivername string   kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco")
       --output-module string      filepath where to save the resulting kernel module
       --output-probe string       filepath where to save the resulting eBPF probe
       --proxy string              the proxy to use to download data
diff --git a/cmd/testdata/help-flag.txt b/cmd/testdata/help-flag.txt
index d058ff1..45e08c0 100644
--- a/cmd/testdata/help-flag.txt
+++ b/cmd/testdata/help-flag.txt
@@ -19,6 +19,8 @@ Flags:
       --kernelrelease string      kernel release to build the module for, it can be found by executing 'uname -v'
       --kernelversion uint16      kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default 1)
   -l, --loglevel string           log level (default "info")
+      --moduledevicename string   kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco")
+      --moduledrivername string   kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco")
       --output-module string      filepath where to save the resulting kernel module
       --output-probe string       filepath where to save the resulting eBPF probe
       --proxy string              the proxy to use to download data
diff --git a/cmd/testdata/help.txt b/cmd/testdata/help.txt
index 73c7c27..c587a6c 100644
--- a/cmd/testdata/help.txt
+++ b/cmd/testdata/help.txt
@@ -19,6 +19,8 @@ Flags:
       --kernelrelease string      kernel release to build the module for, it can be found by executing 'uname -v'
       --kernelversion uint16      kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default 1)
   -l, --loglevel string           log level (default "info")
+      --moduledevicename string   kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco")
+      --moduledrivername string   kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco")
       --output-module string      filepath where to save the resulting kernel module
       --output-probe string       filepath where to save the resulting eBPF probe
       --proxy string              the proxy to use to download data
diff --git a/cmd/testdata/invalid-proxyconfig.txt b/cmd/testdata/invalid-proxyconfig.txt
index f34a57c..da3934a 100644
--- a/cmd/testdata/invalid-proxyconfig.txt
+++ b/cmd/testdata/invalid-proxyconfig.txt
@@ -19,6 +19,8 @@ Flags:
       --kernelrelease string      kernel release to build the module for, it can be found by executing 'uname -v'
       --kernelversion uint16      kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default 1)
   -l, --loglevel string           log level (default "info")
+      --moduledevicename string   kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco")
+      --moduledrivername string   kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco")
       --output-module string      filepath where to save the resulting kernel module
       --output-probe string       filepath where to save the resulting eBPF probe
       --proxy string              the proxy to use to download data
diff --git a/cmd/testdata/non-existent-processor.txt b/cmd/testdata/non-existent-processor.txt
index 658622d..367e203 100644
--- a/cmd/testdata/non-existent-processor.txt
+++ b/cmd/testdata/non-existent-processor.txt
@@ -18,6 +18,8 @@ Flags:
       --kernelrelease string      kernel release to build the module for, it can be found by executing 'uname -v'
       --kernelversion uint16      kernel version to build the module for, it's the numeric value after the hash when you execute 'uname -v' (default 1)
   -l, --loglevel string           log level (default "info")
+      --moduledevicename string   kernel module device name (the default is falco, so the device will be under /dev/falco*) (default "falco")
+      --moduledrivername string   kernel module driver name, i.e. the name you see when you check installed modules via lsmod (default "falco")
       --output-module string      filepath where to save the resulting kernel module
       --output-probe string       filepath where to save the resulting eBPF probe
       --proxy string              the proxy to use to download data