Re: unlock mmap(2) for anonymous mappings

2022-01-14 Thread Mark Kettenis
> Date: Tue, 11 Jan 2022 23:13:20 + > From: Klemens Nanni > > On Tue, Jan 11, 2022 at 09:54:44AM -0700, Theo de Raadt wrote: > > > 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. F

Driver for Cadence SD/SDIO/eMMC host controller

2022-01-14 Thread Visa Hankala
This adds a basic driver (glue) for the Cadence SD/SDIO/eMMC host controller. The controller is mostly SDHC compatible. However, the SDHC register set is at an offset from the start of the register region. In addition, the controller handles card detect through SDHC registers, and will probably ne

Re: clang: compile static analyzer

2022-01-14 Thread Claudio Jeker
On Fri, Jan 14, 2022 at 04:44:49PM +, Stuart Henderson wrote: > On 2022/01/14 16:52, Rafael Sadowski wrote: > > On Fri Jan 14, 2022 at 03:17:21PM +0100, Tobias Heider wrote: > > > Hi, > > > > > > clang ships with a pretty useful static analyzer to find all kinds of bugs > > > in C and C++ code

Re: clang: compile static analyzer

2022-01-14 Thread Stuart Henderson
On 2022/01/14 16:52, Rafael Sadowski wrote: > On Fri Jan 14, 2022 at 03:17:21PM +0100, Tobias Heider wrote: > > Hi, > > > > clang ships with a pretty useful static analyzer to find all kinds of bugs > > in C and C++ code: > > > > https://clang-analyzer.llvm.org/ > > > > I use it regularly to che

Re: clang: compile static analyzer

2022-01-14 Thread Rafael Sadowski
On Fri Jan 14, 2022 at 03:17:21PM +0100, Tobias Heider wrote: > Hi, > > clang ships with a pretty useful static analyzer to find all kinds of bugs > in C and C++ code: > > https://clang-analyzer.llvm.org/ > > I use it regularly to check my own diffs and found plenty of bugs I could > have missed

Re: clang: compile static analyzer

2022-01-14 Thread Hiltjo Posthuma
On Fri, Jan 14, 2022 at 03:17:21PM +0100, Tobias Heider wrote: > Hi, > > clang ships with a pretty useful static analyzer to find all kinds of bugs > in C and C++ code: > > https://clang-analyzer.llvm.org/ > > I use it regularly to check my own diffs and found plenty of bugs I could > have misse

Re: clang: compile static analyzer

2022-01-14 Thread Todd C . Miller
On Fri, 14 Jan 2022 14:53:21 +, Visa Hankala wrote: > I think the tool is useful. However, installing it from ports is good > enough for me. Same here. - todd

Re: clang: compile static analyzer

2022-01-14 Thread Visa Hankala
On Fri, Jan 14, 2022 at 03:17:21PM +0100, Tobias Heider wrote: > Hi, > > clang ships with a pretty useful static analyzer to find all kinds of bugs > in C and C++ code: > > https://clang-analyzer.llvm.org/ > > I use it regularly to check my own diffs and found plenty of bugs I could > have misse

Re: possible memory leak in ipmi get_sdr

2022-01-14 Thread Benjamin Baier
On Fri, 14 Jan 2022 09:25:53 +0100 Moritz Buhl wrote: > I thought I'd walk through my understanding of the code > to make it easier to review. > > from sys/dev/ipmi.c: > > 1019 int > 1020 get_sdr(struct ipmi_softc *sc, u_int16_t recid, u_int16_t *nxtrec) > 1021 { > ... > 1046 psdr = mal

clang: compile static analyzer

2022-01-14 Thread Tobias Heider
Hi, clang ships with a pretty useful static analyzer to find all kinds of bugs in C and C++ code: https://clang-analyzer.llvm.org/ I use it regularly to check my own diffs and found plenty of bugs I could have missed otherwise. While we have the code in base we don't actually build it into our

Re: rpki-client introduce validated cache

2022-01-14 Thread Claudio Jeker
On Fri, Jan 14, 2022 at 01:45:19PM +, Job Snijders wrote: > Thanks Claudio, > > A question about stats below > > On Fri, Jan 14, 2022 at 10:29:20AM +0100, Claudio Jeker wrote: > > @@ -1246,8 +1249,8 @@ main(int argc, char *argv[]) > > logx("Certificate revocation lists: %zu", stats.crls);

Re: rpki-client introduce validated cache

2022-01-14 Thread Job Snijders
Thanks Claudio, A question about stats below On Fri, Jan 14, 2022 at 10:29:20AM +0100, Claudio Jeker wrote: > @@ -1246,8 +1249,8 @@ main(int argc, char *argv[]) > logx("Certificate revocation lists: %zu", stats.crls); > logx("Ghostbuster records: %zu", stats.gbrs); > logx("Repos

Re: rpki-client introduce validated cache

2022-01-14 Thread Theo Buehler
On Fri, Jan 14, 2022 at 10:29:20AM +0100, Claudio Jeker wrote: > On Thu, Jan 13, 2022 at 10:51:33PM +0100, Theo Buehler wrote: > > On Thu, Jan 13, 2022 at 05:05:57PM +0100, Claudio Jeker wrote: > > > This diff adds a new cache subdir called "valid". This is the place where > > > all verified and go

Re: rpki-client introduce validated cache

2022-01-14 Thread Claudio Jeker
On Thu, Jan 13, 2022 at 10:51:33PM +0100, Theo Buehler wrote: > On Thu, Jan 13, 2022 at 05:05:57PM +0100, Claudio Jeker wrote: > > This diff adds a new cache subdir called "valid". This is the place where > > all verified and good files are stored after a run. It makes -n work a lot > > better sinc

Re: possible memory leak in ipmi get_sdr

2022-01-14 Thread Moritz Buhl
I thought I'd walk through my understanding of the code to make it easier to review. from sys/dev/ipmi.c: 1019 int 1020 get_sdr(struct ipmi_softc *sc, u_int16_t recid, u_int16_t *nxtrec) 1021 { ... 1046 psdr = malloc(sdrlen, M_DEVBUF, M_NOWAIT); 1047 if (psdr == NULL) 1048