Commit Graph

148 Commits (5bbe99188b71ccd9d9b2d0130857df50b6fd0600)

Author SHA1 Message Date
Lukas Sismis 214e47bea1 dpdk: move to native queue-sized mempools
As a legacy from Suricata 7, mempool size was kept even internally
as a global size. Since in Suricata 8, mempool allocation moved to
per queue model, it makes sense to calculate the correct size right
when loading the configuration.

The previous implementation misscalculated in some scenarios the size
of the mempool which prevented Suricata starting successfully.
This happened, e.g. when there were 32k RX descriptors and 64 TX descs.
The resulting mempool was incorrectly deduced as 32767 (2^n-1), which
didn't even hold all RX descriptors. Instead, it should result to 65535.

Ticket: 8370
3 months ago
Victor Julien 49b1382a8b qa: add nfq based firewall test with live reload 3 months ago
Victor Julien 7ac32910c9 qa: add rule reload step to firewall test
Additionally, use bsize, pcre and urilen.

Ticket: #8204.
Ticket: #8397.
3 months ago
Victor Julien 1c66eec656 qa: add script to test firewall bridge mode 3 months ago
Victor Julien 2658a366ad qa: move live tests into qa/live dir
They are not github specific.
4 months ago
Lukas Sismis d4434ef4e8 dpdk: add live run test suite
Add live tests to verify that mempool, mempool cache sizes, and
potentially other DPDK features are initialized correctly during the
startup.
Follows up on bugs found in mempool settings on real/bonded devices.

The tests are placed in the new folder qa/live/ after a comment
in https://github.com/OISF/suricata/pull/14896 which indicated other
live tests are going to be moved there as well.

Ticket: 8320
5 months ago
Philippe Antoine a2b5225612 rust: bindgen SCSigMatchAppendSMToList
Ticket: 7667
1 year ago
Jason Ish fc2824a9f7 qa: fix suricatasc path 1 year ago
Philippe Antoine 1854503465 qa: remove depcrecated files
lgtm has been superseded by codeql github action
docker and travis are obsolete

Preparatory work for ticket 2696 libhtp rust conversion
2 years ago
Victor Julien ea95aac022 github-actions: add unix socket runmode script and job
Runs with ASAN.
2 years ago
Jason Ish f7114b7fe3 cocci/run-check: log if parallel command is not found
If CONCURRENCY_LEVEL was set, the script would log a concurrency level
even if the parallel command was not available. Not log if parallel is
not available and set concurrency to 1.
2 years ago
Jeff Lucovsky ee6208be9d config/nss: Remove libnspr/libnss traces
Issue: 6712
2 years ago
Victor Julien c89ceaccf1 qa: spelling 3 years ago
Victor Julien 9520aac79c prscript: remove as it is obsolete 3 years ago
Victor Julien 34ee53e5ec cocci: remove action check as we no longer use macros 4 years ago
Lukas Sismis e101384e7b transversal: remove suricata-ids.org references 4 years ago
Victor Julien 353eb9086d cocci: fix python issues 4 years ago
Victor Julien 39cf5b151a src: includes cleanup
Work towards making `suricata-common.h` only introduce system headers
and other things that are independent of complex internal Suricata
data structures.

Update files to compile after this.

Remove special DPDK handling for strlcpy and strlcat, as this caused
many compilation failures w/o including DPDK headers for all files.

Remove packet macros from decode.h and move them into their own file,
turn them into functions and rename them to match our function naming
policy.
4 years ago
Victor Julien ad6bea5108 github-ci/codecov: add rust coverage support
Based on Rust 1.63 and LLVM 14. Update the jobs to meet those requirements.

Includes the bundled libhtp coverage now, including libhtp tests.

Ticket: #4278.
4 years ago
Jason Ish 54be743c48 prelude: remove the prelude output
It was broken in 6 and that didn't cause much issue. Just remove
it for 7.
5 years ago
Philippe Antoine 7ca4b13568 qa: use time on fuzz targets being run on corpus 5 years ago
Jeff Lucovsky 1eeb96696b general: Cleanup bool usage 5 years ago
Victor Julien 3ce05a3583 fuzz: run OSS-Fuzz corpus and track coverage 5 years ago
Victor Julien 80a3bbef3d qa/cocci: support FAIL macros in malloc check 6 years ago
Eric Leblond 48c30efd34 prscript: port to python 3 6 years ago
Zackeus Bengtsson 6887a2ab35 buildbot-pcaps: remove redundant sudo 6 years ago
jason taylor 143f08fa7a prscript: update copyright dates and FSF address
Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years ago
Shivani Bhardwaj db75675f45 qa: add atoi to list of banned functions 6 years ago
Philippe Antoine b0f6737c10 python: style for prscript
Remove unnecessary pass
Remove unused variable
6 years ago
Jason Ish bfe3c0105d wirefuzz: removed unified2 file removal 6 years ago
Philippe Antoine f5190da67e util: UTHmemsearch to use memmem if defined 7 years ago
Jason Ish 222a81f85d travis: remove cocci and macos builds
These tests are covered by Github actions and removing
them may speed up the Travis builds to get results sooner.

Its still worth keeping some of these builds as they test
more compile time options than the Github Actions currently
do.
7 years ago
Victor Julien 2b581fa836 qa/banned-functions: remove strndup now we have a fall back 7 years ago
Eric Leblond 18a1d93c58 qa/coccinelle: fix make distcheck
We need to use top_srcdir to know where the sources are. Relative
directory is not enough.
7 years ago
Eric Leblond 7a8ddf06de qa/coccinelle: flag check for setter and getter
WHen adding something like
/* coccinelle: AppLayerParserStateIssetFlag():4,2:APP_LAYER_PARSER_ */
the coccinelle check will consider that AppLayerParserStateIssetFlag
is taking 4 parameters and that the second one is a flag that needs
to be checked against APP_LAYER_PARSER_.
7 years ago
Eric Leblond 3ded7f1170 qa/coccinelle: fix false positive in setter getter
Coccinelle test was doing a false positive on the function
AppLayerParserStateSetFlag and AppLayerParserStateIssetFlag.
To address that, this patch adds a new coccinelle markup:

 /* coccinelle: AppLayerParserStateSetFlag():2,2:APP_LAYER_PARSER_ */

It indicates that AppLayerParserStateSetFlag is a setter and getter
and that the checks should be disabled inside the function.

Currently this markup is only used for that but following patch will
add some checks on option value.
7 years ago
Eric Leblond f745f0655b qa/coccinelle: port struct-flags.py to Python3 7 years ago
Eric Leblond b58d508bff qa/coccinelle: reformat struct-flags.py 7 years ago
Eric Leblond ba6b58a0da qa: generate struct-flags.cocci at each run 7 years ago
Victor Julien 5bfedf78fc posix: replace bzero with memset
bzero(3): The bzero() function is deprecated (marked as LEGACY in
POSIX.1-2001); use memset(3) in new programs.  POSIX.1-2008 removes
the specification of bzero().

Use memset instead.
7 years ago
Victor Julien 2da90a1cd8 posix: remove deprecated index/rindex calls
Replace index by strchr and rindex by strrchr.

index(3) states "POSIX.1-2008 removes the specifications of index() and
rindex(), recommending strchr(3) and strrchr(3) instead."

Add index/rindex to banned function check so they don't get reintroduced.

Bug #1443.
7 years ago
Victor Julien a5f1f19b27 travis: move checks into script
This makes error handling easier and more robust:
https://docs.travis-ci.com/user/job-lifecycle#complex-build-commands
7 years ago
Victor Julien da45d92c54 valgrind: support hyperscan warning
Issue on Ubuntu 19.04.

==18655== Conditional jump or move depends on uninitialised value(s)
==18655==    at 0x5454603: hs_alloc_scratch (in /usr/lib/x86_64-linux-gnu/libhs.so.5.1.0)
==18655==    by 0x3D5C9A: SCHSPreparePatterns (util-mpm-hs.c:707)
==18655==    by 0x215FEC: DetectMpmPrepareBuiltinMpms (detect-engine-mpm.c:364)
==18655==    by 0x20813A: SigGroupBuild (detect-engine-build.c:1932)
==18655==    by 0x21287B: SigLoadSignatures (detect-engine-loader.c:366)
==18655==    by 0x35A702: LoadSignatures (suricata.c:2419)
==18655==    by 0x35B0DD: PostConfLoadedDetectSetup (suricata.c:2574)
==18655==    by 0x35C827: main (suricata.c:2986)

https://github.com/intel/hyperscan/issues/148
7 years ago
Eric Leblond 2b72dfaf01 coccinelle: add missing tests to make dist 8 years ago
Jason Ish 4822387411 qa/coccinelle: allow to run from non git directory
For example, when I put the contents of a git worktree into
a Docker image for a test build .git will not be a directory
causing the run_check.sh script to fail.
8 years ago
Victor Julien de6fcb7c92 wirefuzz: add 'quiet' mode
Adds -q commandline option to force quiet operation.
8 years ago
Victor Julien 91f95ace22 qa: add more drmemory suppressions for hyperscan 9 years ago
Peter Manev 7d032e26f1 valgrind: suppressions for NIC offloading calls 9 years ago
Eric Leblond 7ee989a3ab prscript: update urls to use OISF repo 9 years ago
Eric Leblond 620f2540c6 prscript: update docker code
Update docker code to latest docker python API. This patch
preserves backwrd compatibility with older versions.
9 years ago