Re: What to do about tgammal?

2021-12-17 Thread Steve Kargl
On Tue, Dec 14, 2021 at 10:21:55PM +, Mark Murray wrote:
> On 14 Dec 2021, at 21:51, Steve Kargl  
> wrote:
> > Interval  max ULP  x at Max ULP
> > [6,1755.1]0.873414 at 1.480588145237629047468e+03
> > [1.0662,6]0.861508 at 1.999467927053585410537e+00
> > [1.01e-17,1.0661] 0.938041 at 1.023286481537296307856e+00
> > [-1.,-1.0001] 3.157770 at -1.246957268051453610329e+00
> > [-2.,-2.0001] 2.987659 at -2.220949465449893090070e+00
> > 
> > Note, 1.01e-17 can be reduced to soemthing like 1.01e-19 or
> 
> Extra diffs most welcome!
> 

Hi Mark,

Don't know if you noticed, but I borroewed a few cpu cycles
from grimoire.  My WIP is already better than the imprecise.c
kludge from theraven@.  I need to work out the details of 
computing logl(x) in extra precision or see if I can leverage
what Bruce did a few years ago.  Anywho, current results:

Interval tested for tgammal: [128,1755]
count: 100
  xm =  1.71195767195767195767195767195767183e+03L
libm =  7.79438030237108165017007606176403036e+4790L
mpfr =  7.79438030237108165017007606175285456e+4790L
 ULP = 14869.19517

Interval tested for tgammal: [16,128]
count: 100
  xm =  1.27687183687183687183687183687183690e+02L
libm =  6.61421998891483212224382625339007663e+212L
mpfr =  6.61421998891483212224382625338960267e+212L
 ULP = 731.00958

Interval tested for tgammal: [10,16]
count: 100
  xm =  1.54261654261654261654261654261654251e+01L
libm =  2.74203137295418912508367515208072654e+11L
mpfr =  2.74203137295418912508367515208073861e+11L
 ULP = 45.61161

Interval tested for tgammal: [1.2446e-60,10]
count: 100
  xm =  6.26200626138006138006138006138006065e-02L
libm =  1.54507103764516989381203274093299079e+01L
mpfr =  1.54507103764516989381203274093299091e+01L
 ULP = 0.76751




-- 
Steve



Re: Deprecate and remove publickey(5) stuff

2021-12-17 Thread Kubilay Kocak

On 16/12/2021 3:55 am, Emmanuel Vadot wrote:


  Hello, it's me again,

  I've posted some review some time ago but didn't follow up with some
mail so users might see it.
  I'd like to remove publickey(5) related programs, those are the only
DES users iirc and likely unused.

  https://reviews.freebsd.org/D30682
  https://reviews.freebsd.org/D30683

  I'll commit this in two weeks unless there is some valid argument to
keep this.

  Cheers,



We may not want to list every single deprecation, but:

https://wiki.freebsd.org/DeprecationPlan



Re: Panic: Page Fault in Kernel: Yesterday's CURRENT

2021-12-17 Thread Larry Rosenman

On 12/17/2021 1:36 pm, Mark Johnston wrote:

On Fri, Dec 10, 2021 at 10:43:19AM -0600, Larry Rosenman wrote:
14-2021_12_07-1217 -  -  1.87G 2021-12-07 
12:17
14-2021_12_09-1957 NR /  121G  2021-12-09 
19:57


If that's any help


I can't tell what this is saying.  A kernel built on the 7th does not
crash, or...?  Which revision did you update from before you started
seeing crashes?

From a kgdb session it'd be useful to see output from

(kgdb) frame 8
(kgdb) p/x *tmp

to start.



Correct, the 7th didn't panic, but the 9th did, and yesterday's too.

Grrr
ler in borg in /mnt on ☁️  (us-east-1)
❯ kgdb -c /var/crash/vmcore.0  /mnt/boot/kernel/kernel
GNU gdb (GDB) 11.1 [GDB v11.1 for FreeBSD]
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd14.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /mnt/boot/kernel/kernel...
(No debugging symbols found in /mnt/boot/kernel/kernel)
Failed to open vmcore: /var/crash/vmcore.0: Permission denied
(kgdb) bt
No stack.
quitb)

ler in borg in /mnt on ☁️  (us-east-1) took 6s
❯ sudo chmod +r /var/crash/*

ler in borg in /mnt on ☁️  (us-east-1)
❯ kgdb -c /var/crash/vmcore.0  /mnt/boot/kernel/kernel
GNU gdb (GDB) 11.1 [GDB v11.1 for FreeBSD]
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd14.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /mnt/boot/kernel/kernel...
(No debugging symbols found in /mnt/boot/kernel/kernel)
/wrkdirs/usr/ports/devel/gdb/work-py37/gdb-11.1/gdb/thread.c:1345: 
internal-error: void switch_to_thread(thread_info *): Assertion `thr != 
NULL' failed.

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

This is a bug, please report it.  For instructions, see:
.

/wrkdirs/usr/ports/devel/gdb/work-py37/gdb-11.1/gdb/thread.c:1345: 
internal-error: void switch_to_thread(thread_info *): Assertion `thr != 
NULL' failed.

A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
(kgdb) bt
No thread selected.
(kgdb) fr 8
No thread selected.
(kgdb)


On 12/10/2021 10:36 am, Alexander Motin wrote:
> Hi Larry,
>
> This looks like some use-after-free or otherwise corrupted callout
> structure.  Unfortunately the backtrace does not tell what was the
> callout.  When was the previous update to look what could change?
>
> On 10.12.2021 11:24, Larry Rosenman wrote:
>> FreeBSD borg.lerctr.org 14.0-CURRENT FreeBSD 14.0-CURRENT #15
>> main-n251537-ab639f2398b: Thu Dec  9 19:45:37 CST 2021
>> r...@borg.lerctr.org:/usr/obj/usr/src/amd64.amd64/sys/LER-MINIMAL 
>> amd64
>>
>> VMCORE *IS* available.
>>
>>
>>
>>
>> Unread portion of the kernel message buffer:
>> kernel trap 12 with interrupts disabled
>>
>>
>> Fatal trap 12: page fault while in kernel mode
>> cpuid = 0; apic id = 20
>> fault virtual address   = 0x0
>> fault code  = supervisor write data, page not present
>> instruction pointer = 0x20:0x804e0db4
>> stack pointer   = 0x0:0xfe0434de4e10
>> frame pointer   = 0x0:0xfe0434de4e70
>> code segment    = base 0x0, limit 0xf, type 0x1b
>>     = DPL 0, pres 1, long 1, def32 0, gran 1
>> processor eflags    = resume, IOPL = 0
>> current process = 82990 (c++)
>> trap number = 12
>> panic: page fault
>> cpuid = 0
>> time = 163998
>> KDB: stack backtrace:
>> #0 0x8050fc95 at kdb_backtrace+0x65
>> #1 0x804c468f at vpanic+0x17f
>> #2 0x804c4503 at panic+0x43
>> #3 0x807a2195 at trap_fatal+0x385
>> #4 0x807a21ef at trap_pfault+0x4f
>> #5 0x80779c78 at 

Re: Panic: Page Fault in Kernel: Yesterday's CURRENT

2021-12-17 Thread Mark Johnston
On Fri, Dec 10, 2021 at 10:43:19AM -0600, Larry Rosenman wrote:
> 14-2021_12_07-1217 -  -  1.87G 2021-12-07 12:17
> 14-2021_12_09-1957 NR /  121G  2021-12-09 19:57
> 
> If that's any help

I can't tell what this is saying.  A kernel built on the 7th does not
crash, or...?  Which revision did you update from before you started
seeing crashes?

>From a kgdb session it'd be useful to see output from

(kgdb) frame 8
(kgdb) p/x *tmp

to start.

> On 12/10/2021 10:36 am, Alexander Motin wrote:
> > Hi Larry,
> > 
> > This looks like some use-after-free or otherwise corrupted callout
> > structure.  Unfortunately the backtrace does not tell what was the
> > callout.  When was the previous update to look what could change?
> > 
> > On 10.12.2021 11:24, Larry Rosenman wrote:
> >> FreeBSD borg.lerctr.org 14.0-CURRENT FreeBSD 14.0-CURRENT #15
> >> main-n251537-ab639f2398b: Thu Dec  9 19:45:37 CST 2021
> >> r...@borg.lerctr.org:/usr/obj/usr/src/amd64.amd64/sys/LER-MINIMAL  
> >> amd64
> >> 
> >> VMCORE *IS* available.
> >> 
> >> 
> >> 
> >> 
> >> Unread portion of the kernel message buffer:
> >> kernel trap 12 with interrupts disabled
> >> 
> >> 
> >> Fatal trap 12: page fault while in kernel mode
> >> cpuid = 0; apic id = 20
> >> fault virtual address   = 0x0
> >> fault code  = supervisor write data, page not present
> >> instruction pointer = 0x20:0x804e0db4
> >> stack pointer   = 0x0:0xfe0434de4e10
> >> frame pointer   = 0x0:0xfe0434de4e70
> >> code segment    = base 0x0, limit 0xf, type 0x1b
> >>     = DPL 0, pres 1, long 1, def32 0, gran 1
> >> processor eflags    = resume, IOPL = 0
> >> current process = 82990 (c++)
> >> trap number = 12
> >> panic: page fault
> >> cpuid = 0
> >> time = 163998
> >> KDB: stack backtrace:
> >> #0 0x8050fc95 at kdb_backtrace+0x65
> >> #1 0x804c468f at vpanic+0x17f
> >> #2 0x804c4503 at panic+0x43
> >> #3 0x807a2195 at trap_fatal+0x385
> >> #4 0x807a21ef at trap_pfault+0x4f
> >> #5 0x80779c78 at calltrap+0x8
> >> #6 0x8045ddb8 at handleevents+0x188
> >> #7 0x8045ea3e at timercb+0x24e
> >> #8 0x807ca9eb at lapic_handle_timer+0x9b
> >> #9 0x8077b9b1 at Xtimerint+0xb1
> >> Uptime: 2h28m57s
> >> Dumping 12829 out of 131023
> >> MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%
> >> 
> >> __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
> >> 55  __asm("movq %%gs:%P1,%0" : "=r" (td) : "n"
> >> (offsetof(struct pcpu,
> >> (kgdb) #0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
> >> #1  doadump (textdump=)
> >>     at /usr/src/sys/kern/kern_shutdown.c:399
> >> #2  0x804c428c in kern_reboot (howto=260)
> >>     at /usr/src/sys/kern/kern_shutdown.c:487
> >> #3  0x804c46fe in vpanic (fmt=0x807e1276 "%s",
> >>     ap=) at /usr/src/sys/kern/kern_shutdown.c:920
> >> #4  0x804c4503 in panic (fmt=)
> >>     at /usr/src/sys/kern/kern_shutdown.c:844
> >> #5  0x807a2195 in trap_fatal (frame=0xfe0434de4d50, eva=0)
> >>     at /usr/src/sys/amd64/amd64/trap.c:946
> >> #6  0x807a21ef in trap_pfault (frame=0xfe0434de4d50,
> >>     usermode=false, signo=, ucode=)
> >>     at /usr/src/sys/amd64/amd64/trap.c:765
> >> #7  
> >> #8  0x804e0db4 in callout_process 
> >> (now=now@entry=38385536922300)
> >>     at /usr/src/sys/kern/kern_timeout.c:488
> >> #9  0x8045ddb8 in handleevents (now=now@entry=38385536922300,
> >>     fake=fake@entry=0) at /usr/src/sys/kern/kern_clocksource.c:213
> >> #10 0x8045ea3e in timercb (et=0x80d475e0 ,
> >>     arg=) at /usr/src/sys/kern/kern_clocksource.c:357
> >> #11 0x807ca9eb in lapic_handle_timer 
> >> (frame=0xfe0434de4f40)
> >>     at /usr/src/sys/x86/x86/local_apic.c:1364
> >> #12 
> >> #13 0x00080df42bb6 in ?? ()
> >> Backtrace stopped: Cannot access memory at address 0x7def2c90
> >> (kgdb)



Re: build failure on -current

2021-12-17 Thread Gary Jennejohn
On Fri, 17 Dec 2021 09:44:20 -0800
Chuck Tuffli  wrote:

> When building current from git, I keep hitting the error below. This
> is with meta-mode, but I've also tried deleting the object directory.
> The system also has a couple of tweaks to src-env.conf that were an
> attempt to avoid building any (most?) of clang. Relevant system
> information:
> 
> $ uname -mrsv
> FreeBSD 14.0-CURRENT FreeBSD 14.0-CURRENT main-22c4ab6cb0 GENERIC  amd64
> $ cat /etc/src-env.conf
> WITH_META_MODE=YES
> WITHOUT_CLANG=YES
> WITHOUT_CLANG_BOOTSTRAP=YES
> $ env MAKEOBJDIRPREFIX=$(realpath ../obj) make buildworld -j$(sysctl -n 
> hw.ncpu)
> 
> --- Core/ModuleList.o ---
> In file included from
> /usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/lldb/source/Core/ModuleList.cpp:34:
> In file included from
> /usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/clang/include/clang/Driver/Driver.h:12:
> In file included from
> /usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/clang/include/clang/Basic/Diagnostic.h:17:
> /usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h:71:10:
> fatal error: 'clang/Basic/DiagnosticCommonKinds.inc' file not found
> #include "clang/Basic/DiagnosticCommonKinds.inc"
>  ^~~
> 1 error generated.
> *** [Core/ModuleList.o] Error code 1
> 
> Where did I goof? TIA
> 

Do you need lldb?  If not you could try adding WITHOUT_LLDB to
src-env.conf and see what happens.

-- 
Gary Jennejohn



build failure on -current

2021-12-17 Thread Chuck Tuffli
When building current from git, I keep hitting the error below. This
is with meta-mode, but I've also tried deleting the object directory.
The system also has a couple of tweaks to src-env.conf that were an
attempt to avoid building any (most?) of clang. Relevant system
information:

$ uname -mrsv
FreeBSD 14.0-CURRENT FreeBSD 14.0-CURRENT main-22c4ab6cb0 GENERIC  amd64
$ cat /etc/src-env.conf
WITH_META_MODE=YES
WITHOUT_CLANG=YES
WITHOUT_CLANG_BOOTSTRAP=YES
$ env MAKEOBJDIRPREFIX=$(realpath ../obj) make buildworld -j$(sysctl -n hw.ncpu)

--- Core/ModuleList.o ---
In file included from
/usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/lldb/source/Core/ModuleList.cpp:34:
In file included from
/usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/clang/include/clang/Driver/Driver.h:12:
In file included from
/usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/clang/include/clang/Basic/Diagnostic.h:17:
/usr/home/ctuffli/dev/freebsd/src.git/contrib/llvm-project/clang/include/clang/Basic/DiagnosticIDs.h:71:10:
fatal error: 'clang/Basic/DiagnosticCommonKinds.inc' file not found
#include "clang/Basic/DiagnosticCommonKinds.inc"
 ^~~
1 error generated.
*** [Core/ModuleList.o] Error code 1

Where did I goof? TIA

--chuck



Re: git: 30780c3f584a - stable/13 - README.md: correct GPL expansion

2021-12-17 Thread Mark Millard via freebsd-current
From: Ed Maste  wrote on
Date: Fri, 17 Dec 2021 08:42:49 -0500 :

> On Fri, 17 Dec 2021 at 05:12, Baptiste Daroussin  wrote:
> >
> > > -gnu  Various commands and libraries under the GNU Public License.
> > > - Please see gnu/COPYING* for more information.
> > > +gnu  Various commands and libraries under the GNU General Public
> > > + License.  Please see gnu/COPYING* for more information.
> >
> > Which is wrong ;)
> >
> > There no library left under the GNU general public license, only one under 
> > LGPL
> > which will be soon gone.
> >
> > As for the commands, various is now a bit overrated, only diff3 is under GPL
> 
> Good point, in main right now we have LGPL dialog and libdialog, and
> GPL diff3, with additional ones in the stable branches.

I'm confused, beyond just LGPL claims in the (fairly
current) source code, but GPL more generally:

# grep -rl "SPDX.*GPL" /usr/main-src/
/usr/main-src/sys/compat/linuxkpi/common/include/linux/net_dim.h
/usr/main-src/sys/ofed/include/rdma/signature.h
/usr/main-src/sys/ofed/include/rdma/ib_smi.h
/usr/main-src/sys/ofed/include/rdma/rdmavt_qp.h
/usr/main-src/sys/ofed/include/rdma/opa_smi.h
. . .
/usr/main-src/sys/ofed/drivers/infiniband/util/madeye.c
/usr/main-src/sys/ofed/drivers/infiniband/core/ib_cq.c
/usr/main-src/sys/ofed/drivers/infiniband/core/ib_uverbs_uapi.c
/usr/main-src/sys/ofed/drivers/infiniband/core/ib_umem.c
. . .
/usr/main-src/sys/dev/isci/scil/sati_types.h
/usr/main-src/sys/dev/isci/scil/sati_mode_sense_10.c
/usr/main-src/sys/dev/isci/scil/sati_unmap.c
/usr/main-src/sys/dev/isci/scil/scic_sds_stp_packet_request.c
/usr/main-src/sys/dev/isci/scil/scic_sds_smp_request.h
/usr/main-src/sys/dev/isci/scil/sati_translator_sequence.h
/usr/main-src/sys/dev/isci/scil/scic_sds_stp_request.c
/usr/main-src/sys/dev/isci/scil/sati_mode_sense.c
. . .
/usr/main-src/sys/contrib/device-tree/Bindings/chrome/google,cros-ec-typec.yaml
/usr/main-src/sys/contrib/device-tree/Bindings/dsp/fsl,dsp.yaml
/usr/main-src/sys/contrib/device-tree/Bindings/reset/allwinner,sun6i-a31-clock-reset.yaml
/usr/main-src/sys/contrib/device-tree/Bindings/reset/brcm,bcm7216-pcie-sata-rescal.yaml
/usr/main-src/sys/contrib/device-tree/Bindings/reset/brcm,bcm6345-reset.yaml
/usr/main-src/sys/contrib/device-tree/Bindings/reset/brcm,bcm4908-misc-pcie-reset.yaml
. . .
/usr/main-src/sys/contrib/device-tree/include/dt-bindings/input/ti-drv260x.h
/usr/main-src/sys/contrib/device-tree/include/dt-bindings/input/gpio-keys.h
/usr/main-src/sys/contrib/device-tree/include/dt-bindings/input/cros-ec-keyboard.h
/usr/main-src/sys/contrib/device-tree/include/dt-bindings/input/input.h
/usr/main-src/sys/contrib/device-tree/include/dt-bindings/input/atmel-maxtouch.h
/usr/main-src/sys/contrib/device-tree/include/dt-bindings/input/linux-event-codes.h
. . .
/usr/main-src/sys/contrib/device-tree/COPYING
/usr/main-src/sys/contrib/device-tree/src/openrisc/or1klitex.dts
/usr/main-src/sys/contrib/device-tree/src/openrisc/or1ksim.dts
/usr/main-src/sys/contrib/device-tree/src/xtensa/lx200mx.dts
/usr/main-src/sys/contrib/device-tree/src/xtensa/kc705_nommu.dts
/usr/main-src/sys/contrib/device-tree/src/xtensa/ml605.dts
/usr/main-src/sys/contrib/device-tree/src/xtensa/virt.dts
/usr/main-src/sys/contrib/device-tree/src/xtensa/csp.dts
. . .
/usr/main-src/sys/contrib/dev/iwlwifi/iwl-op-mode.h
/usr/main-src/sys/contrib/dev/iwlwifi/iwl-io.h
/usr/main-src/sys/contrib/dev/iwlwifi/iwl-fh.h
/usr/main-src/sys/contrib/dev/iwlwifi/iwl-eeprom-read.c
/usr/main-src/sys/contrib/dev/iwlwifi/fw/dbg.h
/usr/main-src/sys/contrib/dev/iwlwifi/fw/pnvm.c
. . .
/usr/main-src/sys/fs/fuse/fuse_kernel.h
/usr/main-src/sys/gnu/gcov/gcc_4_7.c
/usr/main-src/sys/gnu/gcov/gcov_fs.c
/usr/main-src/sys/dts/arm/qcom-ipq4018-rt-ac58u.dts
/usr/main-src/sys/dts/include/dt-bindings/soc/qcom,tcsr.h
/usr/main-src/sys/cam/scsi/scsi_ses.h
/usr/main-src/sys/cam/scsi/scsi_enc.h
/usr/main-src/share/man/man4/pvscsi.4
/usr/main-src/share/man/man4/vmci.4


For reference:

# cd /usr/main-src/
# ~/fbsd-based-on-what-commit.sh 
branch: main
merge-base: 22c4ab6cb015dc99eb82504e5fd957662cded3c3
merge-base: CommitDate: 2021-12-07 19:29:26 +
22c4ab6cb015 (HEAD -> main, freebsd/main, freebsd/HEAD) sys/_bitset.h: Fix 
fall-out from commit 5e04571cf3c
n251456 (--first-parent --count for merge-base)

===
Mark Millard
marklmi at yahoo.com