Re: Tunnelling IPv4 over IPv6 for GitHub access?

2015-11-03 Thread Michael Gmelin
On Mon, 2 Nov 2015 19:29:39 -0800
Craig Rodrigues  wrote:

> On Mon, Nov 2, 2015 at 3:50 PM, Michael Gmelin 
> wrote:
> >
> >
> >
> > On Mon, 2 Nov 2015 14:04:18 -0800
> >
> > ikvjwd.com once offered a service using haproxy, you can find their
> > configuration here:
> >
> >
> https://github.com/rcsheets/ikvjwd/commit/58979dcaf42fbbd9203067a6ba4629ba01469120
> >
> 
> We were using ikvjwd.com, but that service did not seem to be very
> reliable.
> 
> 
> >
> > Another way to tunnel all IPv4 traffic is set up an OpenVPN server
> > on a dual stack machine and route your client IPv4 traffic over it
> > (that approach is actually very easy to accomplish, stable and will
> > work with any service).
> >
> 
> Can you point me to some docs for how to do this?  This could work
> for me.
> 
> I have two separate networks that are connected:
> 
> +--+   +--+
> |  |   |  |
> |  |   |  |
> |Dual  +-> |   IPv6   |
> |stack |   |   only   |
> |  |   |  |
> +--+   +--+
> 
> 
> My machine is in the IPv6 only network, but it has access to
> a dual stack network.  I still need to run my stuff which accesses
> GitHub in the IPv6 only network.

Basic guide for a point to point connection (this assumes that the
client machine on your IPv6 only network still has an IPv4 stack in
the kernel - also, if all you want is proxying one website [github
http], setting up a proxy might make more sense):

Install and enable openvpn on both machines

pkg install openvpn
setrc openvpn_enable=YES

Example config side A (client):

Fixed tunnel interface in rc.conf (so you can use tun8 in firewall
rules 

cloned_interfaces="tun8"
ifconfig_tun8="inet 10.10.10.1 10.10.10.2"

/usr/local/etc/openvpn.conf:

tls-client
dev tun8
verb 3
remote hostnameOrIpv6AddressToConnectTo 1294
proto udp6
ca   /usr/local/etc/openvpn/ca.crt
cert /usr/local/etc/openvpn/client.crt
key  /usr/local/etc/openvpn/client.key
tls-auth /usr/local/etc/openvpn/ta.key 1

ifconfig 10.10.10.1 10.10.10.2

# add IPv4 networks you want to route over the tunnel
# you can also use static routed in rc.conf instead
# or push the routes from the server side:
route 141.1.1.0 255.255.255.0

keepalive 10 60
ping-timer-rem
user nobody
group nobody
persist-key
persist-tun
daemon

tun-mtu-extra 6

Example server side B (dual stack in your case):

Fixed tunnel interface in rc.conf (so you can use tun8 in firewall
rules 

cloned_interfaces="tun8"
ifconfig_tun8="inet 10.10.10.2 10.10.10.1"

/usr/local/etc/openvpn.conf:


tls-server
dev tun8
verb 3
local IpV6AddressToListenTo
port 1294
proto udp6
ca   /usr/local/etc/openvpn/ca.crt
cert /usr/local/etc/openvpn/server.crt
key  /usr/local/etc/openvpn/server.key
dh   /usr/local/etc/openvpn/dh4096.pem
tls-auth /usr/local/etc/openvpn/ta.key 0

ifconfig 10.10.10.2 10.10.10.1
# routes to send the other direction (optional)
# ...

keepalive 10 60
ping-timer-rem
user nobody
group nobody
persist-key
persist-tun
daemon

tun-mtu-extra 6



tun-mtu-extra was required in my setup, you might not need it.

tls-auth is optional (it allows openvpn to hide, which you probably
won't need on your local network).

If you don't want to create a set of certificates and/or security is
secondary, you can save yourself the work of creating all the
certificates and replace it with a static shared secret. In this case
ca cert key can be removed and replaced with "secret filename".
filename is generated using "openvpn --genkey --secret filename".

You then need some firewall rule to NAT the traffic that comes over the
tunnel on the server side.

If you have multiple clients, it's better to switch to an address pool
(e.g. server 10.8.0.0 255.255.255.0). In that case I would recommend to
push all relevant routes to the client (push "route ip netmask" in the
server config) and not bother to use a fixed tunnel interface on
the client side (so no entry in rc.conf and change "tun8" to "tun" in
the client configuration).

It's really not as complicated as my description makes it look like :p

You can find plenty of examples on openvpn.net, including a long
example configuration that details all options:
https://openvpn.net/index.php/open-source/documentation/howto.html#examples

There are plenty of howtos out there. I've been using this for a few
years now to circumvent a broken DS-LITE gateway outbound and allow
IPv4 connectivity inbound, it's stable and performs well.

- Michael


-- 
Michael Gmelin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


FreeBSD_HEAD_i386 - Build #1579 - Failure

2015-11-03 Thread jenkins-admin
FreeBSD_HEAD_i386 - Build #1579 - Failure:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/1579/
Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/1579/changes
Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/1579/console

Change summaries:

290327 by hselasky:
Fix some clang compile warnings.

MFC after:  1 week

290326 by hselasky:
Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising
allocation of DMA bounce buffers.

Discussed with: ian @
MFC after:  3 weeks



The end of the build log:

[...truncated 189724 lines...]
--- all_subdir_usie ---
===> usb/usie (all)
--- all_subdir_uath ---
--- if_uath.ko.debug ---
objcopy --only-keep-debug if_uath.ko.full if_uath.ko.debug
--- if_uath.ko ---
objcopy --strip-debug --add-gnu-debuglink=if_uath.ko.debug  if_uath.ko.full 
if_uath.ko
--- all_subdir_vmware ---
===> vmware (all)
--- all ---
===> vmware/vmxnet3 (all)
--- all_subdir_sound ---
--- driver.o ---
cc  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   
-DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h 
-I. -I/usr/src/sys -fno-common -g -I/usr/obj/usr/src/sys/GENERIC  -mno-mmx 
-mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-unknown-pragmas  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality -Wno-error-unused-function  
-Wno-error-pointer-sign -Wno-error-shift-negative-value  -mno-aes -mno-avx  
-std=iso9899:1999 -c 
/usr/src/sys/modules/sound/driver/driver/../../../../dev/sound/driver.c -o 
driver.o
--- all_subdir_usb ---
--- all_subdir_usie ---
--- if_usie.o ---
cc  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   
-DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h 
-I. -I/usr/src/sys -fno-common -g -I/usr/obj/usr/src/sys/GENERIC  -mno-mmx 
-mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-unknown-pragmas  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality -Wno-error-unused-function  
-Wno-error-pointer-sign -Wno-error-shift-negative-value  -mno-aes -mno-avx  
-std=iso9899:1999 -c 
/usr/src/sys/modules/usb/usie/../../../dev/usb/net/if_usie.c -o if_usie.o
--- all_subdir_vmware ---
--- if_vmx.o ---
cc  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   
-DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/GENERIC/opt_global.h 
-I. -I/usr/src/sys -fno-common -g -I/usr/obj/usr/src/sys/GENERIC  -mno-mmx 
-mno-sse -msoft-float -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-unknown-pragmas  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality -Wno-error-unused-function  
-Wno-error-pointer-sign -Wno-error-shift-negative-value  -mno-aes -mno-avx  
-std=iso9899:1999 -c 
/usr/src/sys/modules/vmware/vmxnet3/../../../dev/vmware/vmxnet3/if_vmx.c -o 
if_vmx.o
--- all_subdir_usb ---
--- all_subdir_upgt ---
ctfconvert -L VERSION -g if_upgt.o
--- all_subdir_sound ---
ctfconvert -L VERSION -g driver.o
--- all_subdir_usb ---
--- if_upgt.kld ---
ld -d -warn-common -r -d -o if_upgt.kld if_upgt.o
--- all_subdir_sound ---
--- snd_driver.kld ---
ld -d -warn-common -r -d -o snd_driver.kld driver.o
--- all_subdir_usb ---
ctfmerge -L VERSION -g -o if_upgt.kld if_upgt.o
--- all_subdir_sound ---
ctfmerge -L VERSION -g -o snd_driver.kld driver.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk snd_driver.kld  export_syms | xargs -J% 
objcopy % snd_driver.kld
--- snd_driver.ko.full ---
ld -Bshareable -d -warn-common -o snd_driver.ko.full snd_driver.kld
--- snd_driver.ko.debug ---
objcopy --only-keep-debug snd_driver.ko.full snd_driver.ko.debug
--- snd_driver.ko ---
objcopy --strip-debug --add-gnu-debuglink=snd_driver.ko.debug  
snd_driver.ko.full snd_driver.ko
--- all_subdir_usb ---
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk if_upgt.kld  export_syms | xargs -J% 
objcopy % if_upgt.kld
--- all_subdir_sound ---
===> sound/driver/uaudio (all)
--- all_subdir_usb ---
--- if_upgt.ko.full ---
ld -Bshareable -d -warn-common -o if_upgt.ko.full if_upgt.kld
--- if_upgt.ko.debug ---
objcopy --only-keep-debug if_upgt.ko.full if_upgt.ko.debug
--- if_upgt.ko 

FreeBSD_HEAD - Build #3469 - Failure

2015-11-03 Thread jenkins-admin
FreeBSD_HEAD - Build #3469 - Failure:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/3469/
Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/3469/changes
Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/3469/console

Change summaries:

290327 by hselasky:
Fix some clang compile warnings.

MFC after:  1 week

290326 by hselasky:
Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising
allocation of DMA bounce buffers.

Discussed with: ian @
MFC after:  3 weeks



The end of the build log:

[...truncated 297695 lines...]
objcopy --only-keep-debug snd_sb8.ko.full snd_sb8.ko.debug
--- snd_sb8.ko ---
objcopy --strip-debug --add-gnu-debuglink=snd_sb8.ko.debug  snd_sb8.ko.full 
snd_sb8.ko
===> sound/driver/sbc (all)
--- all_subdir_usb ---
:> export_syms
awk -f /builds/FreeBSD_HEAD/sys/conf/kmod_syms.awk if_upgt.ko.full  export_syms 
| xargs -J% objcopy % if_upgt.ko.full
--- if_upgt.ko.debug ---
objcopy --only-keep-debug if_upgt.ko.full if_upgt.ko.debug
--- if_upgt.ko ---
objcopy --strip-debug --add-gnu-debuglink=if_upgt.ko.debug  if_upgt.ko.full 
if_upgt.ko
--- all_subdir_usie ---
===> usb/usie (all)
--- all_subdir_sound ---
--- sbc.o ---
cc  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   
-DHAVE_KERNEL_OPTION_HEADERS -include 
/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/sys/GENERIC/opt_global.h -I. 
-I/builds/FreeBSD_HEAD/sys -fno-common -g -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer 
-I/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/sys/GENERIC  -mcmodel=kernel 
-mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables 
-ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-unknown-pragmas  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality -Wno-error-unused-function  
-Wno-error-pointer-sign -Wno-error-shift-negative-value  -mno-aes -mno-avx  
-std=iso9899:1999 -c /builds/FreeBSD_HEAD/sys/modules/sound/dri
 ver/sbc/../../../../dev/sound/isa/sbc.c -o sbc.o
--- all_subdir_usb ---
--- if_usie.o ---
cc  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   
-DHAVE_KERNEL_OPTION_HEADERS -include 
/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/sys/GENERIC/opt_global.h -I. 
-I/builds/FreeBSD_HEAD/sys -fno-common -g -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer 
-I/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/sys/GENERIC  -mcmodel=kernel 
-mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables 
-ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-unknown-pragmas  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality -Wno-error-unused-function  
-Wno-error-pointer-sign -Wno-error-shift-negative-value  -mno-aes -mno-avx  
-std=iso9899:1999 -c /builds/FreeBSD_HEAD/sys/modules/usb/usie/
 ../../../dev/usb/net/if_usie.c -o if_usie.o
--- all_subdir_vmm ---
ctfconvert -L VERSION -g vmx_msr.o
--- vtd.o ---
cc  -O2 -pipe  -DVMM_KEEP_STATS -DSMP -fno-strict-aliasing -Werror -D_KERNEL 
-DKLD_MODULE -nostdinc  -I/builds/FreeBSD_HEAD/sys/modules/vmm/../../amd64/vmm 
-I/builds/FreeBSD_HEAD/sys/modules/vmm/../../amd64/vmm/io 
-I/builds/FreeBSD_HEAD/sys/modules/vmm/../../amd64/vmm/intel 
-I/builds/FreeBSD_HEAD/sys/modules/vmm/../../amd64/vmm/amd 
-DHAVE_KERNEL_OPTION_HEADERS -include 
/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/sys/GENERIC/opt_global.h -I. 
-I/builds/FreeBSD_HEAD/sys -fno-common -g -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer 
-I/builds/FreeBSD_HEAD/obj/builds/FreeBSD_HEAD/sys/GENERIC  -mcmodel=kernel 
-mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables 
-ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall -Wredundant-decls 
-Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs 
-fdiagnostics-show-option  -Wno-unknown-pragmas 
  -Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality -Wno-error-unused-function  
-Wno-error-pointer-sign -Wno-error-shift-negative-value  -mno-aes -mno-avx  
-std=iso9899:1999 -c 
/builds/FreeBSD_HEAD/sys/modules/vmm/../../amd64/vmm/intel/vtd.c -o vtd.o
ctfconvert -L VERSION -g vtd.o
--- vmcb.o ---
cc  -O2 -pipe  -DVMM_KEEP_STATS -DSMP -fno-strict-aliasing -Werror -D_KERNEL 
-DKLD_MODULE -nostdinc  -I/builds/FreeBSD_HEAD/sys/modules/vmm/../../amd64/vmm 
-I/builds/FreeBSD_HEAD/sys/modules/vmm/../../

Re: Quick test building a module cross all targets and architectures

2015-11-03 Thread Hans Petter Selasky

On 10/27/15 17:16, Hans Petter Selasky wrote:

On 10/27/15 16:49, John Baldwin wrote:

  With MAKE_JUST_WORLDS you would only build
a "generic" module once per architecture.  That savings is likely far
more
than the cost of the additional tools.


I will try it out. Thanks for your hints and tips.



Hi,

Running:

make buildworld TARGET=arm TARGET_ARCH=armv6 MAKE_JUST_WORLDS=yes 
SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=linuxkpi -DNO_CLEAN


I get:


--

stage 4.4: building everything

--
cd /usr/img/freebsd; MAKEOBJDIRPREFIX=/usr/obj/arm.armv6  MACHINE_ARCH=armv6  MACHINE=arm  CPUTYPE= GROFF_BIN_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bin  
GROFF_FONT_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/share/tmac  _LDSCRIPTROOT=  
INSTALL="sh /usr/img/freebsd/tools/install.sh"  
PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/sbin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/bin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/usr/sbin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin
 CC="cc " CXX="c++  "  DEPFLAGS=""  CPP="cpp "  AS="as" AR="ar" LD="ld" NM=nm  OBJDUMP=objdump 
OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=  SIZE="size" make  -f Makefile.inc1 DESTDIR=/usr/obj/arm.armv6/usr/img/freebsd/tmp par-all
===> sys/modules (all)
===> sys/modules/linuxkpi (all)
cc  -O -pipe -mfloat-abi=softfp  -Werror -D_KERNEL -DKLD_MODULE -nostdinc  
-I/usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/include 
-I. -I/usr/img/freebsd/sys/modules/linuxkpi/../.. -fno-common  -funwind-tables  
-ffreestanding -fwrapv -Wall -Wredundant-decls -Wnested-externs 
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  
-Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__  
-Wmissing-include-dirs -fdiagnostics-show-option  -Wno-unknown-pragmas  
-Wno-error-tautological-compare -Wno-error-empty-body  
-Wno-error-parentheses-equality -Wno-error-unused-function  
-Wno-error-pointer-sign -Wno-error-shift-negative-value  -mllvm -arm-use-movt=0 
-mfpu=none  -std=iso9899:1999 -c 
/usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c
 -o linux_compat.o
In file included from 
/usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/src/linux_compat.c:38:
In file included from /usr/img/freebsd/sys/modules/linuxkpi/../../sys/proc.h:66:
In file included from 
/usr/img/freebsd/sys/modules/linuxkpi/../../sys/_vm_domain.h:34:
In file included from /usr/img/freebsd/sys/modules/linuxkpi/../../sys/seq.h:70:
./machine/cpu.h:22:9: error: implicit declaration of function 
'cp15_pmccntr_get' is invalid in C99
  [-Werror,-Wimplicit-function-declaration]
return cp15_pmccntr_get();
   ^
1 error generated.
*** Error code 1


And when running:

make -DNO_CLEAN -j6 universe MAKE_JUST_KERNELS=yes MODULES_OVERRIDE=linuxkpi

With my "sys/conf/kern.post.mk" patch, it passes all the variants.


Is this the expected behaviour or a bug somewhere?


--HPS
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


FreeBSD_HEAD_i386 - Build #1580 - Fixed

2015-11-03 Thread jenkins-admin
FreeBSD_HEAD_i386 - Build #1580 - Fixed:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/1580/
Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/1580/changes
Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/1580/console

Change summaries:

290334 by ae:
Eliminate any conditional increments of object_opcodes in the
check_ipfw_rule_body() function. This function is intended to just
determine that rule has some opcodes that can be rewrited. Then the
ref_rule_objects() function will determine real number of rewritten
opcodes using classify callback.

Reviewed by:melifaro
Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

290332 by ae:
Add ipfw_check_object_name_generic() function to do basic checks for an
object name correctness. Each type of object can do more strict checking
in own implementation. Do such checks for tables in check_table_name().

Reviewed by:melifaro
Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

290330 by ae:
Implement `ipfw internal olist` command to list named objects.

Reviewed by:melifaro
Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

290329 by ache:
Use meaningful errno for ssize_t overflow in read().
Catch size_t overflow in malloc().

PR: 204230
MFC after:  1 week

290328 by hselasky:
Revert r290327. The compiler warnings seems to be specific to clang v3.5 only.

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


panic: refcount inconsistency: found: 0 total: 1

2015-11-03 Thread David Wolfskill
This was on my laptop; yesterday, it built & booted:

FreeBSD g1-252.catwhisker.org 11.0-CURRENT FreeBSD 11.0-CURRENT #230  
r290270M/290270:1100085: Mon Nov  2 05:03:07 PST 2015 
r...@g1-252.catwhisker.org:/common/S4/obj/usr/src/sys/CANARY  amd64


OK; today, after building:

FreeBSD localhost 11.0-CURRENT FreeBSD 11.0-CURRENT #231  
r290334M/290334:1100086: Tue Nov  3 04:51:24 PST 2015 
r...@g1-252.catwhisker.org:/common/S4/obj/usr/src/sys/CANARY  amd64


I tried booting it, and during the transition to multi-user mode,
once ipfw was being invoked, I got the above-cited panic.  Circumvention
was to leave it disconnected from a network (turn off the WiFi
switch, in my case), so we don't get a chance to use the network.

I was able to get a dump by explicitly typing "call doadump" -- an
earlier attempt at "panic" didn't capture one.  Stack trace:

#0  doadump (textdump=0) at pcpu.h:221
221 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) #0  doadump (textdump=0) at pcpu.h:221
#1  0x8037b6b6 in db_fncall (dummy1=, 
dummy2=, dummy3=, 
dummy4=) at /usr/src/sys/ddb/db_command.c:568
#2  0x8037b14e in db_command (cmd_table=0x0)
at /usr/src/sys/ddb/db_command.c:440
#3  0x8037aee4 in db_command_loop ()
at /usr/src/sys/ddb/db_command.c:493
#4  0x8037d97b in db_trap (type=, code=0)
at /usr/src/sys/ddb/db_main.c:251
#5  0x80a270f3 in kdb_trap (type=3, code=0, tf=)
at /usr/src/sys/kern/subr_kdb.c:654
#6  0x80db6668 in trap (frame=0xfe060bdde1d0)
at /usr/src/sys/amd64/amd64/trap.c:549
#7  0x80d961f7 in calltrap ()
at /usr/src/sys/amd64/amd64/exception.S:234
#8  0x80a267db in kdb_enter (why=0x812a5566 "panic", 
msg=0x80 ) at cpufunc.h:63
#9  0x809ea01f in vpanic (fmt=, 
ap=) at /usr/src/sys/kern/kern_shutdown.c:750
#10 0x809e9e76 in kassert_panic (fmt=)
at /usr/src/sys/kern/kern_shutdown.c:647
#11 0x80c2a788 in ipfw_rewrite_rule_uidx (chain=0x81be5310, 
ci=0xfe060bdde4b8) at /usr/src/sys/netpfil/ipfw/ip_fw_table.c:3395
#12 0x80c267c3 in commit_rules (chain=0x81be5310, 
rci=0xfe060bdde4b8, count=1)
at /usr/src/sys/netpfil/ipfw/ip_fw_sockopt.c:678
#13 0x80c25d80 in add_rules (chain=0x81be5310, 
op3=, sd=)
at /usr/src/sys/netpfil/ipfw/ip_fw_sockopt.c:2594
#14 0x80c232f4 in ipfw_ctl3 (sopt=0xfe060bdde920)
at /usr/src/sys/netpfil/ipfw/ip_fw_sockopt.c:3242
#15 0x80b3d8b1 in rip_ctloutput (so=, 
sopt=0xfe060bdde920) at /usr/src/sys/netinet/raw_ip.c:588
#16 0x80a72bc6 in sogetopt (so=0xf80009e658b8, 
sopt=0xfe060bdde920) at /usr/src/sys/kern/uipc_socket.c:2731
#17 0x80a7729e in kern_getsockopt (td=0xf800098119a0, 
s=, level=, 
name=, val=, valseg=464, 
valsize=0xfe060bdde98c) at /usr/src/sys/kern/uipc_syscalls.c:1540
#18 0x80a771a0 in sys_getsockopt (td=0xf800098119a0, 
uap=0xfe060bddea40) at /usr/src/sys/kern/uipc_syscalls.c:1486
#19 0x80db7519 in amd64_syscall (td=0xf800098119a0, traced=0)
at subr_syscall.c:140
#20 0x80d964db in Xfast_syscall ()
at /usr/src/sys/amd64/amd64/exception.S:394
#21 0x000800b2cbea in ?? ()
Previous frame inner to this frame (corrupt stack?)
Current language:  auto; currently minimal
(kgdb) 

I've copied the vmcore.z & core.txt.7 to
; gzipped
copies are also available:

Index of /~david/FreeBSD/head/ipfw

 Icon   NameLast modified  Size  Description
  _
 [PARENTDIR]  Parent Directory -
 [TXT]  core.txt.7  2015-11-03 05:22  155K
 [   ]  core.txt.7.gz   2015-11-03 05:22   35K
 [   ]  vmcore.72015-11-03 05:22  528M
 [   ]  vmcore.7.gz 2015-11-03 05:22   45M
  _


I'll start taking a closer look at recent changes (e.g., in
src/sys/netpfil/ipfw), but I'm not really all that familiar with
the code.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


FreeBSD_HEAD - Build #3470 - Fixed

2015-11-03 Thread jenkins-admin
FreeBSD_HEAD - Build #3470 - Fixed:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/3470/
Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/3470/changes
Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD/3470/console

Change summaries:

290334 by ae:
Eliminate any conditional increments of object_opcodes in the
check_ipfw_rule_body() function. This function is intended to just
determine that rule has some opcodes that can be rewrited. Then the
ref_rule_objects() function will determine real number of rewritten
opcodes using classify callback.

Reviewed by:melifaro
Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

290332 by ae:
Add ipfw_check_object_name_generic() function to do basic checks for an
object name correctness. Each type of object can do more strict checking
in own implementation. Do such checks for tables in check_table_name().

Reviewed by:melifaro
Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

290330 by ae:
Implement `ipfw internal olist` command to list named objects.

Reviewed by:melifaro
Obtained from:  Yandex LLC
Sponsored by:   Yandex LLC

290329 by ache:
Use meaningful errno for ssize_t overflow in read().
Catch size_t overflow in malloc().

PR: 204230
MFC after:  1 week

290328 by hselasky:
Revert r290327. The compiler warnings seems to be specific to clang v3.5 only.

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: [CFT] Unicode collation string and reworked locale definitions

2015-11-03 Thread Pedro Giffuni
Hi Baptiste;

> Il giorno 03/nov/2015, alle ore 02:17, Baptiste Daroussin  
> ha scritto:
> 
> On Mon, Nov 02, 2015 at 06:59:15PM -0500, Pedro Giffuni wrote:
>> First of all, congratulations to Baptiste and Marino for succeeding where
>> I failed many moons ago. Also huge thanks to Nexenta and Garret D’Amore
>> for relicensing localedef for us.
>> 
>> Concerning regex;
>> 
>> Gabor@ did a lot of work on libtre but according to him it was not up to the
>> task performancewise. We would also lose features if we move to libtre.
>> 
>> I think our regex code actually has most of what is needed for multibyte
>> already. I have a patch that turns on the functionality but I haven’t found
>> any brave soul that will do the testing:
>> 
>> https://people.freebsd.org/~pfg/patches/regex-multibyte.diff
>> 
> I think it this can be tested once the collation branch is merged.

Absolutely: support for collation is critical and badly needed even without
resolving the regex issues.

> Note that
> dragonfly and musl libc both uses a patched version of libtre for the regex
> implementation.
> 

I am aware. Also note that Gabor had some patches too, in order to make
it usable for bsdgrep:

https://wiki.freebsd.org/Regex

> From my non scientific testing libtre was more reliable and performant then 
> our
> current regex.

According to Gabor, the general performance was better until you take into
account multibyte support where it was clearly inferior to GNU regex.

> Anyway it will be relatively "easy" to test using the AT&T
> testsuite the reliability and performance of both implementations: ours + your
> patch and patched libtre.
> 


What worries me about libtre is that it lacks important functionality like word
delimiters. We even brought the sysv delimiters to be more compatible with
Solaris and GNU and we can’t back those out now:

https://svnweb.freebsd.org/base?view=revision&revision=268066

Pedro.


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: panic: refcount inconsistency: found: 0 total: 1

2015-11-03 Thread Alexander V . Chernikov
03.11.2015, 17:05, "David Wolfskill" :
> This was on my laptop; yesterday, it built & booted:
>
> FreeBSD g1-252.catwhisker.org 11.0-CURRENT FreeBSD 11.0-CURRENT #230 
> r290270M/290270:1100085: Mon Nov 2 05:03:07 PST 2015 
> r...@g1-252.catwhisker.org:/common/S4/obj/usr/src/sys/CANARY amd64
>
> OK; today, after building:
>
> FreeBSD localhost 11.0-CURRENT FreeBSD 11.0-CURRENT #231 
> r290334M/290334:1100086: Tue Nov 3 04:51:24 PST 2015 
> r...@g1-252.catwhisker.org:/common/S4/obj/usr/src/sys/CANARY amd64
>
> I tried booting it, and during the transition to multi-user mode,
> once ipfw was being invoked, I got the above-cited panic. Circumvention
> was to leave it disconnected from a network (turn off the WiFi
> switch, in my case), so we don't get a chance to use the network.
It is most probably related with r290334. Would you mind reverting it and 
checking if ipfw works correctly ?

>
> I was able to get a dump by explicitly typing "call doadump" -- an
> earlier attempt at "panic" didn't capture one. Stack trace:
>
> #0 doadump (textdump=0) at pcpu.h:221
> 221 pcpu.h: No such file or directory.
> in pcpu.h
> (kgdb) #0 doadump (textdump=0) at pcpu.h:221
> #1 0x8037b6b6 in db_fncall (dummy1=,
> dummy2=, dummy3=,
> dummy4=) at /usr/src/sys/ddb/db_command.c:568
> #2 0x8037b14e in db_command (cmd_table=0x0)
> at /usr/src/sys/ddb/db_command.c:440
> #3 0x8037aee4 in db_command_loop ()
> at /usr/src/sys/ddb/db_command.c:493
> #4 0x8037d97b in db_trap (type=, code=0)
> at /usr/src/sys/ddb/db_main.c:251
> #5 0x80a270f3 in kdb_trap (type=3, code=0, tf=)
> at /usr/src/sys/kern/subr_kdb.c:654
> #6 0x80db6668 in trap (frame=0xfe060bdde1d0)
> at /usr/src/sys/amd64/amd64/trap.c:549
> #7 0x80d961f7 in calltrap ()
> at /usr/src/sys/amd64/amd64/exception.S:234
> #8 0x80a267db in kdb_enter (why=0x812a5566 "panic",
> msg=0x80 ) at cpufunc.h:63
> #9 0x809ea01f in vpanic (fmt=,
> ap=) at /usr/src/sys/kern/kern_shutdown.c:750
> #10 0x809e9e76 in kassert_panic (fmt=)
> at /usr/src/sys/kern/kern_shutdown.c:647
> #11 0x80c2a788 in ipfw_rewrite_rule_uidx (chain=0x81be5310,
> ci=0xfe060bdde4b8) at /usr/src/sys/netpfil/ipfw/ip_fw_table.c:3395
> #12 0x80c267c3 in commit_rules (chain=0x81be5310,
> rci=0xfe060bdde4b8, count=1)
> at /usr/src/sys/netpfil/ipfw/ip_fw_sockopt.c:678
> #13 0x80c25d80 in add_rules (chain=0x81be5310,
> op3=, sd=)
> at /usr/src/sys/netpfil/ipfw/ip_fw_sockopt.c:2594
> #14 0x80c232f4 in ipfw_ctl3 (sopt=0xfe060bdde920)
> at /usr/src/sys/netpfil/ipfw/ip_fw_sockopt.c:3242
> #15 0x80b3d8b1 in rip_ctloutput (so=,
> sopt=0xfe060bdde920) at /usr/src/sys/netinet/raw_ip.c:588
> #16 0x80a72bc6 in sogetopt (so=0xf80009e658b8,
> sopt=0xfe060bdde920) at /usr/src/sys/kern/uipc_socket.c:2731
> #17 0x80a7729e in kern_getsockopt (td=0xf800098119a0,
> s=, level=,
> name=, val=, valseg=464,
> valsize=0xfe060bdde98c) at /usr/src/sys/kern/uipc_syscalls.c:1540
> #18 0x80a771a0 in sys_getsockopt (td=0xf800098119a0,
> uap=0xfe060bddea40) at /usr/src/sys/kern/uipc_syscalls.c:1486
> #19 0x80db7519 in amd64_syscall (td=0xf800098119a0, traced=0)
> at subr_syscall.c:140
> #20 0x80d964db in Xfast_syscall ()
> at /usr/src/sys/amd64/amd64/exception.S:394
> #21 0x000800b2cbea in ?? ()
> Previous frame inner to this frame (corrupt stack?)
> Current language: auto; currently minimal
> (kgdb)
>
> I've copied the vmcore.z & core.txt.7 to
> ; gzipped
> copies are also available:
>
> Index of /~david/FreeBSD/head/ipfw
>
>  Icon Name Last modified Size Description
>   _
>  [PARENTDIR] Parent Directory -
>  [TXT] core.txt.7 2015-11-03 05:22 155K
>  [ ] core.txt.7.gz 2015-11-03 05:22 35K
>  [ ] vmcore.7 2015-11-03 05:22 528M
>  [ ] vmcore.7.gz 2015-11-03 05:22 45M
>   _
>
> I'll start taking a closer look at recent changes (e.g., in
> src/sys/netpfil/ipfw), but I'm not really all that familiar with
> the code.
>
> Peace,
> david
> --
> David H. Wolfskill da...@catwhisker.org
> Those who would murder in the name of God or prophet are blasphemous cowards.
>
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: Quick test building a module cross all targets and architectures

2015-11-03 Thread Ian Lepore
On Tue, 2015-11-03 at 13:24 +0100, Hans Petter Selasky wrote:
> On 10/27/15 17:16, Hans Petter Selasky wrote:
> > On 10/27/15 16:49, John Baldwin wrote:
> > >   With MAKE_JUST_WORLDS you would only build
> > > a "generic" module once per architecture.  That savings is likely
> > > far
> > > more
> > > than the cost of the additional tools.
> > 
> > I will try it out. Thanks for your hints and tips.
> > 
> 
> Hi,
> 
> Running:
> 
> make buildworld TARGET=arm TARGET_ARCH=armv6 MAKE_JUST_WORLDS=yes 
> SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=linuxkpi -DNO_CLEAN
> 
> I get:
> 
> > --
> > > > > stage 4.4: building everything
> > --
> > cd /usr/img/freebsd; MAKEOBJDIRPREFIX=/usr/obj/arm.armv6 
> >  MACHINE_ARCH=armv6  MACHINE=arm  CPUTYPE=
> > GROFF_BIN_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bi
> > n 
> >  GROFF_FONT_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/
> > share/groff_font 
> >  GROFF_TMAC_PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/
> > share/tmac  _LDSCRIPTROOT=  INSTALL="sh
> > /usr/img/freebsd/tools/install.sh" 
> >  PATH=/usr/obj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/sbin:/usr/o
> > bj/arm.armv6/usr/img/freebsd/tmp/legacy/usr/bin:/usr/obj/arm.armv6/
> > usr/img/freebsd/tmp/legacy/bin:/usr/obj/arm.armv6/usr/img/freebsd/t
> > mp/usr/sbin:/usr/obj/arm.armv6/usr/img/freebsd/tmp/usr/bin:/sbin:/b
> > in:/usr/sbin:/usr/bin CC="cc " CXX="c++  "  DEPFLAGS=""  CPP="cpp "
> >   AS="as" AR="ar" LD="ld" NM=nm  OBJDUMP=objdump OBJCOPY="objcopy" 
> >  RANLIB=ranlib STRINGS=  SIZE="size" make  -f Makefile.inc1
> > DESTDIR=/usr/obj/arm.armv6/usr/img/freebsd/tmp par-all
> > ===> sys/modules (all)
> > ===> sys/modules/linuxkpi (all)
> > cc  -O -pipe -mfloat-abi=softfp  -Werror -D_KERNEL -DKLD_MODULE 
> > -nostdinc  
> > -I/usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/commo
> > n/include -I. -I/usr/img/freebsd/sys/modules/linuxkpi/../.. -fno
> > -common  -funwind-tables  -ffreestanding -fwrapv -Wall -Wredundant
> > -decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes 
> > -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
> > -D__printf__=__freebsd_kprintf__  -Wmissing-include-dirs 
> > -fdiagnostics-show-option  -Wno-unknown-pragmas  -Wno-error
> > -tautological-compare -Wno-error-empty-body  -Wno-error-parentheses
> > -equality -Wno-error-unused-function  -Wno-error-pointer-sign -Wno
> > -error-shift-negative-value  -mllvm -arm-use-movt=0 -mfpu=none  
> > -std=iso9899:1999 -c
> > /usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/
> > src/linux_compat.c -o linux_compat.o
> > In file included from
> > /usr/img/freebsd/sys/modules/linuxkpi/../../compat/linuxkpi/common/
> > src/linux_compat.c:38:
> > In file included from
> > /usr/img/freebsd/sys/modules/linuxkpi/../../sys/proc.h:66:
> > In file included from
> > /usr/img/freebsd/sys/modules/linuxkpi/../../sys/_vm_domain.h:34:
> > In file included from
> > /usr/img/freebsd/sys/modules/linuxkpi/../../sys/seq.h:70:
> > ./machine/cpu.h:22:9: error: implicit declaration of function
> > 'cp15_pmccntr_get' is invalid in C99
> >   [-Werror,-Wimplicit-function-declaration]
> > return cp15_pmccntr_get();
> >^
> > 1 error generated.
> > *** Error code 1
> 
> And when running:
> 
> make -DNO_CLEAN -j6 universe MAKE_JUST_KERNELS=yes
> MODULES_OVERRIDE=linuxkpi
> 
> With my "sys/conf/kern.post.mk" patch, it passes all the variants.
> 
> 
> Is this the expected behaviour or a bug somewhere?
> 
> 
> --HPS

The only way that error can happen is if _KERNEL is defined and
__ARM_ARCH is not >= 6 at that point in the compile.  The __ARM_ARCH
symbol is set by the compiler and/or acle-compat.h (acle-compat
translates old gcc-style arm arch symbols to new-style).

Hmm, and looking at that output some more, we have CC="cc " CXX="c++  "
etc, so it's not using the cross-compiler and __ARM_ARCH will be zero.

Why it's using the wrong compiler is a question I'll leave for Warner
or someone else who understands module building better.

-- Ian

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Build Options Survey run

2015-11-03 Thread Bjoern A. Zeeb
Hi,

phk had asked me to run a build options survey again.  It took about two weeks 
to go through all of them.  The results are here:

https://people.freebsd.org/~bz/build_option_survey_20151017/

There are plans to run it more often again and improve it a bit.  No promises 
on the actual timeline but it’ll happen.

Meanwhile you can go and look at things and improve them ;-)

Cheers,
Bjoern
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: panic: refcount inconsistency: found: 0 total: 1

2015-11-03 Thread David Wolfskill
On Tue, Nov 03, 2015 at 06:15:35PM +0300, Alexander V. Chernikov wrote:
> ...
> > I tried booting it, and during the transition to multi-user mode,
> > once ipfw was being invoked, I got the above-cited panic. Circumvention
> > was to leave it disconnected from a network (turn off the WiFi
> > switch, in my case), so we don't get a chance to use the network.
> It is most probably related with r290334. Would you mind reverting it and 
> checking if ipfw works correctly ?
> 

OK; after:

Script started on Tue Nov  3 08:22:37 2015
g1-252(10.2-S)[1] (cd /S4/usr/src/ && svn diff -c 290334 >/tmp/r290334)^M
g1-252(10.2-S)[2] (cd /S4/usr/src/ && svn patch --reverse-diff /tmp/r290334)^M
U sys/netpfil/ipfw/ip_fw_sockopt.c
U sys/netpfil/ipfw/ip_fw_table.c
g1-252(10.2-S)[3] exit

followed by a "make buildkernel", I now have:

FreeBSD localhost 11.0-CURRENT FreeBSD 11.0-CURRENT #232  
r290334M/290334:1100086: Tue Nov  3 08:27:20 PST 2015 
root@localhost:/common/S4/obj/usr/src/sys/CANARY  amd64

and

localhost(11.0-C)[3] ifconfig wlan0 
wlan0: flags=8843 metric 0 mtu 1500
ether 00:24:d6:7a:03:ce
inet 198.135.49.33 netmask 0xfc00 broadcast 198.135.51.255 
...

as I type, and IPFW is isn use


at a *guess*, we'll need a bit more effort to keep "found" and
"ci->object_opcodes" in sync, at least by the time the KASSERT on
src/sys/netpfil/ipfw/ip_fw_table.c:3395 looks at the values.

Thanks!

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: Build Options Survey run

2015-11-03 Thread Warner Losh

> On Nov 3, 2015, at 9:37 AM, Bjoern A. Zeeb  wrote:
> 
> Hi,
> 
> phk had asked me to run a build options survey again.  It took about two 
> weeks to go through all of them.  The results are here:
> 
> https://people.freebsd.org/~bz/build_option_survey_20151017/
> 
> There are plans to run it more often again and improve it a bit.  No promises 
> on the actual timeline but it’ll happen.
> 
> Meanwhile you can go and look at things and improve them ;-)

While not all combinations tested were valid combinations, many that failed 
are. Some of them look to be relatively easy to fix, while others are much 
harder.

Warner



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: buildworld broken

2015-11-03 Thread Steve Kargl
On Sun, Nov 01, 2015 at 11:19:09PM -0800, NGie Cooper wrote:
> 
> > On Nov 1, 2015, at 08:47, Steve Kargl  
> > wrote:
> > 
> > ===> libexec/dma/dmagent (all)
> > cc  -I/usr/src/libexec/dma/dmagent/../../../contrib/dma  -DHAVE_REALLOCF 
> > -DHAVE_STRLCPY -DHAVE_GETPROGNAME  -DCONF_PATH='"/etc/dma"'  
> > -DLIBEXEC_PATH='"/usr/libexec"' -DDMA_VERSION='"v0.10"'  
> > -DDMA_ROOT_USER='"mailnull"'  -DDMA_GROUP='"mail"' -std=gnu99 
> > -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W 
> > -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes 
> > -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow 
> > -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs 
> > -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wformat=2 
> > -Wno-format-extra-args -Werror -Wmissing-variable-declarations 
> > -Wthread-safety -Wno-empty-body -Wno-string-plus-int 
> > -Wno-unused-const-variable -Qunused-arguments  -o dma aliases_parse.o 
> > aliases_scan.o base64.o conf.o crypto.o dma.o dns.o local.o mail.o net.o 
> > spool.o util.o  -lssl  -lcrypto
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_digest_from_attributes'
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_add_signed_attribute'
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_dataFinal'
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_get_signed_attribute'
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_SIGNER_INFO_sign'
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_dataInit'
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_dataDecode'
> > /usr/obj/usr/src/tmp/usr/lib/libcrypto.so: undefined reference to 
> > `PKCS7_signatureVerify'
> 
> Hi Steve,
>   What are your custom build options? Have you patched your copy of 
> FreeBSD?
> Thanks!

Sorry for the delay. I was traveling yesterday.

% cat /etc/src.conf
WITHOUT_TESTS = "YES"
WITHOUT_CTM = "YES"
WITHOUT_NDIS = "YES"
WITHOUT_PROFILE = "YES"
WITH_LLDB="yes"
MALLOC_PRODUCTION = "YES"

% cat /etc/make.conf
KERNCONF=MOBILE
CPUTYPE?=core2
WITH_PKGNG=yes
FFLAGS+= -O2 -pipe -march=native -mtune=native
FFLAGS+= -funroll-loops -ftree-vectorize
MAKE_JOBS_UNSAFE="yes"
MASTER_SITE_FREEBSD="yes"
DEFAULT_VERSIONS+=perl5=5.20

% svn info
Path: .
Working Copy Root Path: /usr/src
URL: svn://svn.freebsd.org/base/head
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 290258
Node Kind: directory
Schedule: normal
Last Changed Author: adrian
Last Changed Rev: 290258
Last Changed Date: 2015-11-01 19:36:15 -0800 (Sun, 01 Nov 2015)

There are no local changes in this tree.  The only thing that
might be different than a standard buildworld is that I have
a symlink from /usr/obj to /mnt/obj where the /mnt filesystem
is UFS2 mounted noatime, async.

Note, the undefined references appear in /usr/lib/libcrypto.so.7
and are missing in the freshly built libcrypto.so.8.  So, it
appears that something that dmagent is using is reaching out into
the previously installed libcrypto.

-- 
Steve
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: [CFT] Unicode collation string and reworked locale definitions

2015-11-03 Thread Wolfgang Jenkner
On Tue, Nov 03 2015, Pedro Giffuni wrote:

> What worries me about libtre is that it lacks important functionality like 
> word
> delimiters. We even brought the sysv delimiters to be more compatible with
> Solaris and GNU and we can’t back those out now:
>
> https://svnweb.freebsd.org/base?view=revision&revision=268066

It supports \< and \> out of the box, cf.

https://github.com/laurikari/tre/blob/master/doc/tre-syntax.html

And the darwin patch mentioned above implements [[:<:]] and [[:>:]], see

http://www.opensource.apple.com/source/Libc/Libc-1044.40.1/regex/TRE/lib/tre-parse.c

That patch also implements the REG_STARTEND flag for regexec(3), which
is needed for vi.

Also, tre provides wchar versions for regcomp(3) and friends, so that
nvi wouldn't need its own private regex library anymore.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: [CFT] Unicode collation string and reworked locale definitions

2015-11-03 Thread Pedro Giffuni
Hello;

> Il giorno 03/nov/2015, alle ore 10:52, Wolfgang Jenkner  
> ha scritto:
> 
> On Tue, Nov 03 2015, Pedro Giffuni wrote:
> 
>> What worries me about libtre is that it lacks important functionality like 
>> word
>> delimiters. We even brought the sysv delimiters to be more compatible with
>> Solaris and GNU and we can’t back those out now:
>> 
>> https://svnweb.freebsd.org/base?view=revision&revision=268066
> 
> It supports \< and \> out of the box, cf.
> 
> https://github.com/laurikari/tre/blob/master/doc/tre-syntax.html
> 
> And the darwin patch mentioned above implements [[:<:]] and [[:>:]], see
> 
> http://www.opensource.apple.com/source/Libc/Libc-1044.40.1/regex/TRE/lib/tre-parse.c
> 
> That patch also implements the REG_STARTEND flag for regexec(3), which
> is needed for vi.
> 
> Also, tre provides wchar versions for regcomp(3) and friends, so that
> nvi wouldn't need its own private regex library anymore.

Interesting thanks.

I only looked at it transitorily long ago, I noticed there was a big TODO
list and that the Apple patches were partially copyleft (APSL) so I
didn’t dig into it too much.

It certainly has to be evaluated.

Pedro.

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: panic: refcount inconsistency: found: 0 total: 1

2015-11-03 Thread David Wolfskill
On Tue, Nov 03, 2015 at 08:39:52AM -0800, David Wolfskill wrote:
> On Tue, Nov 03, 2015 at 06:15:35PM +0300, Alexander V. Chernikov wrote:
> > ...
> > > I tried booting it, and during the transition to multi-user mode,
> > > once ipfw was being invoked, I got the above-cited panic. Circumvention
> > > was to leave it disconnected from a network (turn off the WiFi
> > > switch, in my case), so we don't get a chance to use the network.
> > It is most probably related with r290334. Would you mind reverting it and 
> > checking if ipfw works correctly ?
> > 
> 
>  ... [Reverting r290334 gets things working again -- dhw]
> 
> at a *guess*, we'll need a bit more effort to keep "found" and
> "ci->object_opcodes" in sync, at least by the time the KASSERT on
> src/sys/netpfil/ipfw/ip_fw_table.c:3395 looks at the values.
> ...

So... looking at the code a bit (and bearing in mind that I still am
unfamiliar with said code, and I hack more than I "write" code)...
here's the original bit of src/sys/netpfil/ipfw/ip_fw_table.c in
question, with the modification from r290334 shown:

...
/*
 * Finds and bumps refcount for objects referenced by given @rule.
 * Auto-creates non-existing tables.
 * Fills in @oib array with userland/kernel indexes.
 *
 * Returns 0 on success.
 */
static int
ref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule,
struct rule_check_info *ci, struct obj_idx *oib, struct tid_info
*ti)
{
...
if (error != 0) {
/* Unref everything we have already done */
unref_oib_objects(ch, rule->cmd, oib, pidx);
IPFW_UH_WUNLOCK(ch);
return (error);
}

IPFW_UH_WUNLOCK(ch);

found = pidx - oib;
KASSERT(found == ci->object_opcodes,
("refcount inconsistency: found: %d total: %d",
found, ci->object_opcodes));
   
/* Perform auto-creation for non-existing objects */
if (numnew != 0)
error = create_objects_compat(ch, rule->cmd, oib, pidx, ti);
   
+   /* Calculate real number of dynamic objects */
+   ci->object_opcodes = (uint16_t)(pidx - oib);
+
return (error);
}
...


The added code to "Calculate real number of dynamic objects" is
apparently setting ci->object_opcodes to the same value that "found" was
just set to (pidx - oib -- cast to uint16_t in the case of the added
code).

But that appears to come a bit late for the KASSERT.

Moving the KASSERT relative to the added code (so the KASSERT comes
after) would be an option, but I'm not sure it makes sense to
actually do the KASSERT unless we have some reason to believe that
the difference between pidx and oib might change in the interval
represented by a couple lines of code AND we have not coded to
handle that situation any more "gracefully" than to panic.

So... with the change from r290334, what's the point of the KASSERT?

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: Build Options Survey run

2015-11-03 Thread Poul-Henning Kamp

In message , Warner Losh 
writes:

>> phk had asked me to run a build options survey again.  It took about 
>two weeks to go through all of them.  The results are here:

Many thanks!

>> There are plans to run it more often again and improve it a bit.  No 
>promises on the actual timeline but it'll happen.

It's actually a good beginner task if anybody wants to do something
for the project which requires just a machine and some shell
programming.

My old script can be improved in a lot of ways, the most productive
would probably be to make it incremental rather than one big batch
job.  (Something like:  Test any options for which there are no
results, otherwise retest the option with the oldest result.)

>While not all combinations tested were valid combinations, many that 
>failed are. Some of them look to be relatively easy to fix, while others 
>are much harder.

If one _really_ wanted to burn CPU cycles, my testing years back revealed
many combinations where options are incompatible.  (NB: Today we have almost
four times as many options as then and we're into N! territory here...)

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


11.0-CURRENT r290273: installer fails with "out of swap space" error

2015-11-03 Thread Maxim Pugachev
Hi,

I tried to install r29273 into Parallels VM, but got an error on
"distextract" stage. Here is the last messages from bsdinstall_log:

DEBUG: f_debug_init: ARGV=[distextract] GETOPTS_STDARGS=[dD:]
DEBUG: f_debug_init: debug=[1] debugFile=[/tmp/bsdinstall_log]
DEBUG: Running installation step: distextract
Killed

Last message from /var/log/messages:

Nov  3 20:02:9  kernel: pid 967 (distextract), uid 0, was killed: out
of swap space

My VM has 2 gigs of memory, vmstat tells that I have ~537M free
(swapinfo tells nothing). I dunno is it a bug or I'm doing something
wrong.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: panic: refcount inconsistency: found: 0 total: 1

2015-11-03 Thread Andrey V. Elsukov
On 04.11.2015 00:10, David Wolfskill wrote:
> So... with the change from r290334, what's the point of the KASSERT?

Yes, you are right. We changed this code and use it some time, but
without INVARIANTS. I just removed this KASSERT in r290345. Can you try
this revision? Sorry for the breakage.

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: 11.0-CURRENT r290273: installer fails with "out of swap space" error

2015-11-03 Thread Mark Martinec

On 2015-11-03 21:50, Maxim Pugachev wrote:

I tried to install r29273 into Parallels VM, but got an error on
"distextract" stage. Here is the last messages from bsdinstall_log:

DEBUG: f_debug_init: ARGV=[distextract] GETOPTS_STDARGS=[dD:]
DEBUG: f_debug_init: debug=[1] debugFile=[/tmp/bsdinstall_log]
DEBUG: Running installation step: distextract
Killed

Last message from /var/log/messages:

Nov  3 20:02:9  kernel: pid 967 (distextract), uid 0, was killed: out
of swap space

My VM has 2 gigs of memory, vmstat tells that I have ~537M free
(swapinfo tells nothing). I dunno is it a bug or I'm doing something
wrong.


Looks like the same issue as reported a year and a half ago:

https://lists.freebsd.org/pipermail/freebsd-stable/2014-January/076732.html


  Mark
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: panic: refcount inconsistency: found: 0 total: 1

2015-11-03 Thread David Wolfskill
On Wed, Nov 04, 2015 at 01:23:42AM +0300, Andrey V. Elsukov wrote:
> On 04.11.2015 00:10, David Wolfskill wrote:
> > So... with the change from r290334, what's the point of the KASSERT?
> 
> Yes, you are right. We changed this code and use it some time, but
> without INVARIANTS. I just removed this KASSERT in r290345. Can you try
> this revision? Sorry for the breakage.
> 

OK; I first did "svn revert /usr/src/sys/netpfil/ipfw/", then (having
saved a copy of r290345's commit message as /tmp/r290345), did "svn
patch --strip 1 /tmp/r290345 /usr/src", then built & installed a new
kernel, which booted without a panic:

FreeBSD  11.0-CURRENT FreeBSD 11.0-CURRENT #233  r290334M/290334:1100086: Tue 
Nov  3 17:18:26 PST 2015 root@localhost:/common/S4/obj/usr/src/sys/CANARY  
amd64

I was un the shuttle bus at the time; apparently the DHCP server
in the access point wasn't behaving itself, as I got a DHCPNAK from
it -- running either head or stable/10.  I booted up head here at
home, and DHCP works fine:

FreeBSD  11.0-CURRENT FreeBSD 11.0-CURRENT #233  r290334M/290334:1100086: Tue 
Nov  3 17:18:26 PST 2015 root@localhost:/common/S4/obj/usr/src/sys/CANARY  
amd64


So: looks like  awin to me! :-)

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.



-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: Build Options Survey run

2015-11-03 Thread Julian Elischer
Can you put the MK_FOO column at the end so it doesn't push everything 
else off the Right hand side of the screen?


On 11/4/15 12:37 AM, Bjoern A. Zeeb wrote:

Hi,

phk had asked me to run a build options survey again.  It took about two weeks 
to go through all of them.  The results are here:

https://people.freebsd.org/~bz/build_option_survey_20151017/

There are plans to run it more often again and improve it a bit.  No promises 
on the actual timeline but it’ll happen.

Meanwhile you can go and look at things and improve them ;-)

Cheers,
Bjoern
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"




___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

IPFW panic on boot

2015-11-03 Thread Mark Felder
Recent ipfw commits now cause my firewall to panic on boot. I had to
revert them and only pull in Adrian's ath fix which was to fix yet a
different panic I was encountering... :-)

KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
0xfe01226a33e0
vpanic() at vpanic+0x182/frame 0xfe01226a3460
kassert_panic() at kassert_panic+0x126/frame 0xfe01226a34d0
ipfw_rewrite_rule_uidx() at ipfw_rewrite_rule_uidx+0x258/frame
0xfe01226a356
0
commit_rules() at commit_rules+0x43/frame 0xfe01226a35b0
add_rules() at add_rules+0x430/frame 0xfe01226a3680
ipfw_ctl3() at ipfw_ctl3+0x424/frame 0xfe01226a3980
rip_ctloutput() at rip_ctloutput+0x261/frame 0xfe01226a39b0
sogetopt() at sogetopt+0x76/frame 0xfe01226a3a40
kern_getsockopt() at kern_getsockopt+0xde/frame 0xfe01226a3ab0
sys_getsockopt() at sys_getsockopt+0x50/frame 0xfe01226a3ae0
amd64_syscall() at amd64_syscall+0x2de/frame 0xfe01226a3bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe01226a3bf0
--- syscall (118, FreeBSD ELF64, sys_getsockopt), rip = 0x800b2cbca, rsp
= 0x7ff
fca88, rbp = 0x7fffdb60 ---
KDB: enter: panic

-- 
  Mark Felder
  ports-secteam member
  f...@freebsd.org
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: IPFW panic on boot

2015-11-03 Thread David Wolfskill
On Tue, Nov 03, 2015 at 09:08:28PM -0600, Mark Felder wrote:
> Recent ipfw commits now cause my firewall to panic on boot. I had to
> revert them and only pull in Adrian's ath fix which was to fix yet a
> different panic I was encountering... :-)
> 
> KDB: stack backtrace:
> db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
> 0xfe01226a33e0
> vpanic() at vpanic+0x182/frame 0xfe01226a3460
> kassert_panic() at kassert_panic+0x126/frame 0xfe01226a34d0
> ipfw_rewrite_rule_uidx() at ipfw_rewrite_rule_uidx+0x258/frame
> 0xfe01226a356
> 0
> 

Yes; ref. 
et seq.

For me, the problem was with r290334; r290345 fixed it (again, for me).

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Those who would murder in the name of God or prophet are blasphemous cowards.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: 11.0-CURRENT r290273: installer fails with "out of swap space" error

2015-11-03 Thread Maxim Pugachev
Well, looks like something is wrong with CURRENT. I just tested
10.2-RELEASE, and everything works fine. So, summing up:

10.2-RELEASE works fine with 2Gb of memory
11.0-CURRENT r290273 fails with 2Gb
11.0-CURRENT r290273 works fine with 4Gb

On Wed, Nov 4, 2015 at 9:19 AM, Maxim Pugachev  wrote:
> Mark,
>
> Yes, thanks, I'll try to test it with 4GB.
> Forgot to mention that I use "auto" setup: entire disk for UFS.
> Installer fails when extracting kernel.txz
>
> On Wed, Nov 4, 2015 at 1:45 AM, Mark Martinec
>  wrote:
>> On 2015-11-03 21:50, Maxim Pugachev wrote:
>>>
>>> I tried to install r29273 into Parallels VM, but got an error on
>>> "distextract" stage. Here is the last messages from bsdinstall_log:
>>>
>>> DEBUG: f_debug_init: ARGV=[distextract] GETOPTS_STDARGS=[dD:]
>>> DEBUG: f_debug_init: debug=[1] debugFile=[/tmp/bsdinstall_log]
>>> DEBUG: Running installation step: distextract
>>> Killed
>>>
>>> Last message from /var/log/messages:
>>>
>>> Nov  3 20:02:9  kernel: pid 967 (distextract), uid 0, was killed: out
>>> of swap space
>>>
>>> My VM has 2 gigs of memory, vmstat tells that I have ~537M free
>>> (swapinfo tells nothing). I dunno is it a bug or I'm doing something
>>> wrong.
>>
>>
>> Looks like the same issue as reported a year and a half ago:
>>
>> https://lists.freebsd.org/pipermail/freebsd-stable/2014-January/076732.html
>>
>>
>>   Mark
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"