-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't workingkernelIssue found on Linux KernelIssue found on Linux Kernel
Description
When trying to create a livepatch for function ext4_reconfigure, file fs/ext4/super.c, on upstream, it generates the following code:
__attribute__((gnu_inline)) __attribute__((unused)) __attribute__((no_instrument_function)) static inline bool ext4_has_feature_metadata_csum(struct super_block *sb) {
return ((EXT4_SB(sb)->s_es->s_feature_ro_compat & ((__le32)(__u32)(1024))) != 0);
} The original code, a macro in this case, has the following code on file fs/ext4/ext4.h:
...
static inline bool ext4_has_feature_##name(struct super_block *sb) \
{ \
return ((EXT4_SB(sb)->s_es->s_feature_compat & \
cpu_to_le32(EXT4_FEATURE_COMPAT_##flagname)) != 0); \
} \
...For this livepatch specifically it should be good to import the code as it was written, instead of copying the preprocessed one. When a livepatch is generated for multiple architectures, resolving cpu_to_le32 is problematic, since it changes according the machine architecture it's being generated on.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingkernelIssue found on Linux KernelIssue found on Linux Kernel