-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Falco to build on aarch64 #1442
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a710e93
build: moonjit replacement for luajit
fntlnz 6a9fdfc
build: use fields_info from libsinsp
fntlnz 416b457
update: bump sinsp and scap to fntlnz-aarch64
fntlnz d597967
update: syscall table zero definition for arm64
fntlnz efac824
build: switch Falco back to luajit
fntlnz 0f1f8b8
update: cpack specify architecture for debian packages
fntlnz 55cc404
build: bump gRPC to 1.32.0
fntlnz cdb82dd
build: update sinsp, scap and the drivers to c4f096099bf81966803d26c4…
fntlnz faced09
build: cmake modules fixes and split
fntlnz 066e67f
fix(userspace/falco): include directories and sources
fntlnz 5e03ffb
build: bump sinsp, scap and the drivers to 5c0b863ddade7a45568c0ac97d…
fntlnz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copyright (C) 2020 The Falco Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
set(B64_SRC "${PROJECT_BINARY_DIR}/b64-prefix/src/b64") | ||
message(STATUS "Using bundled b64 in '${B64_SRC}'") | ||
set(B64_INCLUDE "${B64_SRC}/include") | ||
set(B64_LIB "${B64_SRC}/src/libb64.a") | ||
externalproject_add( | ||
b64 | ||
URL "https://github.com/libb64/libb64/archive/ce864b17ea0e24a91e77c7dd3eb2d1ac4175b3f0.tar.gz" | ||
URL_HASH "SHA256=d07173e66f435e5c77dbf81bd9313f8d0e4a3b4edd4105a62f4f8132ba932811" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${B64_LIB} | ||
INSTALL_COMMAND "" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (C) 2020 The Falco Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
set(LPEG_SRC "${PROJECT_BINARY_DIR}/lpeg-prefix/src/lpeg") | ||
set(LPEG_LIB "${PROJECT_BINARY_DIR}/lpeg-prefix/src/lpeg/build/lpeg.a") | ||
message(STATUS "Using bundled lpeg in '${LPEG_SRC}'") | ||
set(LPEG_DEPENDENCIES "") | ||
list(APPEND LPEG_DEPENDENCIES "luajit") | ||
ExternalProject_Add( | ||
lpeg | ||
DEPENDS ${LPEG_DEPENDENCIES} | ||
URL "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz" | ||
URL_HASH "SHA256=48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe" | ||
BUILD_COMMAND LUA_INCLUDE=${LUAJIT_INCLUDE} "${PROJECT_SOURCE_DIR}/scripts/build-lpeg.sh" "${LPEG_SRC}/build" | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${LPEG_LIB} | ||
CONFIGURE_COMMAND "" | ||
INSTALL_COMMAND "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Copyright (C) 2020 The Falco Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
set(LUAJIT_SRC "${PROJECT_BINARY_DIR}/luajit-prefix/src/luajit/src") | ||
message(STATUS "Using bundled LuaJIT in '${LUAJIT_SRC}'") | ||
set(LUAJIT_INCLUDE "${LUAJIT_SRC}") | ||
set(LUAJIT_LIB "${LUAJIT_SRC}/libluajit.a") | ||
externalproject_add( | ||
luajit | ||
GIT_REPOSITORY "https://github.com/LuaJIT/LuaJIT" | ||
GIT_TAG "1d8b747c161db457e032a023ebbff511f5de5ec2" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${LUAJIT_LIB} | ||
INSTALL_COMMAND "" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (C) 2020 The Falco Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
set(LYAML_SRC "${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml/ext/yaml") | ||
set(LYAML_LIB "${LYAML_SRC}/.libs/yaml.a") | ||
message(STATUS "Using bundled lyaml in '${LYAML_SRC}'") | ||
externalproject_add( | ||
lyaml | ||
DEPENDS luajit libyaml | ||
URL "https://github.com/gvvaughan/lyaml/archive/release-v6.0.tar.gz" | ||
URL_HASH "SHA256=9d7cf74d776999ff6f758c569d5202ff5da1f303c6f4229d3b41f71cd3a3e7a7" | ||
BUILD_COMMAND ${CMD_MAKE} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_BYPRODUCTS ${LYAML_LIB} | ||
CONFIGURE_COMMAND ./configure --enable-static CFLAGS=-I${LIBYAML_INSTALL_DIR}/include CPPFLAGS=-I${LIBYAML_INSTALL_DIR}/include LDFLAGS=-L${LIBYAML_INSTALL_DIR}/lib LIBS=-lyaml LUA=${LUAJIT_SRC}/luajit LUA_INCLUDE=-I${LUAJIT_INCLUDE} | ||
INSTALL_COMMAND sh -c | ||
"cp -R ${PROJECT_BINARY_DIR}/lyaml-prefix/src/lyaml/lib/* ${PROJECT_SOURCE_DIR}/userspace/engine/lua" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
diff --git a/userspace/libsinsp/chisel.cpp b/userspace/libsinsp/chisel.cpp | ||
index 0a6e3cf8..0c2e255a 100644 | ||
--- a/userspace/libsinsp/chisel.cpp | ||
+++ b/userspace/libsinsp/chisel.cpp | ||
@@ -98,7 +98,7 @@ void lua_stackdump(lua_State *L) | ||
// Lua callbacks | ||
/////////////////////////////////////////////////////////////////////////////// | ||
#ifdef HAS_LUA_CHISELS | ||
-const static struct luaL_reg ll_sysdig [] = | ||
+const static struct luaL_Reg ll_sysdig [] = | ||
{ | ||
{"set_filter", &lua_cbacks::set_global_filter}, | ||
{"set_snaplen", &lua_cbacks::set_snaplen}, | ||
@@ -134,7 +134,7 @@ const static struct luaL_reg ll_sysdig [] = | ||
{NULL,NULL} | ||
}; | ||
|
||
-const static struct luaL_reg ll_chisel [] = | ||
+const static struct luaL_Reg ll_chisel [] = | ||
{ | ||
{"request_field", &lua_cbacks::request_field}, | ||
{"set_filter", &lua_cbacks::set_filter}, | ||
@@ -146,7 +146,7 @@ const static struct luaL_reg ll_chisel [] = | ||
{NULL,NULL} | ||
}; | ||
|
||
-const static struct luaL_reg ll_evt [] = | ||
+const static struct luaL_Reg ll_evt [] = | ||
{ | ||
{"field", &lua_cbacks::field}, | ||
{"get_num", &lua_cbacks::get_num}, | ||
diff --git a/userspace/libsinsp/lua_parser.cpp b/userspace/libsinsp/lua_parser.cpp | ||
index 0e26617d..78810d96 100644 | ||
--- a/userspace/libsinsp/lua_parser.cpp | ||
+++ b/userspace/libsinsp/lua_parser.cpp | ||
@@ -32,7 +32,7 @@ extern "C" { | ||
#include "lauxlib.h" | ||
} | ||
|
||
-const static struct luaL_reg ll_filter [] = | ||
+const static struct luaL_Reg ll_filter [] = | ||
{ | ||
{"rel_expr", &lua_parser_cbacks::rel_expr}, | ||
{"bool_op", &lua_parser_cbacks::bool_op}, | ||
diff --git a/userspace/libsinsp/lua_parser_api.cpp b/userspace/libsinsp/lua_parser_api.cpp | ||
index c89e9126..c3d8008a 100644 | ||
--- a/userspace/libsinsp/lua_parser_api.cpp | ||
+++ b/userspace/libsinsp/lua_parser_api.cpp | ||
@@ -266,7 +266,7 @@ int lua_parser_cbacks::rel_expr(lua_State *ls) | ||
string err = "Got non-table as in-expression operand\n"; | ||
throw sinsp_exception("parser API error"); | ||
} | ||
- int n = luaL_getn(ls, 4); /* get size of table */ | ||
+ int n = lua_objlen (ls, 4); /* get size of table */ | ||
for (i=1; i<=n; i++) | ||
{ | ||
lua_rawgeti(ls, 4, i); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 finally!