]>
git.ipfire.org Git - thirdparty/tor.git/log
Nick Mathewson [Wed, 9 Oct 2019 16:55:37 +0000 (12:55 -0400)]
smartlist.h: use COCCI to hide SMARTLIST_FOREACH_JOIN from Coccinelle
Nick Mathewson [Wed, 9 Oct 2019 16:54:23 +0000 (12:54 -0400)]
namemap_st.h: Use COCCI to hide an initializer.
Nick Mathewson [Wed, 9 Oct 2019 16:51:56 +0000 (12:51 -0400)]
timeval.h: Coccinelle cannot understand timercmp.
Nick Mathewson [Wed, 9 Oct 2019 16:50:08 +0000 (12:50 -0400)]
Fix a macro in address.c so coccinelle can understand it
Nick Mathewson [Wed, 9 Oct 2019 16:48:56 +0000 (12:48 -0400)]
timers.c: define TIMEOUT_PUBLIC to no tokens when using COCCI.
Nick Mathewson [Wed, 9 Oct 2019 16:47:21 +0000 (12:47 -0400)]
dispatch_naming.c: when COCCI is defined, disable unparseable macros.
Nick Mathewson [Wed, 9 Oct 2019 16:42:09 +0000 (12:42 -0400)]
conftesting.h: when COCCI is defined, disable unhandled macros
Nick Mathewson [Wed, 9 Oct 2019 16:39:31 +0000 (12:39 -0400)]
confmacros.h: fix coccinelle parsing.
Nick Mathewson [Wed, 9 Oct 2019 16:36:47 +0000 (12:36 -0400)]
feature/control: wrap some problem macros in COCCI
Nick Mathewson [Wed, 9 Oct 2019 15:14:28 +0000 (11:14 -0400)]
tor-coccinelle.h: add a definition for EXTERN
Nick Mathewson [Wed, 9 Oct 2019 15:12:41 +0000 (11:12 -0400)]
consdiff disable a macro when running with COCCI
Nick Mathewson [Wed, 9 Oct 2019 15:10:08 +0000 (11:10 -0400)]
Disable a couple of iterator macros when COCCI is defined.
Nick Mathewson [Wed, 9 Oct 2019 15:07:18 +0000 (11:07 -0400)]
Use various COCCI tests to get mainloop.c to parse.
Nick Mathewson [Wed, 9 Oct 2019 14:58:03 +0000 (10:58 -0400)]
test: Hide some test-declaration macro definitions to COCCI.
(These ones cause parsing failures.)
Nick Mathewson [Wed, 9 Oct 2019 14:54:11 +0000 (10:54 -0400)]
tor-coccinelle.h: add HANDLE_{DECL,IMPL}
Nick Mathewson [Wed, 9 Oct 2019 14:49:47 +0000 (10:49 -0400)]
tor-coccinelle.h: add EAT_SEMICOLON
Nick Mathewson [Wed, 9 Oct 2019 14:47:05 +0000 (10:47 -0400)]
Apparently coccinelle can't handle multiline #errors.
Nick Mathewson [Tue, 22 Oct 2019 13:28:35 +0000 (09:28 -0400)]
COCCI: Disable some buffers.c macros that coccinelle can't handle.
Nick Mathewson [Wed, 9 Oct 2019 14:38:22 +0000 (10:38 -0400)]
tor-coccinelle.h: add CHECK_SCANF
Nick Mathewson [Wed, 9 Oct 2019 14:34:43 +0000 (10:34 -0400)]
With COCCI defined, avoid PERIODIC_EVENT.
Coccinelle doesn't understand the particular pattern of token
pasting we have going on here.
Nick Mathewson [Tue, 22 Oct 2019 13:31:31 +0000 (09:31 -0400)]
COCCI: disable DOWLOAD_SCHEDULE macro
Nick Mathewson [Wed, 9 Oct 2019 14:21:15 +0000 (10:21 -0400)]
tor-coccinelle.h: add MOCK_DECL
Nick Mathewson [Wed, 9 Oct 2019 14:19:58 +0000 (10:19 -0400)]
tor-coccinelle.h: handle SLIST and LIST.
Nick Mathewson [Wed, 9 Oct 2019 14:16:08 +0000 (10:16 -0400)]
With coccinelle, avoid includes in the middle of an expression.
Nick Mathewson [Wed, 9 Oct 2019 14:07:50 +0000 (10:07 -0400)]
Add a "COCCI" macro that we tell coccinelle is always defined.
This will let us give specific in-file equivalents to given macros
or preprocessor directives, to make things parse.
Nick Mathewson [Wed, 9 Oct 2019 14:01:19 +0000 (10:01 -0400)]
tor-coccinelle.h: handle NS and NS_DECL.
Nick Mathewson [Wed, 9 Oct 2019 13:58:42 +0000 (09:58 -0400)]
tor-coccinelle: handle SIMPLEQ and TAILQ better.
Nick Mathewson [Wed, 9 Oct 2019 13:52:05 +0000 (09:52 -0400)]
tor-coccinelle.h: Add {EN,DIS}ABLE_GCC_WARNING.
Nick Mathewson [Wed, 9 Oct 2019 13:38:43 +0000 (09:38 -0400)]
tor-coccinelle: expect parentheses after HT_INITIALIZER
Nick Mathewson [Wed, 9 Oct 2019 13:37:21 +0000 (09:37 -0400)]
Use #warning instead of #warn: one is C and one isn't.
Nick Mathewson [Wed, 9 Oct 2019 13:31:10 +0000 (09:31 -0400)]
try_parse.sh: add a verbose mode and a meaningful exit code.
Nick Mathewson [Wed, 9 Oct 2019 13:27:48 +0000 (09:27 -0400)]
document test-operator-cleanup
Nick Mathewson [Wed, 9 Oct 2019 13:23:49 +0000 (09:23 -0400)]
Document tor-coccinelle.h
Nick Mathewson [Wed, 11 Sep 2019 22:50:43 +0000 (18:50 -0400)]
Changes file for coccinelle scripts
Nick Mathewson [Wed, 11 Sep 2019 22:47:19 +0000 (18:47 -0400)]
Run test_operator_cleanup on our unit tests
Coccinelle doesn't understand it when we use "==" and "!=" and so on as
arguments to macros. To solve this, we prefer OP_EQ, OP_NE, and so
on.
This commit is automatically generated by running
./scripts/coccinelle/test_operator_cleanup over all of the source
code in src.
Nick Mathewson [Wed, 11 Sep 2019 22:45:52 +0000 (18:45 -0400)]
Add some more of our trickier macros to tor-coccinelle.h
Note that this header file behaves a bit strangely. It is used by
coccinelle just for the purpose of knowing how to parse
difficult-to-parse stuff. It doesn't need to produce good C -- just
grammatical C.
Nick Mathewson [Wed, 11 Sep 2019 22:44:10 +0000 (18:44 -0400)]
Add a script to tell whether a file can be perfectly parsed by spatch
spatch can let us know whether a file has parsed "perfectly" or
not. The more perfect it parses, the likelier any semantic patches
are to apply. I've used this script to identify problem areas in
our code.
Nick Mathewson [Wed, 11 Sep 2019 22:43:16 +0000 (18:43 -0400)]
Add a script to run spatch with appropriate arguments
It's a bit tricky to remember the right incantation to get the
proper include paths and incantations for coccinelle, but without
it, coccinelle is less effective at parsing our C.
David Goulet [Wed, 11 Sep 2019 13:42:31 +0000 (09:42 -0400)]
Merge branch 'tor-github/pr/1296'
Nick Mathewson [Tue, 10 Sep 2019 14:29:34 +0000 (10:29 -0400)]
Document inconsistent usage of config_var_is_listable()
See also ticket 31654.
Nick Mathewson [Tue, 10 Sep 2019 13:51:07 +0000 (09:51 -0400)]
Extract common list of flags to use for obsolete variables.
Nick Mathewson [Tue, 10 Sep 2019 13:39:09 +0000 (09:39 -0400)]
Clarify documentation on config_var_is_listable()
Here we make it clear we're only looking at listable variable names,
not at whether the variables themselves are gettable.
Also, remove an extraneous h.
(This commit is not a fixup, because of rebase conflicts.)
Nick Mathewson [Thu, 5 Sep 2019 18:19:10 +0000 (14:19 -0400)]
Add test_cmdline.sh to distribution.
Nick Mathewson [Thu, 5 Sep 2019 16:54:09 +0000 (12:54 -0400)]
integration test for --list-torrc-options
(This option tests our existing behavior, not necessarily the most
sensible behavior.)
Nick Mathewson [Thu, 5 Sep 2019 16:29:24 +0000 (12:29 -0400)]
Test: Make sure NOLIST options are not listed.
Nick Mathewson [Thu, 5 Sep 2019 15:48:54 +0000 (11:48 -0400)]
Changes file for 31625 (config flag refactor)
Nick Mathewson [Thu, 5 Sep 2019 15:48:52 +0000 (11:48 -0400)]
Revise documentation on CFLG_* flags
Nick Mathewson [Thu, 5 Sep 2019 15:48:50 +0000 (11:48 -0400)]
Remove all CVFLAG_* usage.
Nick Mathewson [Thu, 5 Sep 2019 15:48:48 +0000 (11:48 -0400)]
Remove all VTFLAG_* usage.
Nick Mathewson [Thu, 5 Sep 2019 15:48:46 +0000 (11:48 -0400)]
confparse, conftypes: Replace flags with their new names.
The old names remain as #defines that cause variables to get one or
more flags.
Now every flag-testing function in confparse.c tests exactly one flag.
Nick Mathewson [Thu, 5 Sep 2019 15:48:44 +0000 (11:48 -0400)]
Replace low-level {var_type,struct_var}_is_*() with flag inspection
Since the flags are now stored with compatible numbering, we can
just OR them together and see whether the flag we want is in the
result.
(Net code removal!)
Nick Mathewson [Thu, 5 Sep 2019 15:48:42 +0000 (11:48 -0400)]
Re-number VTFLAG_* values so they don't conflict with CVFLAG_*
Nick Mathewson [Thu, 5 Sep 2019 15:48:40 +0000 (11:48 -0400)]
Move VTFLAG_* declarations to conftypes.h
Nick Mathewson [Thu, 5 Sep 2019 15:48:38 +0000 (11:48 -0400)]
typed_var: Make flags into an unsigned OR of bits.
Using a bitfield here will enable us to unify the var_type_def_t flags
with the config_var_t flags.
(This commit does not yet do that unification, and does not yet
rename or refactor any flags. It only changes booleans into bits.)
Nick Mathewson [Thu, 5 Sep 2019 15:48:36 +0000 (11:48 -0400)]
struct_var: refactor struct_var_is*() functions to delegate
Previously they checked the individual flags inside var_type_def_t;
now they call the appropriate var_type_is_*() functions.
(These functions will be removed entirely by the end of this branch.)
Nick Mathewson [Thu, 5 Sep 2019 15:48:34 +0000 (11:48 -0400)]
config: make config_var_is_dumpable static.
Nick Mathewson [Thu, 5 Sep 2019 15:48:32 +0000 (11:48 -0400)]
config: rename "contained" to "derived", and explain it better.
Don't use "derived" directly, but check its implications for listing
and copying.
Nick Mathewson [Thu, 5 Sep 2019 15:48:29 +0000 (11:48 -0400)]
config: Introduce the concept of an "ungettable" variable.
We had though to make all obsolete and invisible variables
ungettable, so that GETCONF would reject them. But it turns out
that this isn't the current behavior of GETCONF with those
variables. So for now, I'm leaving the current behavior unchanged.
(See ticket 31647 for a proposal to change the behavior.)
Nick Mathewson [Thu, 5 Sep 2019 15:48:27 +0000 (11:48 -0400)]
Document config_var_is_dumpable and config_var_is_settable.
David Goulet [Wed, 11 Sep 2019 13:36:28 +0000 (09:36 -0400)]
Merge branch 'tor-github/pr/1311'
George Kadianakis [Wed, 11 Sep 2019 13:19:21 +0000 (16:19 +0300)]
Merge branch 'tor-github/pr/1307'
Nick Mathewson [Wed, 11 Sep 2019 12:59:29 +0000 (08:59 -0400)]
Merge branch 'ticket31578' into ticket31578_merged
teor [Mon, 9 Sep 2019 23:06:36 +0000 (09:06 +1000)]
main: add some newlines to the subsystem list, for readability
teor [Mon, 9 Sep 2019 23:04:38 +0000 (09:04 +1000)]
main: remove level number comments from the subsystem list (master)
Part of 31615.
teor [Mon, 9 Sep 2019 23:03:37 +0000 (09:03 +1000)]
Merge branch 'bug31615_041' into bug31615_master
Merged modified lines from bug31615_041, and unmodified lines
from master.
teor [Mon, 9 Sep 2019 22:44:35 +0000 (08:44 +1000)]
main: remove level number comments from the subsystem list (0.4.1)
Part of 31615.
teor [Mon, 9 Sep 2019 22:43:13 +0000 (08:43 +1000)]
Merge branch 'bug31615_040' into bug31615_041
Merged modified lines from bug31615_040, and unmodified lines
from maint-0.4.1.
teor [Mon, 9 Sep 2019 22:35:56 +0000 (08:35 +1000)]
main: remove level number comments from the subsystem list (0.4.0)
These levels get out of date really easily: we'll implement a level
dump command in tor in 31614.
They also cause conflicts and inconsistencies when merging forward
level changes.
Part of 31615.
David Goulet [Mon, 9 Sep 2019 15:55:33 +0000 (11:55 -0400)]
build: The <sys/sysctl.h> is now deprecated on Linux
Closes #31673
David Goulet [Mon, 9 Sep 2019 18:53:12 +0000 (14:53 -0400)]
Merge branch 'tor-github/pr/1264'
Nick Mathewson [Mon, 9 Sep 2019 16:35:27 +0000 (12:35 -0400)]
Merge branch 'ticket30924_042_04_squashed_merged'
Nick Mathewson [Mon, 9 Sep 2019 15:10:53 +0000 (11:10 -0400)]
Merge branch 'ticket30924_042_04_squashed' into ticket30924_042_04_squashed_merged
David Goulet [Tue, 20 Aug 2019 14:59:04 +0000 (10:59 -0400)]
hs-v3: Rename validation function in hs_intropoint.c
Signed-off-by: David Goulet <dgoulet@torproject.org>
David Goulet [Tue, 20 Aug 2019 14:50:31 +0000 (10:50 -0400)]
hs-v3: Move DoS parameter check against 0
Move it outside of the validation function since 0 is a valid value but
disables defenses.
Signed-off-by: David Goulet <dgoulet@torproject.org>
David Goulet [Tue, 20 Aug 2019 13:53:29 +0000 (09:53 -0400)]
practracker: Make you happy funny script
Signed-off-by: David Goulet <dgoulet@torproject.org>
David Goulet [Mon, 9 Sep 2019 15:05:51 +0000 (11:05 -0400)]
Merge branch 'tor-github/pr/1298'
David Goulet [Mon, 9 Sep 2019 14:51:19 +0000 (10:51 -0400)]
Merge branch 'tor-github/pr/1287'
teor [Wed, 4 Sep 2019 05:40:57 +0000 (15:40 +1000)]
subsys: Make the subsystem init order match the module dependencies
Fix levels for subsystems that depend on log/err
* winprocess (security) doesn't use err:
* call windows process security APIs as early as possible
* init err after winprocess
* move wallclock so it's still after err
* network and time depend on log:
* make sure that network and time can use logging.
* init network and time after log
Add comments explaining the module init order.
Fixes bug 31615; bugfix on 0.4.0.1-alpha.
Nick Mathewson [Thu, 5 Sep 2019 20:20:31 +0000 (16:20 -0400)]
changes file for ticket31477
Nick Mathewson [Mon, 26 Aug 2019 17:47:09 +0000 (13:47 -0400)]
Add new practracker test files to Makefile.am
Nick Mathewson [Mon, 26 Aug 2019 16:33:44 +0000 (12:33 -0400)]
New practracker exceptions for dependency violations in headers
I've done this manually, since I don't want to override the existing
exceptions in this branch.
Nick Mathewson [Mon, 26 Aug 2019 16:30:18 +0000 (12:30 -0400)]
Fix a bug in practracker's handling of .may_include in headers
I was expecting our filter code to work in a way it didn't. I
thought that saying that DependencyViolation applied to "*" would
hit all of the files -- but actually, "*" wasn't implemented. I had
to say "*.c" and "*.h"
Nick Mathewson [Thu, 5 Sep 2019 19:24:54 +0000 (15:24 -0400)]
Remove unused struct_var_* functions.
These turned out to be unnecessary, so let's not keep them around
and let them start getting complicated.
Closes ticket 31630.
Nick Mathewson [Thu, 5 Sep 2019 15:48:25 +0000 (11:48 -0400)]
config: Invert sense of _is_invisible, and rename to is_listable()
Nick Mathewson [Thu, 5 Sep 2019 15:48:23 +0000 (11:48 -0400)]
config: replace config_var_is_cumulative with is_replaced_on_set()
This change replaces the higher-level property check to match our
intended flag factoring.
George Kadianakis [Thu, 5 Sep 2019 14:13:29 +0000 (17:13 +0300)]
Merge branch 'tor-github/pr/1295'
George Kadianakis [Thu, 5 Sep 2019 14:12:19 +0000 (17:12 +0300)]
Merge branch 'tor-github/pr/1294'
George Kadianakis [Thu, 5 Sep 2019 14:10:07 +0000 (17:10 +0300)]
Merge branch 'tor-github/pr/1293'
George Kadianakis [Thu, 5 Sep 2019 14:09:20 +0000 (17:09 +0300)]
Merge branch 'tor-github/pr/1291'
George Kadianakis [Thu, 5 Sep 2019 14:06:58 +0000 (17:06 +0300)]
Merge branch 'tor-github/pr/1292'
George Kadianakis [Thu, 5 Sep 2019 14:02:53 +0000 (17:02 +0300)]
Merge branch 'tor-github/pr/1261'
Neel Chauhan [Mon, 26 Aug 2019 02:32:07 +0000 (22:32 -0400)]
Add tests for IPv6 exit policies on microdescriptors
Neel Chauhan [Mon, 26 Aug 2019 00:22:57 +0000 (20:22 -0400)]
Check IPv6 exit policies on microdescriptors in node_exit_policy_rejects_all()
Nick Mathewson [Thu, 5 Sep 2019 11:57:36 +0000 (07:57 -0400)]
config: note that some arguments are required.
Nick Mathewson [Thu, 5 Sep 2019 11:41:58 +0000 (07:41 -0400)]
Merge remote-tracking branch 'tor-github/pr/1278'
teor [Thu, 5 Sep 2019 04:48:09 +0000 (14:48 +1000)]
Merge branch 'maint-0.4.1'
teor [Thu, 5 Sep 2019 04:48:02 +0000 (14:48 +1000)]
Merge branch 'maint-0.4.0' into maint-0.4.1
teor [Thu, 5 Sep 2019 04:47:54 +0000 (14:47 +1000)]
Merge branch 'maint-0.3.5' into maint-0.4.0
teor [Thu, 5 Sep 2019 04:47:34 +0000 (14:47 +1000)]
Merge remote-tracking branch 'tor-github/pr/1271' into maint-0.3.5
teor [Thu, 5 Sep 2019 02:08:02 +0000 (12:08 +1000)]
Merge branch 'maint-0.4.1'
Resolved modified/deleted conflict on changes/bug30649 by deleting
the file.
tor-github/pr/1282 modifies ChangeLog and ReleaseNotes instead of
changes/bug30649. We cherry-picked it to master, as well as merging
to release-0.4.1.