GithubHelp home page GithubHelp logo

vdm-maintainer-group / vdm-capability-library Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 705 KB

VDM Capability Library with System-related Best Practice.

License: GNU General Public License v3.0

CMake 1.12% C 22.09% Makefile 0.87% Assembly 0.85% Nix 0.23% Rust 32.47% Python 28.73% C++ 3.02% HTML 1.25% JavaScript 7.48% Shell 1.88%
capability vdm

vdm-capability-library's People

Contributors

iamhyc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

iamhyc

vdm-capability-library's Issues

crash on __change_page_attr_set_clr

Hi, I found this really cool project to dump the list of watched inodes by process. I was looking specifically to get the the following counters.

inotify Watches 
iinotify Instances

I know I can get them by /proc/390608/fdinfo/7 and looking for

inotify wd:1 ino:1e00028 sdev:fd00002 mask:fce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:2800e00143e90e11

But this is a really expensive operation and it is polling one.

I saw this project and I thought it may help to get them directly from the kernel.

Unfortunately the module crashed:

[  +0.000017] CPU: 4 PID: 393896 Comm: insmod Tainted: G           OE      6.3.8-200.fc38.x86_64 #1
[  +0.000006] Hardware name: LENOVO 21CB000FUS/21CB000FUS, BIOS N3AET72W (1.37 ) 03/02/2023
[  +0.000002] RIP: 0010:__change_page_attr_set_clr+0xfd6/0x1140
[  +0.000008] Code: 24 18 49 89 e9 48 89 c2 4c 89 fe 48 c7 c7 d8 13 8d b3 48 89 44 24 08 4c 8d 81 ff 0f 00 00 c6 05 46 dc 22 02 01 e8 ea db 06 00 <0f> 0b 48 8b 44 24 08 e9 3c fc ff ff 48 09 d1 80 3d 2c dc 22 02 00
[  +0.000004] RSP: 0018:ffffb88d8a363b48 EFLAGS: 00010282
[  +0.000003] RAX: 0000000000000000 RBX: 0000000101a4a163 RCX: 0000000000000027
[  +0.000004] RDX: ffff93603f521548 RSI: 0000000000000001 RDI: ffff93603f521540
[  +0.000002] RBP: 0000000000101a4a R08: 0000000000000000 R09: ffffb88d8a3639d8
[  +0.000002] R10: 0000000000000003 R11: ffffffffb4146108 R12: 0000000000000001
[  +0.000002] R13: 8000000101a4a163 R14: 0000000000000001 R15: 8000000000000163
[  +0.000002] FS:  00007efc6c028740(0000) GS:ffff93603f500000(0000) knlGS:0000000000000000
[  +0.000003] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.000003] CR2: 000055c23c4d1af0 CR3: 000000017e7fe000 CR4: 0000000000750ee0
[  +0.000002] PKRU: 55555554
[  +0.000002] Call Trace:
[  +0.000004]  <TASK>
[  +0.000003]  ? __change_page_attr_set_clr+0xfd6/0x1140
[  +0.000006]  ? __warn+0x81/0x130
[  +0.000013]  ? __change_page_attr_set_clr+0xfd6/0x1140
[  +0.000006]  ? report_bug+0x171/0x1a0
[  +0.000010]  ? prb_read_valid+0x1b/0x30
[  +0.000007]  ? handle_bug+0x3c/0x80
[  +0.000006]  ? exc_invalid_op+0x17/0x70
[  +0.000005]  ? asm_exc_invalid_op+0x1a/0x20
[  +0.000012]  ? __change_page_attr_set_clr+0xfd6/0x1140
[  +0.000006]  ? __change_page_attr_set_clr+0xfd6/0x1140
[  +0.000007]  ? purge_fragmented_blocks_allcpus+0x5a/0x230
[  +0.000009]  ? _vm_unmap_aliases.part.0+0xf4/0x130
[  +0.000005]  change_page_attr_set_clr+0x104/0x1a0
[  +0.000008]  ? __pfx_module_alloc+0x10/0x10
[  +0.000006]  set_memory_x+0x3b/0x50
[  +0.000009]  khook_init+0xd0/0x170 [inotify_hook]
[  +0.000016]  ? __pfx_init_module+0x10/0x10 [inotify_hook]
[  +0.000013]  inotify_hook_init+0x2a/0xff0 [inotify_hook]
[  +0.000011]  ? __pfx_init_module+0x10/0x10 [inotify_hook]
[  +0.000011]  do_one_initcall+0x5a/0x240
[  +0.000009]  do_init_module+0x4a/0x210
[  +0.000007]  __do_sys_finit_module+0xac/0x120
[  +0.000006]  do_syscall_64+0x5d/0x90
[  +0.000006]  ? ksys_mmap_pgoff+0xec/0x1f0
[  +0.000008]  ? syscall_exit_to_user_mode+0x1b/0x40
[  +0.000006]  ? do_syscall_64+0x6c/0x90
[  +0.000003]  ? exc_page_fault+0x7c/0x180
[  +0.000005]  entry_SYSCALL_64_after_hwframe+0x72/0xdc

Kernel version 6.3.8-200.fc38.x86_64

I'm still doing investigations but I just wanted to share this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.