[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
src
/
file_protector-1.1-1589
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 common
SET
[ DEL ]
📁 ftrace_hooks
SET
[ DEL ]
📁 lsm_hooks
SET
[ DEL ]
📁 network
SET
[ DEL ]
📁 syscall_hooks
SET
[ DEL ]
📁 transport
SET
[ DEL ]
📄 Kbuild
12,105 B
SET
[ EDIT ]
|
[ DEL ]
📄 Makefile
2,282 B
SET
[ EDIT ]
|
[ DEL ]
📄 compat.c
8,625 B
SET
[ EDIT ]
|
[ DEL ]
📄 compat.h
12,265 B
SET
[ EDIT ]
|
[ DEL ]
📄 debug.h
3,649 B
SET
[ EDIT ]
|
[ DEL ]
📄 dkms.conf
146 B
SET
[ EDIT ]
|
[ DEL ]
📄 exited_tasks.c
12,321 B
SET
[ EDIT ]
|
[ DEL ]
📄 exited_tasks.h
867 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts.c
61,880 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts.h
6,360 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_contexts_priv.h
5,615 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_handle_tools.h
2,590 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_key_tools.h
938 B
SET
[ EDIT ]
|
[ DEL ]
📄 file_path_tools.h
2,140 B
SET
[ EDIT ]
|
[ DEL ]
📄 hash_fast.c
3,249 B
SET
[ EDIT ]
|
[ DEL ]
📄 hash_fast.h
669 B
SET
[ EDIT ]
|
[ DEL ]
📄 hashtable_compat.h
2,809 B
SET
[ EDIT ]
|
[ DEL ]
📄 hook_trampoline_common.h
4,395 B
SET
[ EDIT ]
|
[ DEL ]
📄 interval_tree.h
779 B
SET
[ EDIT ]
|
[ DEL ]
📄 memory.c
3,393 B
SET
[ EDIT ]
|
[ DEL ]
📄 memory.h
3,059 B
SET
[ EDIT ]
|
[ DEL ]
📄 module.c
3,600 B
SET
[ EDIT ]
|
[ DEL ]
📄 module_ref.h
421 B
SET
[ EDIT ]
|
[ DEL ]
📄 module_rundown_protection.c
3,731 B
SET
[ EDIT ]
|
[ DEL ]
📄 module_rundown_protection.h
743 B
SET
[ EDIT ]
|
[ DEL ]
📄 path_tools.h
7,534 B
SET
[ EDIT ]
|
[ DEL ]
📄 procfs_manager.c
8,790 B
SET
[ EDIT ]
|
[ DEL ]
📄 procfs_manager.h
784 B
SET
[ EDIT ]
|
[ DEL ]
📄 rundown_protection.c
4,301 B
SET
[ EDIT ]
|
[ DEL ]
📄 rundown_protection.h
2,899 B
SET
[ EDIT ]
|
[ DEL ]
📄 safe_kobject.h
1,315 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_common.h
4,856 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_properties.h
858 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_properties_x.h
21,202 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_value_types.h
515 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_fp_value_types_x.h
1,279 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_size.h
4,364 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_templates.h
3,066 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_writer.h
7,826 B
SET
[ EDIT ]
|
[ DEL ]
📄 si_writer_common.h
13,825 B
SET
[ EDIT ]
|
[ DEL ]
📄 stringify.h
261 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_info_map.c
17,506 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_info_map.h
6,481 B
SET
[ EDIT ]
|
[ DEL ]
📄 task_tools.h
1,370 B
SET
[ EDIT ]
|
[ DEL ]
📄 tracepoints.c
3,668 B
SET
[ EDIT ]
|
[ DEL ]
📄 tracepoints.h
299 B
SET
[ EDIT ]
|
[ DEL ]
📄 write_protection.h
2,257 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: si_size.h
/** @file SiSizes.cpp @brief Sizes estimation and calculation @details Copyright (c) 2019 Acronis International GmbH @author Denis Kopyrin (Denis.Kopyrin@acronis.com) @since $Id: $ */ #pragma once #include "compat.h" #include "si_fp_properties.h" static inline int roundUp(int numToRound, int multiple) { return (numToRound + multiple - 1) & -multiple; } static const uint8_t k_fp_si_property_to_type[] = { #define SI_FP_PROP(prop, propPub, vt, type, name) vt, #define SI_FP_PROP_SIZED(...) SI_FP_PROP(__VA_ARGS__) #define SI_FP_PROP_HANDLE(...) SI_FP_PROP(__VA_ARGS__) #include "si_fp_properties_x.h" #undef SI_FP_PROP_HANDLE #undef SI_FP_PROP_SIZED #undef SI_FP_PROP }; static inline fp_si_property_value_type_t fp_si_property_id_to_fp_value_type(fp_si_property_id_t id) { #ifdef KERNEL_MOCK _Static_assert(sizeof(k_fp_si_property_to_type) / sizeof(*k_fp_si_property_to_type) == FP_SI_PI_MAX_PROPERTY_ID, "k_fp_si_property_to_type size mismatch"); #endif return (fp_si_property_value_type_t) k_fp_si_property_to_type[id]; } // From fp_si_property_id_t to SiPropertyId static const uint16_t k_fp_si_property_type_to_public_type[] = { #define SI_FP_PROP(prop, propPub, vt, type, name) propPub, #define SI_FP_PROP_SIZED(...) SI_FP_PROP(__VA_ARGS__) #define SI_FP_PROP_HANDLE(...) SI_FP_PROP(__VA_ARGS__) #include "si_fp_properties_x.h" #undef SI_FP_PROP_HANDLE #undef SI_FP_PROP_SIZED #undef SI_FP_PROP }; static inline SiPropertyId fp_si_property_id_to_public_type(fp_si_property_id_t id) { #ifdef KERNEL_MOCK _Static_assert(sizeof(k_fp_si_property_type_to_public_type) / sizeof(*k_fp_si_property_type_to_public_type) == FP_SI_PI_MAX_PROPERTY_ID, "k_fp_si_property_type_to_public_type size mismatch"); #endif return (SiPropertyId) k_fp_si_property_type_to_public_type[id]; } // Means that by default varsized fields do not add anything // It is expected that user will provide the proper size #define SI_LEN_VARSIZE 0 // From fp_si_property_value_type_t to size static const uint32_t k_fp_si_value_type_to_size[] = { #define SI_FP_VALUE(type, typePub, sz) sz, #include "si_fp_value_types_x.h" #undef SI_FP_VALUE }; static inline uint32_t fp_si_property_value_type_to_size(fp_si_property_value_type_t type) { #ifdef KERNEL_MOCK _Static_assert(sizeof(k_fp_si_value_type_to_size) / sizeof(*k_fp_si_value_type_to_size) == FP_SI_VT_MAX_PROPERTY_VALUE_TYPE, "k_fp_si_value_type_to_size size mismatch"); #endif return k_fp_si_value_type_to_size[type]; } // From fp_si_property_value_type_t to SiPropertyValueType static const uint8_t k_fp_si_value_type_to_public_type[] = { #define SI_FP_VALUE(type, typePub, sz) typePub, #include "si_fp_value_types_x.h" #undef SI_FP_VALUE }; static inline SiPropertyValueType fp_si_property_value_type_to_public_type(fp_si_property_value_type_t type) { #ifdef KERNEL_MOCK _Static_assert(sizeof(k_fp_si_value_type_to_public_type) / sizeof(*k_fp_si_value_type_to_public_type) == FP_SI_VT_MAX_PROPERTY_VALUE_TYPE, "k_fp_si_value_type_to_public_type size mismatch"); #endif return (SiPropertyValueType) k_fp_si_value_type_to_public_type[type]; } static inline bool si_property_value_type_wants_vector_wrap(SiPropertyValueType type) { return type == SI_VT_BYTE_ARRAY_TYPE || type == SI_VT_UTF8_STRING_TYPE; } static inline uint32_t si_estimate_property_size(fp_si_property_id_t prop_id) { fp_si_property_value_type_t value_type = fp_si_property_id_to_fp_value_type(prop_id); SiPropertyValueType value_type_pub = fp_si_property_value_type_to_public_type(value_type); size_t size = fp_si_property_value_type_to_size(value_type); // Any varsized data is stored inside SiVector, reserve space for that if (si_property_value_type_wants_vector_wrap(value_type_pub)) size += sizeof(SiVector); return size + sizeof(SiProperty); } // I am not sure compiler is going to be able to inline this but I can only hope it can static inline uint32_t si_estimate_size(const uint8_t* params, size_t paramsNumber) { uint32_t est = 0; size_t i; for (i = 0; i < paramsNumber; i++) { est += si_estimate_property_size(params[i]); } return roundUp(est, 8); } #define SI_FN_TMPL_CALCULATE_SIZE(prop) __est += si_estimate_property_size(prop); #define SI_ESTIMATE_TMPL_SIZE(params) ({ uint32_t __est = 0; params(SI_FN_TMPL_CALCULATE_SIZE); __est = roundUp(__est, 8); __est; })