Skip to content

openbsd: pledge before allowing threads to continue#14826

Closed
victorjulien wants to merge 1 commit intoOISF:mainfrom
victorjulien:pledge/v1
Closed

openbsd: pledge before allowing threads to continue#14826
victorjulien wants to merge 1 commit intoOISF:mainfrom
victorjulien:pledge/v1

Conversation

@victorjulien
Copy link
Copy Markdown
Member

Avoids a race condition with pcap file directory mode.

Ticket: #8300.

https://redmine.openinfosecfoundation.org/issues/8300

@eroullit are you able to review this? Thanks!

Avoids a race condition with pcap file directory mode.

Ticket: OISF#8300.
@suricata-qa
Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 29635

@catenacyber
Copy link
Copy Markdown
Contributor

How do we test this ? Is this openbsd only ?

@victorjulien
Copy link
Copy Markdown
Member Author

How do we test this ? Is this openbsd only ?

Yes it is OpenBSD only. I've tested in my VMs, but minimally.

Comment thread src/suricata.c
SC_ATOMIC_SET(engine_stage, SURICATA_RUNTIME);
PacketPoolPostRunmodes();

/* pledge before allowing threads to continue to avoid an issue with pcap file direction mode,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/direction/directory/ ?

@catenacyber
Copy link
Copy Markdown
Contributor

Code looks good (besides comment typo)...

Should we have an openbsd CI build ?

@victorjulien
Copy link
Copy Markdown
Member Author

Code looks good (besides comment typo)...

Should we have an openbsd CI build ?

Not easy in github-ci I think, but if there is a way I'd be interested.

@catenacyber
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

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

Seems OK. Not sure I 100% understand why moving pledge earlier works though.

Fix typo, I think its a critical one.

@victorjulien
Copy link
Copy Markdown
Member Author

#14951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants