Skip to content

Commit

Permalink
update(driver)!: replace PROBE_VERSION with DRIVER_VERSION
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Grasso <[email protected]>
  • Loading branch information
leogr authored and poiana committed Feb 4, 2022
1 parent 9f372d0 commit 60434ce
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if(ENABLE_DKMS)
${CMAKE_CURRENT_BINARY_DIR}/src/dkms.conf
${CMAKE_CURRENT_BINARY_DIR}/src/driver_config.h
${DRIVER_SOURCES}
DESTINATION "src/${DRIVER_PACKAGE_NAME}-${PROBE_VERSION}"
DESTINATION "src/${DRIVER_PACKAGE_NAME}-${DRIVER_VERSION}"
COMPONENT ${DRIVER_COMPONENT_NAME})

endif()
Expand Down
4 changes: 2 additions & 2 deletions driver/bpf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021 The Falco Authors.
# Copyright (C) 2022 The Falco Authors.
#
# This file is dual licensed under either the MIT or GPL 2. See
# MIT.txt or GPL.txt for full copies of the license.
Expand Down Expand Up @@ -29,5 +29,5 @@ install(FILES
quirks.h
ring_helpers.h
types.h
DESTINATION "src/${DRIVER_PACKAGE_NAME}-${PROBE_VERSION}/bpf"
DESTINATION "src/${DRIVER_PACKAGE_NAME}-${DRIVER_VERSION}/bpf"
COMPONENT ${DRIVER_COMPONENT_NAME})
2 changes: 1 addition & 1 deletion driver/bpf/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ char kernel_ver[] __bpf_section("kernel_version") = UTS_RELEASE;

char __license[] __bpf_section("license") = "GPL";

char probe_ver[] __bpf_section("probe_version") = PROBE_VERSION;
char probe_ver[] __bpf_section("probe_version") = DRIVER_VERSION;

char probe_commit[] __bpf_section("build_commit") = PROBE_COMMIT;

Expand Down
2 changes: 1 addition & 1 deletion driver/dkms.conf.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME="@DRIVER_PACKAGE_NAME@"
PACKAGE_VERSION="@PROBE_VERSION@"
PACKAGE_VERSION="@DRIVER_VERSION@"
BUILT_MODULE_NAME[0]="@DRIVER_NAME@"
DEST_MODULE_LOCATION[0]="/kernel/extra"
AUTOINSTALL="yes"
2 changes: 1 addition & 1 deletion driver/driver_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ or GPL2.txt for full copies of the license.

#include "ppm_api_version.h"

#define PROBE_VERSION "${PROBE_VERSION}"
#define DRIVER_VERSION "${DRIVER_VERSION}"

#define DRIVER_NAME "${DRIVER_NAME}"

Expand Down
6 changes: 3 additions & 3 deletions driver/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ static long ppm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
ret = 0;
goto cleanup_ioctl_nolock;
} else if (cmd == PPM_IOCTL_GET_PROBE_VERSION) {
if (copy_to_user((void *)arg, PROBE_VERSION, sizeof(PROBE_VERSION))) {
if (copy_to_user((void *)arg, DRIVER_VERSION, sizeof(DRIVER_VERSION))) {
ret = -EINVAL;
goto cleanup_ioctl_nolock;
}
Expand Down Expand Up @@ -2458,7 +2458,7 @@ int scap_init(void)
#else
struct class_device *device = NULL;
#endif
pr_info("driver loading, " DRIVER_NAME " " PROBE_VERSION "\n");
pr_info("driver loading, " DRIVER_NAME " " DRIVER_VERSION "\n");

ret = get_tracepoint_handles();
if (ret < 0)
Expand Down Expand Up @@ -2637,7 +2637,7 @@ void scap_exit(void)

module_init(scap_init);
module_exit(scap_exit);
MODULE_VERSION(PROBE_VERSION);
MODULE_VERSION(DRIVER_VERSION);
MODULE_INFO(build_commit, PROBE_COMMIT);
MODULE_INFO(api_version, PPM_API_CURRENT_VERSION_STRING);
MODULE_INFO(schema_version, PPM_SCHEMA_CURRENT_VERSION_STRING);
Expand Down
4 changes: 2 additions & 2 deletions userspace/libscap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(KBUILD_FLAGS "${FALCOSECURITY_LIBS_DEBUG_FLAGS}")
endif()

if(NOT DEFINED PROBE_VERSION)
set(PROBE_VERSION "${FALCOSECURITY_LIBS_VERSION}")
if(NOT DEFINED DRIVER_VERSION)
set(DRIVER_VERSION "${FALCOSECURITY_LIBS_VERSION}")
endif()

if(NOT DEFINED DRIVER_NAME)
Expand Down

0 comments on commit 60434ce

Please sign in to comment.