Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Lichtso
Copy link
Collaborator

@Lichtso Lichtso commented Aug 20, 2025

No description provided.

@Lichtso Lichtso force-pushed the cleanup/sbpf_version_0x20 branch from 49479e3 to a1ae297 Compare August 20, 2025 12:59
@Lichtso Lichtso marked this pull request as ready for review September 26, 2025 16:24
@Lichtso Lichtso requested a review from LucasSte September 26, 2025 16:32
src/elf.rs Outdated

/// Validates the ELF
pub fn validate(config: &Config, elf: &Elf64, elf_bytes: &[u8]) -> Result<(), ElfError> {
pub fn validate(_config: &Config, elf: &Elf64, elf_bytes: &[u8]) -> Result<(), ElfError> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about removing the unused parameter?

src/elf.rs Outdated
}
refd_addr
} else {
let refd_addr = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the brackets here?

@Lichtso Lichtso force-pushed the cleanup/sbpf_version_0x20 branch from a1ae297 to ec9fd17 Compare September 29, 2025 16:11
@Lichtso Lichtso requested a review from LucasSte September 29, 2025 16:11
src/elf.rs Outdated
Comment on lines 960 to 961

if text_section
.file_range()
.unwrap_or_default()
.contains(&r_offset)
|| sbpf_version == SBPFVersion::V0
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the new scope here is necessary. Removing it improves readability. I'm approving the PR, since this shouldn't be a blocker.

@Lichtso Lichtso merged commit 8b7ff06 into main Sep 30, 2025
11 checks passed
@Lichtso Lichtso deleted the cleanup/sbpf_version_0x20 branch September 30, 2025 15:33
}
let entry_pc = if let Some(entry_pc) = (offset as usize).checked_div(ebpf::INSN_SIZE) {
if !sbpf_version.static_syscalls() {
function_registry.unregister_function(ebpf::hash_symbol_name(b"entrypoint"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, why was this removed? It introduces an unexpected behavioral change when entrypoint is registered multiple times with different PCs. Now, we error out with symbol hash collision, whereas before we would have unregistered.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#94

Lichtso added a commit that referenced this pull request Nov 6, 2025
Lichtso added a commit that referenced this pull request Nov 7, 2025
Lichtso added a commit that referenced this pull request Nov 7, 2025
cmoyes-jump pushed a commit to firedancer-io/sbpf that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants