Comments (6)
Finally got a chance to look at this today - my latest system is kernel 4.15.6 which compiles without issue, so it's likely a change to the upstream between 4.15 and 4.16 that I need to account for. Will have to build out a new VM to start testing this. Thanks for the report.
from tpe-lkm.
Sorry, the modification should to be added in "fopskit.h" before this portion of code:
#define fopskit_hook_handler(val)
static void notrace fopskit_##val(unsigned long, unsigned long,
struct ftrace_ops *, struct pt_regs *);
static struct ftrace_ops fops_##val read_mostly = {
.func = fopskit##val,
.flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_IPMODIFY,
};
static void notrace fopskit##val(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *fops, struct pt_regs *regs)
from tpe-lkm.
Any news?
from tpe-lkm.
you should prob. add the following lines in fopskit.c
#ifndef FTRACE_OPS_FL_IPMODIFY
#define FTRACE_OPS_FL_IPMODIFY 0
#endif
from tpe-lkm.
you should prob. add the following lines in fopskit.c
#ifndef FTRACE_OPS_FL_IPMODIFY
#define FTRACE_OPS_FL_IPMODIFY 0
#endif
No luck
# make
make -C /usr/src/linux-headers-3.16.0-4-amd64 M=/root/tpe-lkm modules
make[1]: ingresso nella directory "/usr/src/linux-headers-3.16.0-4-amd64"
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CC [M] /root/tpe-lkm/fopskit.o
CC [M] /root/tpe-lkm/tpe_core.o
CC [M] /root/tpe-lkm/tpe_module.o
In file included from /root/tpe-lkm/tpe_module.c:3:0:
/root/tpe-lkm/fopskit.h:48:38: error: ‘FTRACE_OPS_FL_IPMODIFY’ undeclared here (not in a function)
.flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_IPMODIFY, \
^
/root/tpe-lkm/tpe_module.c:32:1: note: in expansion of macro ‘fopskit_hook_handler’
fopskit_hook_handler(security_mmap_file) {
^
I've modified the file according to your suggestion:
# head -n 4 fopskit.c
#include "fopskit.h"
#ifndef FTRACE_OPS_FL_IPMODIFY
#define FTRACE_OPS_FL_IPMODIFY 0
#endif
Thank you
from tpe-lkm.
@h-amine it worked like a charm! Now the module is built and loadable in the kernel.
When I load it I get this messages tho:
[39606818.901490] fopskit: fopskit_find_sym_addr() failed with return code -14 for fops_hook { name => selinux_enabled, addr => 0, found => 0, hooked => 0 } at fopskit_find_sym_addr() line 222 [39606818.907077] fopskit: fopskit_find_sym_addr() failed with return code -14 for fops_hook { name => selinux_disabled, addr => 0, found => 0, hooked => 0 } at fopskit_find_sym_addr() line 222 [39606818.907080] tpe: warning: cred->security was not remapped; the soften_mmap flag won't persist to child processes. [39606818.968566] tpe: added to kernel
Is another issue?
Thank you
from tpe-lkm.
Related Issues (20)
- Feature request - multiple values for trusted_gid HOT 6
- Possibility for 4.x kernels ? HOT 2
- extras disabled by softmode in 2.0 HOT 10
- Build failed on linux-4.11 HOT 3
- Unable to insert module, ftrace is not enabled HOT 13
- Compile failed with kernel 4.9 HOT 3
- In-tree build HOT 2
- [info] Attempt to upstream TPE HOT 13
- Random kernel panics on boot HOT 2
- Setting tpe.extras.hide_uname=1 doesn't work. HOT 3
- Lack of documentation on some TPE parameters HOT 2
- Can TPE work with Docker containers? HOT 2
- kernel: tpe: warning: cred->security was not remapped; the soften_mmap flag won't persist to child processes. HOT 1
- tpe.trusted_apps doesn't work HOT 1
- How to define trusted gid ? HOT 1
- #error "Arch not currently supported.
- user-space programs can not get the correct errno
- Harden_symlinks not available via package? HOT 1
- Project dead? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tpe-lkm.