Commit Graph

290411 Commits

Author SHA1 Message Date
rillig a9be40eb2d indent: let indent format the comments after previous refactoring
Before this refactoring, I had skipped this section of the code from
formatting since the 'default:' branch was enclosed in a block of its
own, and that block would have been indented one more level to the
right. Extracting that code into a separate function got rid of the
extra braces.

No functional change.
2021-09-27 20:09:55 +00:00
rillig 77aa86a641 indent: split search_brace into smaller functions
No functional change.
2021-09-27 20:00:41 +00:00
rillig bf63fc3c8a tests/indent: document that label indentation is not configurable
For at least the past 27 years, labels have been indented 2 levels to
the left of the corresponding statement. See label_offset and
compute_label_indent (or compute_label_target in FreeBSD).
2021-09-27 19:02:44 +00:00
rillig 3d1caab23e indent: use binary instead of linear search when adding types
No functional change.
2021-09-27 18:21:47 +00:00
ryo ba354ba202 remove unused code.
The syscall for 32bit uses aarch32_syscall.c, so there is no need to make syscall.c support it.
2021-09-27 17:51:15 +00:00
ryo 49d19cb322 linux syscall should not break x1 register 2021-09-27 17:40:39 +00:00
ryo efb4803aa5 In order to prevent uninitialized values from being reflected in the registers after syscall, rval[] must be initialized. 2021-09-27 17:37:59 +00:00
rillig 741eb7c2a8 indent: extract is_typename from lexi
No functional change.
2021-09-27 17:33:07 +00:00
msaitoh a79b797b99 Improve variable sized TLB's output.
- Fix a bug that STLB is printed as DTLB.
 - If a TLB is variable sized, print the max size instead of error message.
   XXX This is temporary solution.
2021-09-27 17:05:58 +00:00
christos a9f8395a14 new OpenSSH 2021-09-27 17:04:12 +00:00
christos f1ad81b87d Merge conflicts between OpenSSH 8.7 and 8.8 2021-09-27 17:03:13 +00:00
rillig 041780a3e3 indent: rename rwcode to keyword_kind, various cleanup
No idea what the 'rw' in 'rwcode' meant, it had been imported that way
28 years ago. Since rwcode specifies the kind of a keyword, the prefix
'kw_' makes sense.

No functional change.
2021-09-27 16:56:35 +00:00
msaitoh 5bad7a59b6 Add Load Only TLB and Store Only TLB. 2021-09-27 16:52:15 +00:00
msaitoh ec1888b4e2 Fix a bug that some TLB related lines were not printed. 2021-09-27 16:47:15 +00:00
msaitoh bdd55414af Add ':' for readability. 2021-09-27 16:22:58 +00:00
wiz fe9d2d610d openssh 8.8 is out 2021-09-27 11:13:12 +00:00
kim 125267f935 OpenSSH: Restore ChallengeResponseAuthentication as an alias
OpenSSH 8.7 has deprecated ChallengeResponseAuthentication, but not removed
it. It is now an alias for KbdInteractiveAuthentication (as are the prior
aliases of ChallengeResponseAuthentication).

I think this chunk was accidentally dropped in the OpenSSH 8.7 merge.
2021-09-27 11:05:50 +00:00
jmcneill d1f5c91710 No longer need to call arm_pmu_init on all CPUs. 2021-09-27 09:54:52 +00:00
msaitoh 44b1f8a1c3 Use unsigned to avoid undefined behavior in pppasyncstart().
Reported-by: syzbot+7c8c7977e2756ac13f0a@syzkaller.appspotmail.com
2021-09-27 07:13:30 +00:00
thorpej 5674e97b63 Tweak filt_piperead() and filt_pipewrite() so that:
- There is only a single return from the function (and thus a single
  place where the pipe lock must be released).
- kn->kn_data is referenced only inside the lock perimeter.
2021-09-27 00:51:10 +00:00
thorpej ec9c6f37a8 Consistently reference kn->kn_data only within the lock perimeter in
the filtops f_event() callback.
2021-09-27 00:40:49 +00:00
thorpej 4dbe2d8d51 In kqueue_kqfilter(), return EINVAL instead of 1 if something other than
EVFILT_READ was requested.
2021-09-26 23:37:40 +00:00
thorpej 85530e54c1 - Rename kqueue_misc_lock -> kqueue_timer_lock, since EVFILT_TIMER is
now its only user.  Also initialize it as IPL_SOFTCLOCK; there is no
  practical difference in how it operates (it is still an adaptive lock),
  but this serves as a visual reminder that we are interlocking against
  a callout.
- Add some comments that describe why we don't need to hold kqueue_timer_lock
  when detaching an EVFILT_TIMER due to guarantees made by callout_halt().
- Mark timer_filtops as MPSAFE.
2021-09-26 23:34:46 +00:00
rillig 8cd4e451b0 indent: fix documentation of opt.case_indent
See io.c, compute_label_indent.
2021-09-26 21:32:58 +00:00
rillig 47e959522e indent: fix definition of -cli in manual page
See io.c, compute_label_indent.
2021-09-26 21:31:57 +00:00
thorpej bcaaa3053f Fix the locking around EVFILT_FS. Previously, the code would walk the
fs_klist and take the kqueue_misc_lock inside the event callback.
However, that list can be modified by the attach and detach callbacks,
which could result in the walker stepping right off a cliff.

Instead, we give the fs_klist it's own lock, and hold it while we
call knote(), using the NOTE_SUBMIT protocol.  Also, fs_filtops
into vfs_syscalls.c so all of the locking logic is contained in one
file (there is precedence with sig_filtops).  fs_filtops is now marked
MPSAFE.
2021-09-26 21:29:38 +00:00
rillig 48d88d2a20 indent: unexport global variables
The variable match_state was write-only and was thus removed.

No functional change.
2021-09-26 21:23:31 +00:00
rillig b81a3587aa indent: unexport keyword table, clean up
No functional change.
2021-09-26 21:05:48 +00:00
jmcneill 31387e83e8 Add missing insn barrier 2021-09-26 20:55:15 +00:00
rillig 6f51390d02 indent: force all option variables to be in struct options
No functional change.
2021-09-26 20:48:10 +00:00
rillig 7051e4ad09 indent: reduce memory usage of the options table
Almost all boolean options are negatable, so model this directly instead
of saving each option twice. This saves memory, is faster and more
directly models reality.

No functional change.
2021-09-26 20:43:44 +00:00
rillig 4e68e23c49 indent: list options in the same order as in the manual page
No functional change.
2021-09-26 20:21:47 +00:00
jmcneill 2b030b0a3b Use the yield instruction as SPINLOCK_BACKOFF_HOOK for aarch64. 2021-09-26 20:15:04 +00:00
jmcneill 623c5b97e4 Enable checksum offload features by default. 2021-09-26 20:14:07 +00:00
rillig fcbf841a95 indent: reduce code for listing the options
After this change, the few options that do not follow the standard
scheme become more visible. They are '-bl', '-br' and '-ta'.

No functional change.
2021-09-26 20:12:37 +00:00
rillig b5f34dd720 indent: negate and rename option.leave_comma
The old name did not mirror the description in the manual page, and it
was the only option that is negated. Inverting it allows the options
table to be compressed.
2021-09-26 19:57:23 +00:00
rillig 630203ff25 indent: let indent format its own code -- in supervised mode
After running indent on the code, I manually selected each change that
now looks better than before. The remaining changes are left for later.
All in all, indent did a pretty good job, except for syntactic additions
from after 1990, but that was to be expected. Examples for such
additions are GCC's __attribute__ and C99 designated initializers.

Indent has only few knobs to tune the indentation. The knob for the
continuation indentation applies to function declarations as well as to
expressions. The knob for indentation of local variable declarations
applies to struct members as well, even if these are members of a
top-level struct.

Several code comments crossed the right margin in column 78. Several
other code comments were correctly broken though. The cause for this
difference was not obvious.

No functional change.
2021-09-26 19:37:11 +00:00
rillig 16cc73a865 indent: add .indent.pro that almost matches the source code
One might expect that the code of indent is properly indented according
to its own capabilities, but that's not the case, there are many
deviations.

This indentation profile comes close to the existing code. Maybe someday
indent's own source code can be formatted using this profile, but before
attempting that, its remaining bugs have to be fixed.

Development of indent has essentially stopped somewhere around 1990, as
demonstrated by the wrong formatting of '...' that has only been fixed a
few minutes ago. The '...' is an invention of C90. Indent's parser still
considers '...' as consisting of the 3 tokens period-period-period, but
that's OK since the effect is the same.

Another feature that had been missing for a long time were C99 comments
that span from '//' to the next newline. Before March 2021, these were
parsed as a binary operator, which produced lots of funny side effects.

Since indent's code makes use of several C99 features, as soon as it can
properly indent its own code, the worst of these bugs will have been
fixed.
2021-09-26 19:02:35 +00:00
rillig d8766f5ac3 indent: fix missing space between comma and ellipsis
According to lint's C grammar, in standard C an ellipsis only occurs
after a comma. There are GCC extensions that allow an ellipsis as the
only function parameter, as well as in 'case a ... b', but these are
rare.
2021-09-26 18:52:16 +00:00
rillig 3f4fc2cf70 tests/indent: demonstrate missing space before ellipsis 2021-09-26 18:42:46 +00:00
thorpej ddf01a48a3 Mark kqread_filtops, user_filtops, and seltrue_filtops as MPSAFE. 2021-09-26 18:13:58 +00:00
thorpej adc241a744 sig_filtops is MPSAFE. 2021-09-26 17:34:19 +00:00
thorpej 5ab06420d2 Driver "kqfilter" entry points return an error code, so if an invalid
filter is requested, return EINVAL rather than 1.
2021-09-26 16:36:18 +00:00
thorpej 0c8ebd676b - Call selnotify() with sysmon_power_event_queue_mtx held, passing the
correct hints.  Adjust filt_sysmon_power_read() accordingly (assert
  that the mutex is held iff NOTE_SUBMIT).
- Mark sysmon_power_read_filtops as MPSAFE.
- Use seltrue_filtops rather than rolling our own with filt_seltrue.
2021-09-26 16:24:21 +00:00
thorpej 8326460e38 Use seltrue_filtops rather than rolling our own with filt_seltrue. 2021-09-26 15:58:33 +00:00
maya f9d97969cb Restore MKNOUVEAUFIRMWARE and MKRADEONFIRMWARE and make gpufw set unconditional
Simplifies logic.
(Second commit - first one was partial)

Restoring MK* requested by mrg on tech-kern discussion
https://mail-index.netbsd.org/tech-kern/2021/09/25/msg027695.html
2021-09-26 15:52:40 +00:00
thorpej 876f4bdad7 The pipe kq filter ops are MPSAFE. 2021-09-26 15:48:54 +00:00
thorpej 1a066149f8 logread_filtops is MPSAFE. 2021-09-26 15:11:33 +00:00
thorpej f54558365c entropy_read_filtops is MPSAFE. 2021-09-26 15:10:51 +00:00
thorpej 2ed37652f4 - Use seltrue_filtops rather than rolling our own with filt_seltrue.
- Remove sc_wr_sel completely; nothing actually uses it.
2021-09-26 15:08:29 +00:00