There is the strong suspicion that the 0x7fff mask in the various
armv7 timecounters was simply copied from powerpc, and that these really
are full 32-bit counters.
I wanted to verify this from the data sheets, but I'm insufficiently
familiar with the ARM ecosystem to locate those.
Back in
Christian Weisgerber:
> - tb_get_timecount, NULL, 0x7fff, 0, "tb", 0, NULL, 0
> + tb_get_timecount, NULL, 0x, 0, "tb", 0, NULL, 0
PS: Do we prefer ~0u over 0x?
--
Christian "naddy" Weisgerber na...@mips.inka.de
Mark Kettenis:
> > Date: Sun, 12 Jul 2020 18:12:39 +0200
> > From: Christian Weisgerber
> >
> > The PowerPC/Power ISA Time Base is a 64-bit register. We can use
> > the full lower 32 bits.
> >
> > OK?
>
> Sure, but this needs to be coordinated
The PowerPC/Power ISA Time Base is a 64-bit register. We can use
the full lower 32 bits.
OK?
Index: arch/macppc/macppc/clock.c
===
RCS file: /cvs/src/sys/arch/macppc/macppc/clock.c,v
retrieving revision 1.44
diff -u -p -r1.44
Mark Kettenis:
> > There is the strong suspicion that the 0x7fff mask in the various
> > armv7 timecounters was simply copied from powerpc, and that these really
> > are full 32-bit counters.
> >
> > I wanted to verify this from the data sheets, but I'm insufficiently
> > familiar with the
Userland gettime support for alpha.
Alas, completely untested since I don't have access to that arch.
Index: lib/libc/arch/alpha/gen/usertc.c
===
RCS file: /cvs/src/lib/libc/arch/alpha/gen/usertc.c,v
retrieving revision 1.1
diff -u
Mark Kettenis:
> Nevertheless, here is a different take on the problem. Since the
> timecounter only uses the low 32 bits we don't need the double read.
> This version also changes the timecounter mask from 0x7fff to
> 0x. That must be ok, since the counter has 64 bits and we are
>
On 2020-06-18, Marc Espie wrote:
> What pkg_add does internally is a pipeline:
>
> ftp | signify|internal gunzip
>
> closing the end file handle should kill the whole chain.
> So I need to figure out where it goes wrong, what's the
> part that doesn't die "instantly".
That's ftp(1). Our SSL
20:31:19 -
@@ -0,0 +1,18 @@
+/* $OpenBSD$ */
+/*
+ * Written by Christian Weisgerber .
+ * Public domain.
+ */
+
+#include "DEFS.h"
+
+ENTRY(ffs)
+ RETGUARD_SETUP(ffs, x15)
+ rbitw1, w0
+ clz w1, w1
+ cmp w0, wzr
+ csinc w0, w
The freedb.org CD track database is dead. Its shutdown had already
been announced for March, and it finally disappeared.
gnudb.org, whoever they are, offers the last working alternative
that still supports the CDDB protocol. Actually, the port was dead
yesterday, but they fixed it today. I
Christian Weisgerber:
> Well, I suggested it, so here's my attempt to switch powerpc64's
> libc memmove.S over to 64 bits:
Actually, on second thought:
That function simply copies as many (double)words plus a tail of
bytes as the length argument specifies. Neither source nor desti
Well, I suggested it, so here's my attempt to switch powerpc64's
libc memmove.S over to 64 bits:
* Treat length parameter as 64 bits (size_t) instead of 32 (u_int).
* Set up the main loop to copy 64-bit doublewords instead of 32-bit
words.
This definitely needs double and triple checking.
George Koehler:
> --- lib/libc/arch/powerpc/gen/usertc.c.before Sat Jun 13 21:28:50 2020
> +++ lib/libc/arch/powerpc/gen/usertc.cSat Jun 13 21:38:52 2020
> @@ -18,4 +18,19 @@
> #include
> #include
>
> -int (*const _tc_get_timecount)(struct timekeep *, uint64_t *) = NULL;
> +int
>
On 2020-06-19, Mark Kettenis wrote:
> I'm talking about *skew*, not drift. If there is a significant drift
> you already knock out the TSC.
>
> What's needed is:
>
> 1. A bit of research of what an acceptable skew is. My hypothesis is
>that on many machines with a single socket the TSCs
Paul Irofti:
> This also handles negative skew values that my prevoius diff did not.
> --- sys/arch/amd64/amd64/tsc.c
> +++ sys/arch/amd64/amd64/tsc.c
> @@ -216,6 +217,8 @@ tsc_get_timecount(struct timecounter *tc)
> void
> tsc_timecounter_init(struct cpu_info *ci, uint64_t cpufreq)
> {
> +
Paul Irofti:
> > b) Revert _timekeep init (breaks naddy@'s machine)
>
> Robert helped properly track down this issue to a silly null-ref.
If that was indeed the problem...
> --- lib/libc/dlfcn/init.c
> +++ lib/libc/dlfcn/init.c
> @@ -105,6 +107,14 @@ _libc_preinit(int argc, char **argv, char
Paul Irofti:
[Unrelated, just to mark where we're at]
> Right. Just reproduced it here. This moves the check at the top so that
> each CPU checks its own skew and disables tc_user if necessary.
I tweaked the patch locally to make _timekeep a visible global
symbol in libc.
Printing its value has
Christian Weisgerber:
> I tweaked the patch locally to make _timekeep a visible global
> symbol in libc.
>
> Printing its value has revealed two issues:
>
> * The timekeep page is mapped to the same address for every process.
> It changes across reboots, but once running,
Paul Irofti:
> Can't test right now, but if you enable the TSC_DEBUG in cpu.c or if you
> put a printf in the CPU_INFO_FOREACH you will probably see the correct
> skew values.
It's worse: CPU_INFO_FOREACH() only sees cpu0. The others aren't
attached yet.
--
Christian "naddy" Weisgerber
On 2020-06-20, Christian Weisgerber wrote:
>> Well... they something in ports might still look at them in
>>
>>
>> Can someone from ports speak about this?
>
> I have started an amd64 bulk build without .
There were no build failures attributable to t
On 2020-06-19, "Theo de Raadt" wrote:
> Well... they something in ports might still look at them in
>
> Can someone from ports speak about this?
I have started an amd64 bulk build without .
--
Christian "naddy" Weisgerber na...@mips.inka.de
On 2020-06-19, Paul Irofti wrote:
> I have addressed your comments bellow, except for the CPU skew one. That
> code disables TSC for all CPUs, not just for PRIMARY. Would you like to
> walk and add code for every CPU to check the drift and then disable the
> TSC? It seems a little too much...
>
On 2020-06-20, Christian Weisgerber wrote:
> I can't get this revision of the diff to work on amd64:
> * patch source
> * build and install kernel, reboot
> * make build
> * reboot -> "Process (pid 1) got signal 11"
>
> I'm at a loss. As part of the "
Paul Irofti:
> 683 /* map the process's timekeep page */
> 684 if (exec_timekeep_map(pr))
> 685 goto free_pack_abort;
> 686 /* setup new registers and do misc. setup. */
> 687 if (pack.ep_emul->e_fixup != NULL) {
> 688 if
Christian Weisgerber:
> If I move
>
> vaddr_t ps_timekeep;/* User pointer to timekeep */
>
> up into the zeroed area, I get a properly randomized _timekeep in
> userland.
Also note that exec_sigcode_map() has this
pr->ps_si
Mark Kettenis:
> Unfortunately that doesn't quite work. At least in my build it
> doesn't pick up .c files in the linker/arch directories.
>
> > Index: lib/libkern/arch/arm64/ffs.c
I was certain I had checked this, but indeed it doesn't work.
The Makefile rules are generated from
/libkern/arch/arm64/ffs.S
diff -N lib/libkern/arch/arm64/ffs.S
--- /dev/null 1 Jan 1970 00:00:00 -
+++ lib/libkern/arch/arm64/ffs.S10 Jun 2020 17:38:50 -
@@ -0,0 +1,17 @@
+/* $OpenBSD$ */
+/*
+ * Written by Christian Weisgerber .
+ * Public domain.
+ */
+
+#include
+
+ENTRY(ffs
Here is a cpu_rnd_messybits() implementation for arm64.
It reads the virtual counter and xors it with a bit-reversed copy
of itself.
The virtual counter is used by the only timecounter implementation
used on arm64, so I assume it is generally available.
It's a 64-bit counter, which we reduce to
Mark Kettenis:
> > Here is a cpu_rnd_messybits() implementation for arm64.
> > It reads the virtual counter and xors it with a bit-reversed copy
> > of itself.
> >
> > The virtual counter is used by the only timecounter implementation
> > used on arm64, so I assume it is generally available.
> >
David Gwynne:
> > Starting with POWER7 (Power ISA v.2.06), there are also corresponding
> > 64-bit instructions. Do we want to use those on powerpc64? Or do
> > we want to keep compatibility with older processors?
>
> I'm ok with using the instructions. I can't think of what benefit compat in
On 2020-06-08, Christian Weisgerber wrote:
>> Did they also happen to add opcodes for doing swaps in registers?
>
> No.
> (I haven't looked at the vector instructions yet.)
PS: There's a vector permutate instruction, but AFAICT there is no
way to move data between general pur
powerpc has byte-swapping 16 and 32-bit load/stores and we use those
in .
Starting with POWER7 (Power ISA v.2.06), there are also corresponding
64-bit instructions. Do we want to use those on powerpc64? Or do
we want to keep compatibility with older processors?
Index:
On 2020-06-08, Christian Weisgerber wrote:
> More archs to come...
Style question:
Since this mostly comes down to embedding a single special instruction
in between normal C operations, I wonder whether I should just do .c
with asm() instead of .S, and leave all the boilerplate to the
compi
$ */
+/*
+ * Written by Christian Weisgerber .
+ * Public domain.
+ */
+
+#include
+
+ENTRY(ffs)
+ RETGUARD_SETUP(ffs, x15)
+ rbitw1, w0
+ clz w1, w1
+ cmp w0, #0
+ csinc w0, wzr, w1, eq
+ RETGUARD_CHECK(ffs, x15)
+ ret
+END(ffs)
--
Christian
-N lib/libc/arch/aarch64/string/ffs.c
--- /dev/null 1 Jan 1970 00:00:00 -
+++ lib/libc/arch/aarch64/string/ffs.c 9 Jun 2020 19:54:21 -
@@ -0,0 +1,15 @@
+/* $OpenBSD$ */
+/*
+ * Written by Christian Weisgerber .
+ * Public domain.
+ */
+
+#include
+
+int
+ffs(int x)
+{
+ x = x
On 2020-06-09, Christian Weisgerber wrote:
> Here are optimized ffs(3) implementations for
> * arm64 (superseding the earlier ffs.S)
> * powerpc
> * powerpc64
> +int ffs(int x)
Oops, I'm going to change that to
int
ffs(int x)
before commit.
--
Christian &qu
Here's a proposal for implementing cpu_rnd_messybits() as a read of
the cycle counter on alpha, powerpc, and sparc64. Since I don't have
those archs, the diff is not even compile-tested.
* alpha: RPCC is a 32-bit counter (in a 64-bit register)
* powerpc: TB is a 64-bit counter split into two
Paul Irofti:
> This iteration of the diff adds bounds checking for tk_user and moves
> the usertc.c stub to every arch in libc as recommanded by deraadt@.
> It also fixes a gettimeofday issue reported by cheloha@ and tb@.
Additionally, it changes struct timekeep in an incompatible way. ;-)
A
Christian Weisgerber:
> Should we already bump major while the diff matures?
Oh, we can't quite bump yet. tk_major und tk_minor are only set
in exec_timekeep_map(), but aren't checked anywhere.
+ timekeep->tk_major = 0;
+ timekeep->tk_minor = 0;
Those
Paul Irofti:
> > Additionally, it changes struct timekeep in an incompatible way. ;-)
> > A userland built before the addition of tk_nclocks is very unhappy
> > with a kernel built afterwards.
>
> I have not seen this problem and have not built a snapshot to update or go
> back. What do you mean
Paul Irofti:
> > Paul, that tk_nclocks addition isn't useful. You need to do the
> > bounds checking against the number of clocks you have implemented in
> > libc. How many clocks the kernel has implemented doesn't matter.
>
> What you are saying is that we could be in a situation where the
Paul Irofti:
[lib/libc/arch/*/gen/usertc.c]
> +int (*const _tc_get_timecount)(struct timekeep *, uint64_t *) = NULL;
[lib/libc/sys/microtime.c]
> +static inline int
> +tc_delta(struct timekeep *tk, u_int *delta)
> +{
> + uint64_t tc;
> + if (delta == NULL || _tc_get_timecount(tk, ))
Theo de Raadt:
> The diff is growing complexity to support a future which wouldn't
> exist if attempts at *supporting all* architectures received priority.
Adding support for more archs is very simple, since you just need
to copy the corresponding get_timecounter function from the kernel.
Paul Irofti:
> > This iteration of the diff adds bounds checking for tk_user and moves
> > the usertc.c stub to every arch in libc as recommanded by deraadt@.
> > It also fixes a gettimeofday issue reported by cheloha@ and tb@.
>
> Forgot to add armv7 tk_nclock entries. Noticed by benno@,
Christian Weisgerber:
> This adds the optimized ffs(3) versions on aarch64 and powerpc to
> libc, for completeness' sake.
>
> Also add a brief regression test.
>
> OK?
Index: lib/libc/arch/aarch64/string/Makefile.inc
==
Here's a cpu_rnd_messybits() for hppa. This just steals from
itmr_get_timecount(). If we want to use the mfctl() macro, we need
to include into cpu.h. I don't know if we want
that, so I went with the explicit asm() instead.
Completely untested.
Index: sys/arch/hppa/hppa/machdep.c
On 2020-06-13, Theo Buehler wrote:
> Others have pointed out off-list that one can use __builtin_popcount(),
> but __builtin_parity() is exactly what I want. Is it available on all
> architectures?
The standard implementation will be perfectly fine, no need to resort
to magic compiler
Scott Cheloha:
> Can we add the missing LFENCE instructions to userspace and the
> kernel? And can we excise the upper 32 bits?
> + uint32_t lo;
> +
> + asm volatile("lfence");
> + asm volatile("rdtsc" : "=a"(lo));
That's wrong. rtdsc will clobber %rdx, whether you use that value
Scott Cheloha:
> --- lib/libc/arch/amd64/gen/usertc.c 8 Jul 2020 09:17:48 - 1.2
> +++ lib/libc/arch/amd64/gen/usertc.c 25 Jul 2020 17:50:38 -
> @@ -21,9 +21,12 @@
> static inline u_int
> rdtsc(void)
> {
> - uint32_t hi, lo;
> - asm volatile("rdtsc" : "=a"(lo),
On 2020-08-14, Jason McIntyre wrote:
> - i cannot work out what is with the \! examples. i know we try to make
> entries work for both csh and sh style shells, but stuff like this
> works without escaping:
>
> $ find . ! -type f
Going through the CVS and SCCS history, I see that the
Denis Fondras:
> This diff renames SIMPLEQ_* to STAILQ_* in /usr/src/sys/sys to unify with
> FreeBSD and Linux.
>
> I added aliases at the end of queue.h to avoid breaking base too much. they
> will
> be removed as soon as diff 2,3,4,5,6,7 are commited.
We'll need to run a ports bulk build
Claudio Jeker:
> In tal_parse() use strndup() to create the tal descr instead of the more
> complex malloc, memcpy version. Result is the same but the strndup version
> is a lot nicer.
Yes, but...
> --- tal.c 11 Oct 2020 12:39:25 - 1.22
> +++ tal.c 3 Dec 2020 12:00:25 -
>
ncurses has a configure option that adds a few more consts to its
headers by way of the NCURSES_CONST define. Starting with version
6.0, this has become the default. OpenBSD is still on ncurses 5.7,
but FreeBSD and I guess most Linux distributions have moved on.
I suggest we also enable the
Theo de Raadt:
> What is lacking in this converstation is the justification.
> Why?
Providing STAILQ in OpenBSD will simplify porting to OpenBSD.
(Reality check: There is one port affected by this.)
Switching OpenBSD to STAILQ will simplify porting from OpenBSD.
(There are three or four FreeBSD
Mark Kettenis:
> What would the impact on ports of disabling base-gcc be on powerpc?
None.
$ cd /usr/ports
$ make ARCH=macppc MACHINE_ARCH=powerpc show=CHOSEN_COMPILER |grep -B1 base-gcc
$
--
Christian "naddy" Weisgerber na...@mips.inka.de
Denis Fondras:
> This diff renames SIMPLEQ_* to STAILQ_* in /usr/src/sys/sys to unify with
> FreeBSD and Linux.
>
> I added aliases at the end of queue.h to avoid breaking base too much. they
> will
> be removed as soon as diff 2,3,4,5,6,7 are commited.
>
> net/sniproxy has a patch to define
Edgar Pettijohn:
> In the BUGS section for the getopt(3) manual it mentions not using
> single digits for options. I know spamd uses -4 and -6 there are
> probably others. Should they be changed? Or is the manual mistaken?
You misunderstand. The manual warns against the use of digits to
pass
Hiltjo Posthuma:
> > @@ -75,19 +74,8 @@ cookie_load(void)
> > if (fp == NULL)
> > err(1, "cannot open cookie file %s", cookiefile);
> > date = time(NULL);
> > - lbuf = NULL;
> > - while ((line = fgetln(fp, )) != NULL) {
> > - if (line[len - 1] == '\n') {
> > -
Fix a pointer dereference in disklabel(8).
This looks like somebody wrote *s[0] in place of (*s)[0].
Which in this case happens to be equivalent, but it still looks
wrong.
OK?
Index: sbin/disklabel/editor.c
===
RCS file:
Replace fgetln(3) with getline(3) in sed.
The mf_fgets() part is from Johann Oskarsson for Illumos/FreeBSD.
Passes our sed regression tests.
OK?
Index: usr.bin/sed/main.c
===
RCS file: /cvs/src/usr.bin/sed/main.c,v
retrieving
Replace fgetln(3) with getline(3).
Since getline() returns a C string, we don't need to carry around
the length separately.
OK?
Index: sbin/disklabel/editor.c
===
RCS file: /cvs/src/sbin/disklabel/editor.c,v
retrieving revision
Replace fgetln(3) with getline(3).
OK?
Index: sbin/fdisk/misc.c
===
RCS file: /cvs/src/sbin/fdisk/misc.c,v
retrieving revision 1.63
diff -u -p -r1.63 misc.c
--- sbin/fdisk/misc.c 3 Jul 2019 03:24:01 - 1.63
+++
Visa Hankala:
> However, wouldn't it be better if the code avoided the
> situation, for example by defining ADJFREQ_MIN as the negative
> of ADJFREQ_MAX?
Indeed it would. ok naddy@
> --- kern/kern_time.c 23 Dec 2020 20:45:02 - 1.151
> +++ kern/kern_time.c 30 May 2021 15:38:09 -
Christian Weisgerber:
> > Diff below remove the KERNEL_LOCK()/UNLOCK() dance from uvm_fault() for
> > both amd64 and sparc64. That means the kernel lock will only be taken
> > for lower faults and some amap/anon code will now run without it.
>
> I ran an amd64 bulk bui
Marc Espie:
> Until a patch from naddy, I wasn't even aware of getopts in sh(1)
Let's start the discussion with this instead.
This puts the deprecation notice in getopt.1 in a prominent place,
and uses the same snippet in sh.1 and ksh.1.
Index: bin/ksh/ksh.1
In this auxiliary script, replace the deprecated getopt with getopts.
There is no pressing reason to do so, but let's stop perpetuating
an obsolete idiom.
ok?
Index: usr.sbin/switchd/genmap.sh
===
RCS file:
Jason McIntyre:
> - i'm ok with the getopt.1 and ksh.1 parts
> - i'm not ok with the addition to sh.1
>
> no one has really given a good reason why they think it should go into
> sh.1. i've given a few why i think it should not.
My understanding is that sh.1 is a subset of ksh.1, describing the
Marc Espie:
> I would also actually be fairly happy if we changed drastically the way
> sh(1) and ksh(1) look. To me, sh(1) should be the (more or less) standard
> shell documentation, AND ksh(1) should contain the differences/extensions.
I think that is a terrible idea. Historically the
Martin Pieuchot:
> Diff below remove the KERNEL_LOCK()/UNLOCK() dance from uvm_fault() for
> both amd64 and sparc64. That means the kernel lock will only be taken
> for lower faults and some amap/anon code will now run without it.
>
> I'd be interested to have this tested and see how much does
Make use of getline(3) in ftp(1).
Replace fparseln(3) with getline(3). This removes the only use
of libutil.a(fparseln.o) from the ramdisk.
Replace a complicated fgetln(3) idiom with the much simpler getline(3).
OK?
Index: distrib/special/ftp/Makefile
Todd C. Miller:
> I don't think your use of qlen is safe since it is initialized
> to zero. Specifically, it looks like "qp->q_text[qlen - 1]"
> would be an out of bounds read. Should qlen be initialized
> to strlen(qp->q_text) if qp->q_text != NULL?
Right. Next iteration:
Index: quiz.c
Alex Karle:
> Looking deeper, there is a bug in quiz(6) for datfiles with multi-line
> answers.
>
> Specifically, the following quiz.db line:
>
> foo:\
> bar
>
> Is parsed into "foo:bar\n", which made it impossible to get right (since
> the comparison was expecting a newline).
Christian Weisgerber:
> Make use of getline(3) in ftp(1).
>
> Replace fparseln(3) with getline(3). This removes the only use
> of libutil.a(fparseln.o) from the ramdisk.
> Replace a complicated fgetln(3) idiom with the much simpler getline(3).
New diff that fixes a bug I intro
Christian Weisgerber:
> > Make use of getline(3) in ftp(1).
> >
> > Replace fparseln(3) with getline(3). This removes the only use
> > of libutil.a(fparseln.o) from the ramdisk.
> > Replace a complicated fgetln(3) idiom with the much simpler getline(3).
>
"Theo de Raadt":
> 2) With very long names, it truncates the end of the path. This is less useful
> information. Imagine a copy operation with multiple files being transferred,
> one of them is huge and surprisingly long, but you cannot identify which one
> because all the truncated long paths
scp: tweak documentation and error message for -3 by default
Now that the -3 option is enabled by default, flip the documentation
and an error message from "requires -3" to "blocked by -R".
OK?
diff 453220bf36dcff10addeceb44e98f71bfeddcd53
f457be8f3b007fb662dd10fb565ab79b602109f5
blob -
Ingo Schwarze:
> deraadt@ recently pointed out to me in private mail that it is good
> for usability if interactive programs providing line editing
> functionality are consistent what they do with Ctrl-C, ideally
> discard the current input line and provide a fresh prompt.
>
> So i propose to do
Damien Miller:
> Just a head-up: snaps currently contain a set of changes[1] to
> make scp(1) use the SFTP protocol by default.
> Please report any incompatibilities or bugs that you encounter here
> (tech@), to bugs@ or to openssh@.
An obvious cosmetic difference is that relative paths are
Christian Weisgerber:
> Here's another attempt, incorporating millert's feedback and adding
> a few more casts:
Any interest in this or not worth the churn and I should drop it?
> Index: bin/chio/parse.y
> ===
> RCS
The oft-copied parse.y code declares some variables as "unsigned char *"
but passes them to functions that take "char *" arguments and doesn't
make any use of the unsigned property.
For OpenBSD's clang, -Wpointer-sign has been disabled by default,
but when that code is built elsewhere, the
Christian Weisgerber:
> The oft-copied parse.y code declares some variables as "unsigned char *"
> but passes them to functions that take "char *" arguments and doesn't
> make any use of the unsigned property.
While I'm here...
> int
> yylex(v
Todd C. Miller:
> On Thu, 30 Sep 2021 21:37:06 +0200, Christian Weisgerber wrote:
>
> > Unfortunately that also affects the parsebuf/pushback_buffer complex
> > used in some parser.y files.
>
> That would require a few extra casts but it is straightforward.
E.g. lik
Todd C. Miller:
> lungetc((u_char)*p);
> ...
> c = (u_char)*--p;
>
> Since we use casts sparingly, when they are present they indicate
> something you need to pay attention to. That is not the case when
> we simply change the type.
Unfortunately that also affects the
Here's another attempt, incorporating millert's feedback and adding
a few more casts:
Index: bin/chio/parse.y
===
RCS file: /cvs/src/bin/chio/parse.y,v
retrieving revision 1.23
diff -u -p -r1.23 parse.y
--- bin/chio/parse.y15 Oct
Vitaliy Makkoveev:
> Include missing "sys/refcnt.h" header to unpcb.h to fix libkvm and
> netstat(1) build. No functional changes.
I ran an amd64 package bulk build with this, four ncpu=4 machines.
No problems.
(Other than for dpb's ssh connection multiplexing, I don't think
Unix domain sockets
Klemens Nanni:
> > > Now this is clearly a "slow" path. I don't think there is any reason
> > > not to put all the code in that if (uvw_wxabort) block under the
> > > kernel lock. For now I think making access to ps_wxcounter atomic is
> > > just too fine grained.
> >
> > Right. Lock the
sbin/pfctl: fix -Wunused-but-set-variable warning
M sbin/pfctl/pfctl_optimize.c
diff 7c5dd09ecd1ff078b868c9ab52aac9754cde7761
6e5c342a53c05496c18849837c67b7dc05ce3792
blob - 1ab170a832dd183a2895774549ff93896803039a
blob + 5736a0d7b0ba04afeed855daa61fc6b5ef3894e4
---
sbin/isakmpd: fix -Wunused-but-set-variable warnings
The one in pf_key_v2.c could use an extra set of eyes, but I don't
think there are any side effects.
M sbin/isakmpd/ipsec.c
M sbin/isakmpd/pf_key_v2.c
M sbin/isakmpd/udp_encap.c
M sbin/isakmpd/x509.c
diff
Since the switch to LLVM 13, there are a number of compiler warnings
in base about variables that are assigned to but never used. Let's
start picking the low-hanging fruit, ok?
lib/libfuse: fix -Wunused-but-set-variable warning
M lib/libfuse/fuse_opt.c
diff
usr.sbin/ospf6ctl: fix -Wunused-but-set-variable warning
Maybe this is uncompleted code, but I think we can remove it for
the time being.
M usr.sbin/ospf6ctl/ospf6ctl.c
diff a992977b148f5fd9d4e3b9af9aeccac488edfa7a
c9fb0989c5128843af76d1ecd08c6f483f233307
blob -
usr.sbin/rad: fix -Wunused-but-set-variable warning
Trivial removal of unused variable.
M usr.sbin/rad/frontend.c
diff c9fb0989c5128843af76d1ecd08c6f483f233307
1779a21799642d5916a407f0cea6255b101c055c
blob - e6f6ae0419ab1662ebb2e8cdd17c07a82d1b87f9
blob +
usr.sbin/ospf6d: fix -Wunused-but-set-variable warnings
merge_config() sets "rchange", but doesn't use it. Comparing the
code to osfpd/ospfd.c makes me think that's an omission. Either
way it seems odd that the two code bases differ here.
rde_summary_update() is incomplete. We can simply
Mark Kettenis:
> There is a scenario where this goes wrong. If a shared library lacks
> a DT_SONAME entry, the library filename is used to generate the
> DT_NEEDED entries. But I would consider such a shared library broken
> and we fixed base a lng time ago. Some care has to be taken when
It appears that in revision 1.85 of usr.bin/ftp/ftp.1 a sentence
fragment was accidentally not removed.
OK?
Index: usr.bin/ftp/ftp.1
===
RCS file: /cvs/src/usr.bin/ftp/ftp.1,v
retrieving revision 1.122
diff -u -p -r1.122 ftp.1
---
You'd think that the kernel font bitmaps are a primary example of
data that could be read-only... and you'd be wrong.
The font encoding tables however are indeed constant as far as I can
tell. The diff below marks them as such. NetBSD has the same.
ok?
diff
usr.sbin/tcpdump: fix -Wunused-but-set-variable warning
All "infile" handling was moved into priv_exec() when tcpdump was
priviledge separated. The options are scanned both in priv_exec()
and in main(), so the empty case needs to remain in the latter.
ok?
M usr.sbin/tcpdump/tcpdump.c
diff
usr.sbin/ypldap: fix -Wunused-but-set-variable warnings
* "wrlen" has been write-only since the code was imported.
* Removing "dns_pid" replicates ntpd/ntp.c 1.122 (aece4353519f).
* yp_check() looks like unfinished code. Rather than removing it
we can ifdef it out.
ok?
M
First up, note that clang 13 does not produce those
"variable foo set but not used" warnings by default.
They need to be enabled by -Wunused-but-set-variable
or, more typically, as part of -Wall.
Here are the remaining warnings seen in a "make build":
bin/ksh required arguments to macros
Christian Weisgerber:
> usr.sbin/ypldap: fix -Wunused-but-set-variable warnings
>
> * "wrlen" has been write-only since the code was imported.
> * Removing "dns_pid" replicates ntpd/ntp.c 1.122 (aece4353519f).
> * yp_check() looks like unfinished code. Rathe
remove unused variable from all copies of _asr_strdname() and print_dname()
This also fixes -Wunused-but-set-variable warnings warnings in smtpd
and smtpctl. The code was imported with asr and then copied around.
ok?
M lib/libc/asr/asr.c
M regress/lib/libc/asr/bin/res_mkquery.c
M
401 - 500 of 543 matches
Mail list logo