Re: svn commit: r360125 - in head/usr.bin/diff: . tests

2020-04-28 Thread Jan Beich
Gary Jennejohn  writes:

> On Tue, 28 Apr 2020 07:25:18 -0500
> Kyle Evans  wrote:
>
>> On Tue, Apr 28, 2020 at 6:52 AM Jan Beich  wrote:
>> >
>> > Kyle Evans  writes:
>> >  
>> > > Author: kevans
>> > > Date: Mon Apr 20 16:14:44 2020
>> > > New Revision: 360125
>> > > URL: https://svnweb.freebsd.org/changeset/base/360125
>> > >
>> > > Log:
>> > >   diff(1): reject conflicting formatting options
>> > >
>> > >   This matches GNU diff(1) behavior and, more importantly, eliminates any
>> > >   source of confusion if multiple formatting options are specified.
>> > >
>> > >   Note that the committed diff differs slightly from the submitted: I've
>> > >   modified it so that we initialize diff_format to something that isn't 
>> > > an
>> > >   accepted format option so that we can also reject --normal -c and -c
>> > >   --normal, which would've otherwise been accepted because the default 
>> > > was
>> > >   --normal. After option parsing we default it to D_NORMAL if it's still
>> > >   unset.
>> > >
>> > >   PR: 243975
>> > >   Submitted by:   fehmi noyan isi
>> > >   MFC after:  1 week  
>> >
>> > Appears to break ability to specify number of context lines e.g.,
>> >
>> > $ diff -U999 /usr/include/sha256.h /usr/include/sha512.h
>> > error: conflicting output format options.
>> > usage: diff [-aBbdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]
>> > [...]  
>> 
>> Hmm, bizarre. =-\ This example works on my machine, and I don't see
>> off-hand what would be preventing it for you:
>> 
>> root@viper:/usr/src/usr.bin/diff# diff -U999 /usr/include/sha256.h
>> /usr/include/sha512.h
>> --- /usr/include/sha256.h   2020-04-22 21:38:54.0 -0500
>> +++ /usr/include/sha512.h   2020-04-22 21:38:54.0 -0500
>> @@ -1,99 +1,99 @@
>>  /*-
>>   * Copyright 2005 Colin Percival
>>   * All rights reserved.
>>   *
>> [... omitted ...]
>> 
>> root@viper:/usr/src/usr.bin/diff# strings /usr/bin/diff | grep 'conflicting'
>> error: conflicting output format options.
>> 
>
> My /usr/bin/diff was built and installed on April 26, after this
> commit, and I don't see the error either.

Thanks for confirming. Looks like my "diff" was aliased to "diff -up".
Indeed, -u and -U are no longer compatible unlike GNU diff.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r360125 - in head/usr.bin/diff: . tests

2020-04-28 Thread Jan Beich
Kyle Evans  writes:

> Author: kevans
> Date: Mon Apr 20 16:14:44 2020
> New Revision: 360125
> URL: https://svnweb.freebsd.org/changeset/base/360125
>
> Log:
>   diff(1): reject conflicting formatting options
>   
>   This matches GNU diff(1) behavior and, more importantly, eliminates any
>   source of confusion if multiple formatting options are specified.
>   
>   Note that the committed diff differs slightly from the submitted: I've
>   modified it so that we initialize diff_format to something that isn't an
>   accepted format option so that we can also reject --normal -c and -c
>   --normal, which would've otherwise been accepted because the default was
>   --normal. After option parsing we default it to D_NORMAL if it's still
>   unset.
>   
>   PR: 243975
>   Submitted by:   fehmi noyan isi
>   MFC after:  1 week

Appears to break ability to specify number of context lines e.g.,

$ diff -U999 /usr/include/sha256.h /usr/include/sha512.h
error: conflicting output format options.
usage: diff [-aBbdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]
[...]
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r358363 - head/sys/vm

2020-03-01 Thread Jan Beich
Mark Johnston  writes:

> On Sat, Feb 29, 2020 at 09:24:11PM +0100, Emmanuel Vadot wrote:
>
>> 
>>  Hi Jeff,
>> 
>> On Thu, 27 Feb 2020 02:37:27 + (UTC)
>> Jeff Roberson  wrote:
>> 
>> > Author: jeff
>> > Date: Thu Feb 27 02:37:27 2020
>> > New Revision: 358363
>> > URL: https://svnweb.freebsd.org/changeset/base/358363
>> > 
>> > Log:
>> >   Add unlocked grab* function variants that use lockless radix code to
>> >   lookup pages.  These variants will fall back to their locked counterparts
>> >   if the page is not present.
>> >   
>> >   Discussed with:  kib, markj
>> >   Differential Revision:   https://reviews.freebsd.org/D23449
>> > 
>> > Modified:
>> >   head/sys/vm/vm_page.c
>> >   head/sys/vm/vm_page.h
>> > 
>> 
>>  We're (jbeich@ and me) seeing wired memory leak since this commit.
>>  A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and
>> liba-intel-driver/libva-intel-media-driver and start mpv in a loop :
>> 
>>  while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do
>>  done
>> 
>>  Reverting this commit on one of my test machine shows that this is the
>> culprit.
>>  If you need anymore info/debug let me know.
>> 
>>  Thanks.
>
> Could you give this patch a try?
>
> diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
> index 9d50881ed27e..41e7a5bb3099 100644
> --- a/sys/vm/vm_page.c
> +++ b/sys/vm/vm_page.c
> @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, 
> vm_pindex_t pindex, int al
>   (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0,
>   ("vm_page_grab_valid: Invalid flags 0x%X", allocflags));
>   VM_OBJECT_ASSERT_WLOCKED(object);
> - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY);
> + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY |
> + VM_ALLOC_WIRED);
>   pflags |= VM_ALLOC_WAITFAIL;
>  
>  retrylookup:

I confirm, the patch fixes the issue. After trying to reproduce for a
few minutes Wired doesn't grow several times larger than ARC Total.

  Mem: 1151M Active, 300M Inact, 41M Laundry, 3417M Wired, 57G Free
  ARC: 2020M Total, 861M MFU, 992M MRU, 3512K Anon, 23M Header, 140M Other
   711M Compressed, 1311M Uncompressed, 1.84:1 Ratio
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r345708 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk usr.bin/dtc usr.sbin/pm

2019-09-03 Thread Jan Beich
Enji Cooper  writes:

> +.if ${COMPILER_FEATURES:Mc++11}
> +CXXSTD?= c++11

POLA violation. Clang 6.0 or later defaults to gnu++14, not c++11.

> +.elif ${COMPILER_TYPE} == "gcc"
> +# Prior versions of g++ support C++98 with GNU extensions by default.
> +CXXSTD?= gnu++98

POLA violation. GCC 6.0 or later defaults to gnu++14, not gnu++98.

> +CXXFLAGS+=   -std=${CXXSTD}

POLA violation. Breaks consumers that pass different -std= e.g.,

http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/head-amd64-default/p498440_s346039/logs/errors/android-tools-adb-9.0.0.r3_2.log

Index: share/mk/bsd.sys.mk
===
--- share/mk/bsd.sys.mk (revision 346076)
+++ share/mk/bsd.sys.mk (working copy)
@@ -25,16 +25,19 @@ CFLAGS+=-std=iso9899:1999
 CFLAGS+=   -std=${CSTD}
 .endif # CSTD
 
-.if ${COMPILER_FEATURES:Mc++11}
-CXXSTD?=   c++11
-.elif ${COMPILER_TYPE} == "gcc"
-# Prior versions of g++ support C++98 with GNU extensions by default.
+.if (${COMPILER_TYPE} == "clang" || ${COMPILER_TYPE} == "gcc") && 
${COMPILER_VERSION} >= 6
+CXXSTD?=   gnu++14
+.elif ${COMPILER_TYPE} == "clang" || ${COMPILER_TYPE} == "gcc"
+# Prior versions of clang++ and g++ support C++98 with GNU extensions by 
default.
 CXXSTD?=   gnu++98
 .else
 # Assume that the compiler supports at least C++98.
 CXXSTD?=   c++98
 .endif
+# Only pass -std= if missing to facilitate compatibility with previous FreeBSD 
versions
+.if empty(CXXFLAGS:M-std=*)
 CXXFLAGS+= -std=${CXXSTD}
+.endif
 # CXXSTD
 
 # -pedantic is problematic because it also imposes namespace restrictions


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


Re: svn commit: r345708 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk usr.bin/dtc usr.sbin/pm

2019-04-10 Thread Jan Beich
Enji Cooper  writes:

> +.if ${COMPILER_FEATURES:Mc++11}
> +CXXSTD?= c++11

POLA violation. Clang 6.0 or later defaults to gnu++14, not c++11.

> +.elif ${COMPILER_TYPE} == "gcc"
> +# Prior versions of g++ support C++98 with GNU extensions by default.
> +CXXSTD?= gnu++98

POLA violation. GCC 6.0 or later defaults to gnu++14, not gnu++98.

> +CXXFLAGS+=   -std=${CXXSTD}

POLA violation. Breaks consumers that pass different -std= e.g.,

http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/head-amd64-default/p498440_s346039/logs/errors/android-tools-adb-9.0.0.r3_2.log

Index: share/mk/bsd.sys.mk
===
--- share/mk/bsd.sys.mk (revision 346076)
+++ share/mk/bsd.sys.mk (working copy)
@@ -25,16 +25,19 @@ CFLAGS+=-std=iso9899:1999
 CFLAGS+=   -std=${CSTD}
 .endif # CSTD
 
-.if ${COMPILER_FEATURES:Mc++11}
-CXXSTD?=   c++11
-.elif ${COMPILER_TYPE} == "gcc"
-# Prior versions of g++ support C++98 with GNU extensions by default.
+.if (${COMPILER_TYPE} == "clang" || ${COMPILER_TYPE} == "gcc") && 
${COMPILER_VERSION} >= 6
+CXXSTD?=   gnu++14
+.elif ${COMPILER_TYPE} == "clang" || ${COMPILER_TYPE} == "gcc"
+# Prior versions of clang++ and g++ support C++98 with GNU extensions by 
default.
 CXXSTD?=   gnu++98
 .else
 # Assume that the compiler supports at least C++98.
 CXXSTD?=   c++98
 .endif
+# Only pass -std= if missing to facilitate compatibility with previous FreeBSD 
versions
+.if empty(CXXFLAGS:M-std=*)
 CXXFLAGS+= -std=${CXXSTD}
+.endif
 # CXXSTD
 
 # -pedantic is problematic because it also imposes namespace restrictions
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r344021 - head/share/man/man7

2019-02-17 Thread Jan Beich
Edward Tomasz Napierala  writes:

> ... while the
> +.Em quarterly

.Em looks unnecessary as "the" is enough. /quarterly is a package set
(or repository), not an actual name of the branch.

- /head -> /latest
- /branches/*Q* -> /quarterly
- /tags/RELEASE_* -> /release_*

> +subdirectory, eg:

Did you mean "subdirectory e.g.," ?

https://english.stackexchange.com/questions/16172/should-i-always-use-a-comma-after-e-g-or-i-e
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r338990 - in head/sys: compat/freebsd32 dev/pci

2018-11-16 Thread Jan Beich
Brooks Davis  writes:

> Author: brooks
> Date: Thu Sep 27 21:08:32 2018
> New Revision: 338990
> URL: https://svnweb.freebsd.org/changeset/base/338990
>
> Log:
>   Centralize compat support for PCIOCGETCONF.
>   
>   The pre-7.x compat for both native and 32-bit code was already in
>   pci_user.c. Use this infrastructure to add implement 32-bit support.
>   This is more correct as ioctl(2) commands only have meaning in the
>   context of a file descriptor.
>   
>   Reviewed by:kib
>   Approved by:re (gjb)
>   Obtained from:  CheriBSD
>   Sponsored by:   DARPA, AFRL
>   Differential revision:  https://reviews.freebsd.org/D17324

After this commit getdevice() from pciconf(8) and pci_find_conf() in
tools/tools/dmardump/dmardump.c always fail in EPERM in -m32 mode.
Found via graphics/libdrm where PCIOCGETCONF is used to get a list of
DRM devices for use by OpenGL/Vulkan/VAAPI userland drivers.

Can you fix the regression before 12.0R or back the commit out?

https://lists.freebsd.org/pipermail/freebsd-current/2018-November/072144.html
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339563 - in head: . share/man/man4 sys/conf sys/dev/joy sys/modules sys/modules/joy sys/sys tools/kerneldoc/subsys

2018-10-25 Thread Jan Beich
Warner Losh  writes:

> On Wed, Oct 24, 2018 at 9:42 AM Jan Beich  wrote:
>
>> Warner Losh  writes:
>>
>> > Author: imp
>> > Date: Mon Oct 22 02:34:00 2018
>> > New Revision: 339563
>> > URL: https://svnweb.freebsd.org/changeset/base/339563
>> >
>> > Log:
>> >   Remove joy(4) driver.
>> >
>> >   This driver was marked as gone in 12. We're at 13 now. Remove it.
>> >   Data from nycbug's dmesg cache shows only one potential user,
>> >   suggesting it never was used much.
>> >
>> >   RelNotes: yes
>> >   Differential Revision: https://reviews.freebsd.org/D17629
>>
>> Breaking userland API but not bothering with an exp-run or bumping
>> __FreeBSD_version.
>> Is the following the pointy hat you were looking for?
>>
>>
>> https://forums.freebsd.org/threads/graphics-freeglut-fails-to-build-sys-joystick-h-not-found.68002/
>
>
> Your tone is not acceptable. Please try again, only this time with the
> required level of professionalism. I'm not an idiot, and you will treat me
> with respect.

Apologies for the snide remark. I've expected someone with ports/ commit bit
to be a bit more careful.

> This driver was flagged for removal in 12 ages ago and the port failed to
> update to take that deprecation into account.

Not sure what "ages ago" refers to when not even 1 year passed since r328523.
Neither joy(4) manpage mentioned deprecation nor __attribute__((deprecated))
was used. Maintainers of consumers aren't necessarily joy(4) users.

Was joy(4) deprecation announced on the public mailing lists? For some reason,
I can't easily find it in the archives.

> You can use the bump to 130 as the version to fix it. I didn't bump the
> revision because it wasn't needed.

poudriere won't force rebuild everything if __FreeBSD_version doesn't change.
Expect silence from pkg-fallout@ until the next bump.

http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/latest-per-pkg/sdl/1.2.15_12,2/head-amd64-default.log
http://www.ipv6proxy.net/go.php?u=http://beefy12.nyi.freebsd.org/data/latest-per-pkg/plib/1.8.5_7/head-amd64-default.log

vs.

http://beefy8.nyi.freebsd.org/data/latest-per-pkg/sdl/1.2.15_12,2/head-armv6-default.log
http://beefy8.nyi.freebsd.org/data/latest-per-pkg/plib/1.8.5_7/head-armv6-default.log

> I posted a patch to the port that makes it compile for me to that thread.
> If there's confirmation that it works, i'll work with x...@freebsd.org to
> get it pushed in. Or just push it in myself since I'm on that list and I'm
> a ports committer.

https://codesearch.debian.net/search?q=sys/joystick.h could've been used
to guess a few consumers before pkg-fallout@ complains.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339563 - in head: . share/man/man4 sys/conf sys/dev/joy sys/modules sys/modules/joy sys/sys tools/kerneldoc/subsys

2018-10-24 Thread Jan Beich
Warner Losh  writes:

> Author: imp
> Date: Mon Oct 22 02:34:00 2018
> New Revision: 339563
> URL: https://svnweb.freebsd.org/changeset/base/339563
>
> Log:
>   Remove joy(4) driver.
>   
>   This driver was marked as gone in 12. We're at 13 now. Remove it.
>   Data from nycbug's dmesg cache shows only one potential user,
>   suggesting it never was used much.
>   
>   RelNotes: yes
>   Differential Revision: https://reviews.freebsd.org/D17629

Breaking userland API but not bothering with an exp-run or bumping 
__FreeBSD_version.
Is the following the pointy hat you were looking for?

https://forums.freebsd.org/threads/graphics-freeglut-fails-to-build-sys-joystick-h-not-found.68002/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys

2018-10-21 Thread Jan Beich
Dimitry Andric  writes:

> On 21 Oct 2018, at 04:08, Jan Beich  wrote:
>
>> 
>> Glen Barber  writes:
>> 
>>> Modified: head/lib/clang/llvm.build.mk
>>> ==
>>> --- head/lib/clang/llvm.build.mkFri Oct 19 00:24:23 2018
>>> (r339435)
>>> +++ head/lib/clang/llvm.build.mkFri Oct 19 00:37:47 2018
>>> (r339436)
>>> @@ -17,7 +17,7 @@ CFLAGS+=  -I${LLVM_SRCS}/include
>>> CFLAGS+=-DLLVM_BUILD_GLOBAL_ISEL
>>> CFLAGS+=-D__STDC_LIMIT_MACROS
>>> CFLAGS+=-D__STDC_CONSTANT_MACROS
>>> -#CFLAGS+=  -DNDEBUG
>>> +CFLAGS+=   -DNDEBUG
>> 
>> Would Clang still hit asserts instead of crashing with cryptic messages?
>
> In llvm, assertions (and various other internal consistency checks) are
> turned off by defining NDEBUG.  So indeed, if something in the internal
> state goes in an unexpected direction, you could get crashes or other
> "interesting" effects.
>
> That said, the resulting executable(s) should run somewhat faster, and
> be somewhat smaller.  I think we have always done this for stable
> branches and releases.

But this commit is for -CURRENT, not -STABLE or -RELEASE.

$ svn cat svn://svn.freebsd.org/base/stable/12/lib/clang/llvm.build.mk | fgrep 
NDEBUG   ~
#CFLAGS+=   -DNDEBUG

$ svn cat svn://svn.freebsd.org/base/releng/11.2/lib/clang/llvm.build.mk | 
fgrep NDEBUG
CFLAGS+=-DNDEBUG

>
> If users encounter such crashes, it will still write reproduction files
> (self-contained .c or .cpp file and a shell script), so those can be
> included in bug reports, and run on a copy of clang with assertions.
>
> -Dimitry
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r339436 - in head: . contrib/gcc gnu/usr.bin/cc/cc_tools lib/clang release sys/conf sys/sys

2018-10-21 Thread Jan Beich
Glen Barber  writes:

> Modified: head/lib/clang/llvm.build.mk
> ==
> --- head/lib/clang/llvm.build.mk  Fri Oct 19 00:24:23 2018
> (r339435)
> +++ head/lib/clang/llvm.build.mk  Fri Oct 19 00:37:47 2018
> (r339436)
> @@ -17,7 +17,7 @@ CFLAGS+=-I${LLVM_SRCS}/include
>  CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL
>  CFLAGS+= -D__STDC_LIMIT_MACROS
>  CFLAGS+= -D__STDC_CONSTANT_MACROS
> -#CFLAGS+=-DNDEBUG
> +CFLAGS+= -DNDEBUG

Would Clang still hit asserts instead of crashing with cryptic messages?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r324815 - in head: lib/libc/gen sys/sys

2018-09-02 Thread Jan Beich
Michal Meloun  writes:

> Author: mmel
> Date: Sat Oct 21 12:06:18 2017
> New Revision: 324815
> URL: https://svnweb.freebsd.org/changeset/base/324815
>
> Log:
>   Make elf_aux_info() as public libc function.
>   - Teach elf aux vector functions about newly added AT_HWCAP and AT_HWCAP2
> vectors.
>   - Export _elf_aux_info() as new public libc function elf_aux_info(3)
>   
>   The elf_aux_info(3) should be considered as FreeBSD counterpart of glibc
>   getauxval() with more robust interface.

Can you back it out? I've reported sys/auxv.h breaks existing consumers
and the function is yet to be documented. 12.0-RELEASE is approaching
but there's no fix in sight, and by the time it lands there maybe
not enough time to test.

http://docs.freebsd.org/cgi/mid.cgi?03a31eff-34e8-be4c-c008-528824fea261
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r334054 - in head: sys/kern sys/netipsec tools/tools/crypto usr.bin/netstat

2018-05-25 Thread Jan Beich
Fabien Thomas  writes:

> + IPSECSTAT_INC(ips_spdcache_hits);
> +
> + SPDCACHE_UNLOCK(hashv);
> + goto out;
> + }
> +
> + IPSECSTAT_INC(ips_spdcache_misses);

Breaks kernel build with "nooption IPSEC":

ld: error: undefined symbol: vnet_entry_ipsec4stat
>>> referenced by key.c:933 (/usr/src/sys/netipsec/key.c:933)
>>>   key.o:(key_allocsp)

ld: error: undefined symbol: vnet_entry_ipsec4stat
>>> referenced by key.c:939 (/usr/src/sys/netipsec/key.c:939)
>>>   key.o:(key_allocsp)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r329371 - head/sys/compat/linuxkpi/common/include/asm

2018-02-17 Thread Jan Beich
Hans Petter Selasky <h...@selasky.org> writes:

> On 02/17/18 01:42, Jan Beich wrote:
>
>> Hans Petter Selasky <hsela...@freebsd.org> writes:
>>
>>> Author: hselasky
>>> Date: Fri Feb 16 15:20:21 2018
>>> New Revision: 329371
>>> URL: https://svnweb.freebsd.org/changeset/base/329371
>>>
>>> Log:
>>>Allow the cmpxchg() macro in the LinuxKPI to work on pointers without
>>>generating compiler warnings, -Wint-conversion .
>> [...]
>>
>> To generate errors instead ?
>>
>> $ make clean all -C /usr/ports/graphics/drm-next-kmod
>> [...]
>> drm_lock.c:72:10: error: flexible array member 'u8' in a union is not allowed
>>  prev = cmpxchg(lock, old, new);
>> ^
>
> I believe this is a regression issue in GCC:
>
> https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01505.html

If you didn't notice that bug is for C++, not C. GCC and Clang accept
flexible array members in unions only in C++. cmpxchg() from linuxkpi
doesn't seem to be used anywhere in the tree. If the macro didn't expand
there's nothing to produce an error for.

Anyway, I confirm r329447 fixed graphics/drm-next-kmod build.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r329371 - head/sys/compat/linuxkpi/common/include/asm

2018-02-17 Thread Jan Beich
Hans Petter Selasky <h...@selasky.org> writes:

> On 02/17/18 01:42, Jan Beich wrote:
>
>> To generate errors instead ?
>
> Which compiler are you using?
>
> This was tested with clang over here.

$ cc -v
FreeBSD clang version 6.0.0 (branches/release_60 324090) (based on LLVM 6.0.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

$ cat a.c
union {
  char  i8[];
  short i16[];
  int   i32[];
  long  i64[];
} foo;

$ cc -c a.c
a.c:2:9: error: flexible array member 'i8' in a union is not allowed
  char  i8[];
^
a.c:3:9: error: flexible array member 'i16' in a union is not allowed
  short i16[];
^
a.c:4:9: error: flexible array member 'i32' in a union is not allowed
  int   i32[];
^
a.c:5:9: error: flexible array member 'i64' in a union is not allowed
  long  i64[];
^
4 errors generated.

$ gcc7 -c a.c
a.c:2:9: error: flexible array member in union
   char  i8[];
 ^~
a.c:3:9: error: flexible array member in union
   short i16[];
 ^~~
a.c:4:9: error: flexible array member in union
   int   i32[];
 ^~~
a.c:5:9: error: flexible array member in union
   long  i64[];
 ^~~
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r329371 - head/sys/compat/linuxkpi/common/include/asm

2018-02-16 Thread Jan Beich
Hans Petter Selasky  writes:

> Author: hselasky
> Date: Fri Feb 16 15:20:21 2018
> New Revision: 329371
> URL: https://svnweb.freebsd.org/changeset/base/329371
>
> Log:
>   Allow the cmpxchg() macro in the LinuxKPI to work on pointers without
>   generating compiler warnings, -Wint-conversion .
[...]

To generate errors instead ?

$ make clean all -C /usr/ports/graphics/drm-next-kmod
[...]
drm_lock.c:72:10: error: flexible array member 'u8' in a union is not allowed
prev = cmpxchg(lock, old, new);
   ^
/usr/src/sys/compat/linuxkpi/common/include/asm/atomic.h:165:6: note: expanded 
from macro 'cmpxchg'
u8 u8[];\
   ^
drm_lock.c:72:10: error: flexible array member 'u16' in a union is not allowed
/usr/src/sys/compat/linuxkpi/common/include/asm/atomic.h:166:7: note: expanded 
from macro 'cmpxchg'
u16 u16[];  \
^
drm_lock.c:72:10: error: flexible array member 'u32' in a union is not allowed
/usr/src/sys/compat/linuxkpi/common/include/asm/atomic.h:167:7: note: expanded 
from macro 'cmpxchg'
u32 u32[];  \
^
drm_lock.c:72:10: error: flexible array member 'u64' in a union is not allowed
/usr/src/sys/compat/linuxkpi/common/include/asm/atomic.h:168:7: note: expanded 
from macro 'cmpxchg'
u64 u64[];  \
^
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r328436 - head/sys/compat/linuxkpi/common/src

2018-02-01 Thread Jan Beich
Hans Petter Selasky <h...@selasky.org> writes:

> On 02/01/18 12:04, Hans Petter Selasky wrote:
>
>> On 02/01/18 11:25, Jan Beich wrote:
>>> Hans Petter Selasky <hsela...@freebsd.org> writes:
>>>
>>>> Author: hselasky
>>>> Date: Fri Jan 26 10:49:02 2018
>>>> New Revision: 328436
>>>> URL: https://svnweb.freebsd.org/changeset/base/328436
>>>>
>>>> Log:
>>>>  Decouple Linux files from the belonging character device right
>>>> after open
>>>>  in the LinuxKPI. This is done by calling finit() just before
>>>> returning a magic
>>>>  value of ENXIO in the "linux_dev_fdopen" function.
>>>
>>> This breaks DRI3 (uses DMABUF) on drm-next-kmod (Linux 4.9 atm) e.g.,
>>>
>>> $ LIBGL_DRI3_ENABLE=1 LIBGL_DEBUG=verbose MESA_DEBUG=context glxgears
>>> libGL: screen 0 does not appear to be DRI3 capable
>>> libGL error: Connection closed during DRI3 initialization failure
>>> XIO: fatal IO error 35 (Resource temporarily unavailable) on X
>>> server ":0"
>>>  after 22 requests (22 known processed) with 0 events remaining.
>>>
>>
>> Hi,
>>
>> I'll have a look. It might be an issue in libdrm, because it uses
>> some out-of date methods to enumerate the device nodes, like the
>> major and minor numbers.
>>
>> Did you recompile drm-next-kmod after recompiling the LinuxKPI?
>>
>> --HPS
>>
>
> Hi,
>
> I'm still running:
>
> freebsd-base-graphics
> g...@github.com:FreeBSDDesktop/freebsd-base-graphics.git

drm-next branch from freebsd-base-graphics is out of date compared to
master from kms-drm which is the basis for graphics/drm-next-kmod port.
I've switched to drm-next-kmod long ago as resolving regular merge
conflicts under sys/compat/linuxkpi became very tedious.

> With r328436 applied on top and glxgears work:
>
>> env LIBGL_DRI3_ENABLE=1 LIBGL_DEBUG=verbose MESA_DEBUG=context glxgears
>> libGL: OpenDriver: trying /usr/local/lib/dri/i965_dri.so
>> libGL: Can't open configuration file /home/hans/.drirc: No such file or 
>> directory.
>> libGL: Using DRI2 for screen 0

What DDX driver do you use? modesetting(4x) uses DRI3 by default but for 
intel(4x)
you need to explicitly enable it via xorg.conf e.g., see (**) lines below

  $ fgrep DRI /var/log/Xorg.0.log
  [11.875] (**) intel(0): Option "DRI" "3"
  [11.880] (II) intel(0): [DRI2] Setup complete
  [11.880] (II) intel(0): [DRI2]   DRI driver: i965
  [11.880] (II) intel(0): [DRI2]   VDPAU driver: va_gl
  [11.880] (II) intel(0): direct rendering: DRI2 DRI3 enabled
  [11.902] (II) GLX: Initialized DRI2 GL provider for screen 0

Maybe also build graphics/mesa-{dri,libs} with CFLAGS += -D__DRM_NEXT__
in case LIBGL_DRI3_ENABLE=1 doesn't work for X server.

Here's what I see with the commit reverted:

$ LIBGL_DRI3_ENABLE=1 LIBGL_DEBUG=verbose MESA_DEBUG=context glxgears
libGL: Can't open configuration file /home/foo/.drirc: No such file or 
directory.
libGL: pci id for fd 4: 8086:1912, driver i965
libGL: OpenDriver: trying /usr/local/lib/dri/i965_dri.so
libGL: Can't open configuration file /home/foo/.drirc: No such file or 
directory.
libGL: Can't open configuration file /home/foo/.drirc: No such file or 
directory.
libGL: Using DRI3 for screen 0
libGL: Can't open configuration file /home/foo/.drirc: No such file or 
directory.
308 frames in 5.0 seconds = 61.437 FPS
^C

>> libGL: Can't open configuration file /home/hans/.drirc: No such file or 
>> directory.
>> Running synchronized to the vertical refresh.  The framerate should be
>> approximately the same as the monitor refresh rate.
>> 302 frames in 5.0 seconds = 60.252 FPS
>
> Can you do a ktrace and see where it stops?

It stops after one of messages from X server via unix(4) socket.

 glxgears CALL  
mmap(0,0x7000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0x,0)
 glxgears RET   mmap 34429681664/0x8042b4000
 glxgears CALL  
mmap(0,0x7000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0x,0)
 glxgears RET   mmap 34429710336/0x8042bb000
 glxgears CALL  poll(0x7fffe588,0x1,0x)
 glxgears RET   poll 1
 glxgears CALL  writev(0x3,0x7fffe628,0x1)
 glxgears GIO   fd 3 wrote 12 bytes
-0x 9501 0300 5501    
|U...|
+0x 9501 0300 5501      
  |U...|
 
 glxgears RET   writev 12/0xc
 glxgears CALL  poll(0x7fffe5e8,0x1,0x)
 glxgears RET   poll 1
 glxgears CALL  recvmsg(0x3,0x7fffe4a8,0)
-glxgears GIO   fd 3 read 32 bytes
-0x 0101 170

Re: svn commit: r328436 - head/sys/compat/linuxkpi/common/src

2018-02-01 Thread Jan Beich
Hans Petter Selasky <h...@selasky.org> writes:

> On 02/01/18 11:25, Jan Beich wrote:
>
>> Hans Petter Selasky <hsela...@freebsd.org> writes:
>>
>>> Author: hselasky
>>> Date: Fri Jan 26 10:49:02 2018
>>> New Revision: 328436
>>> URL: https://svnweb.freebsd.org/changeset/base/328436
>>>
>>> Log:
>>>Decouple Linux files from the belonging character device right after open
>>>in the LinuxKPI. This is done by calling finit() just before returning a 
>>> magic
>>>value of ENXIO in the "linux_dev_fdopen" function.
>>
>> This breaks DRI3 (uses DMABUF) on drm-next-kmod (Linux 4.9 atm) e.g.,
>>
>> $ LIBGL_DRI3_ENABLE=1 LIBGL_DEBUG=verbose MESA_DEBUG=context glxgears
>> libGL: screen 0 does not appear to be DRI3 capable
>> libGL error: Connection closed during DRI3 initialization failure
>> XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server ":0"
>>after 22 requests (22 known processed) with 0 events remaining.
>>
>
> Hi,
>
> I'll have a look. It might be an issue in libdrm, because it uses some
> out-of date methods to enumerate the device nodes, like the major and
> minor numbers.
>
> Did you recompile drm-next-kmod after recompiling the LinuxKPI?

Yes, recompiled. However, this commit in particular doesn't touch any
kernel headers for recompilation to be necessary. I also confirm
reverting the commit works around the issue.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r328436 - head/sys/compat/linuxkpi/common/src

2018-02-01 Thread Jan Beich
Hans Petter Selasky  writes:

> Author: hselasky
> Date: Fri Jan 26 10:49:02 2018
> New Revision: 328436
> URL: https://svnweb.freebsd.org/changeset/base/328436
>
> Log:
>   Decouple Linux files from the belonging character device right after open
>   in the LinuxKPI. This is done by calling finit() just before returning a 
> magic
>   value of ENXIO in the "linux_dev_fdopen" function.

This breaks DRI3 (uses DMABUF) on drm-next-kmod (Linux 4.9 atm) e.g.,

$ LIBGL_DRI3_ENABLE=1 LIBGL_DEBUG=verbose MESA_DEBUG=context glxgears
libGL: screen 0 does not appear to be DRI3 capable
libGL error: Connection closed during DRI3 initialization failure
XIO:  fatal IO error 35 (Resource temporarily unavailable) on X server ":0"
  after 22 requests (22 known processed) with 0 events remaining.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r318780 - in head: include sys/sys

2017-08-03 Thread Jan Beich
Konstantin Belousov  writes:

> -#ifndef _POSIX_SOURCE
> +#if __BSD_VISIBLE
>  #define  ONLCR   0x0002  /* map NL to CR-NL (ala CRMOD) 
> */

This caused a regression for apps building with _XOPEN_SOURCE e.g.,
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220843

DragonFly uses __XSI_VISIBLE for ONLCR and other XSI extensions.
https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e08b3836c962
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320240 - head/include

2017-06-27 Thread Jan Beich
Ed Schouten <e...@nuxi.nl> writes:

> 2017-06-27 7:02 GMT+02:00 Jan Beich <jbe...@freebsd.org>:
>> thus regressing some ports e.g.,
>>
>> [...]
>>
>> https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20170626/493679.html
>
> Would there be an easy way for me to extract a list of ports that are 
> affected?

"fgrep -r max_align" over error logs[1] from a complete build suggests only
www/libxul is busted which was fixed upstream[2]. I'll backport it shortly.

False alarm. Sorry.

[1] 
http://beefy11.nyi.freebsd.org/data/head-i386-default/p444252_s320323/logs/errors/

http://beefy12.nyi.freebsd.org/data/head-amd64-default/p444252_s320323/logs/errors/
[2] https://github.com/kinetiknz/nestegg/pull/31
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r320240 - head/include

2017-06-26 Thread Jan Beich
Ed Schouten  writes:

> Author: ed
> Date: Thu Jun 22 18:39:52 2017
> New Revision: 320240
> URL: https://svnweb.freebsd.org/changeset/base/320240
>
> Log:
>   Use __ISO_C_VISIBLE, as opposed to testing __STDC_VERSION__.
>   
>   FreeBSD's C library uses __STDC_VERSION__ to determine whether the
>   compiler provides language features specific to a certain version of the
>   C standard. __ISO_C_VISIBLE is used to specify which library features
>   need to be exposed.
>   
>   max_align_t currently uses __STDC_VERSION__, even though it should be
>   using __ISO_C_VISIBLE to remain consistent with the rest of the headers
>   in include/.
>   
>   Reviewed by:dim
>   MFC after:  1 month
>   Differential Revision:  https://reviews.freebsd.org/D11303
>
> Modified:
>   head/include/stddef.h
>
> Modified: head/include/stddef.h
> ==
> --- head/include/stddef.h Thu Jun 22 17:10:34 2017(r320239)
> +++ head/include/stddef.h Thu Jun 22 18:39:52 2017(r320240)
> @@ -62,7 +62,7 @@ typedef ___wchar_t  wchar_t;
>  #endif
>  #endif
>  
> -#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
> +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
>  #ifndef __CLANG_MAX_ALIGN_T_DEFINED
>  typedef  __max_align_t   max_align_t;
>  #define __CLANG_MAX_ALIGN_T_DEFINED

max_align_t is now exposed even without -std=c11.

#+begin_src c
  $ cat a.c
  #include 

  /*
   *a type with the most strict alignment requirements
   */
  union max_align
  {
  char   c;
  short  s;
  long   l;
  inti;
  float  f;
  double d;
  void * v;
  void (*q)(void);
  };

  typedef union max_align max_align_t;

  int main(int argc, char *argv[])
  {
return 0;
  }

  $ cc -std=gnu89 a.c
  a.c:18:14: error: typedef redefinition with different types ('void' vs 
'__max_align_t')
  typedef void max_align_t;
   ^
  /usr/include/stddef.h:67:23: note: previous definition is here
  typedef __max_align_t   max_align_t;
  ^
  1 error generated.
#+end_src c

thus regressing some ports e.g.,

#+begin_src c
  cc -o Unified_c_media_libnestegg_src0.o -c ... -std=gnu99 ... 
Unified_c_media_libnestegg_src0.c
  In file included from 
obj-i386-unknown-freebsd12.0/media/libnestegg/src/Unified_c_media_libnestegg_src0.c:2:
  In file included from media/libnestegg/src/halloc.c:19:
  media/libnestegg/src/align.h:42:25: error: typedef redefinition with 
different types ('union max_align' vs '__max_align_t')
  typedef union max_align max_align_t;
  ^
  /usr/include/stddef.h:67:23: note: previous definition is here
  typedef __max_align_t   max_align_t;
  ^
  1 error generated.
#+end_src c

https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20170626/493679.html
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r311667 - in head/sys/contrib/dev/acpica: components/namespace components/tables include

2017-01-08 Thread Jan Beich
"Conrad E. Meyer"  writes:

> +++ head/sys/contrib/dev/acpica/components/tables/tbxface.c   Sun Jan  8 
> 06:26:33 2017(r311667)
> @@ -314,11 +314,12 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader)
>  
>  
> /***
>   *
> - * FUNCTION:AcpiGetTable
> + * FUNCTION:AcpiGetTableWithSize
>   *
>   * PARAMETERS:  Signature   - ACPI signature of needed table
>   *  Instance- Which instance (for SSDTs)
>   *  OutTable- Where the pointer to the table is 
> returned
> + *  TblSize - Size of the table
>   *
>   * RETURN:  Status and pointer to the requested table
>   *
> @@ -333,10 +334,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader)
>   
> **/
>  
>  ACPI_STATUS
> -AcpiGetTable (
> +AcpiGetTableWithSize (

Can you adjust ACPI_EXPORT_SYMBOL() as well? It doesn't make sense to
export AcpiGetTable() twice but compiler won't complain if you do.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r308996 - head/lib/libfetch

2016-11-30 Thread Jan Beich
Dag-Erling Smørgrav  writes:

>  conn_t *
>  fetch_connect(const char *host, int port, int af, int verbose)
>  {
[...]
> + fetch_info("resolved");

Can you hide it behind "verbose" flag to avoid confusion?

  $ pkg
  The package management tool is not yet installed on your system.
  Do you want to fetch and install it now? [y/N]: y
  Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, 
please wait...
  resolved
  resolved
  [...]

  $ fetch -q http://example.com
  resolved
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r303033 - head/share/man/man7

2016-07-19 Thread Jan Beich
Ed Maste  writes:

> +.It Sy Architecture Ta Sy Page Sizes
> +.It amd64   Ta 4K, 2M, 1G

Does FreeBSD support 1G pages nowadays?

$ sysctl hw.pagesizes
hw.pagesizes: 4096 2097152 0

$ dmesg | fgrep -i 1gb
  AMD Features=0x2c100800

> +.Ss Predefined Macros
> +The compiler provides a number of predefined macros.
> +Some of these provide architecture-specific details and are explained below.
> +Other macros, including those required by the language standard, are not
> +included here.
[...]
> +cc -x c -Dm -E /dev/null

Typo: -Dm vs. -dM

> +.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .

Are these really compiler macros? I think,  defines them.

$ clang38 -x c -dM -E /dev/null | fgrep ENDIAN
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __LITTLE_ENDIAN__ 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_PDP_ENDIAN__ 3412

$ gcc5 -x c -dM -E /dev/null | fgrep ENDIAN
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __ORDER_PDP_ENDIAN__ 3412
#define __ORDER_BIG_ENDIAN__ 4321
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__


signature.asc
Description: PGP signature


Re: svn commit: r302163 - in head/sys: cam conf

2016-07-03 Thread Jan Beich
Warner Losh  writes:

> Author: imp
> Date: Thu Jun 23 23:20:58 2016
> New Revision: 302163
> URL: https://svnweb.freebsd.org/changeset/base/302163
>
> Log:
>   Rename CAM_NETFLIX_IOSCHED to CAM_IOSCHED_DYNAMIC to better reflect
>   its nature.
>   
>   Approved by: re
>   Reviewed By: jhb
>   Differential Revision: https://reviews.freebsd.org/D6811

Do you plan to rename kern.cam.do_netflix_iosched sysctl as well?


signature.asc
Description: PGP signature


Re: svn commit: r299448 - in head/sys/cddl/contrib/opensolaris: common/acl uts/common/fs/zfs uts/common/sys

2016-06-14 Thread Jan Beich
Alexander Motin  writes:

> Author: mav
> Date: Wed May 11 13:43:20 2016
> New Revision: 299448
> URL: https://svnweb.freebsd.org/changeset/base/299448
>
> Log:
>   MFV r299442: 6762 POSIX write should imply DELETE_CHILD on directories - and
>   some additional considerations
>   
>   Reviewed by: Gordon Ross 
>   Reviewed by: Yuri Pankov 
>   Author: Kevin Crowe 
>   
>   openzfs/openzfs@d316fffc9c361532a482208561bbb614dac7f916

This commit confuses acl_is_trivial_np(3). Notice '+' in ls(1) and 'D'
in getfacl(1) outputs.

  $ ls -ld /etc
  drwxr-xr-x  28 root  wheel  121 Jun 10 11:03 /etc
  $ getfacl -q /etc
  owner@:rwxp--aARWcCos:---:allow
  group@:r-x---a-R-c--s:---:allow
   everyone@:r-x---a-R-c--s:---:allow

  $ mkdir /foo
  $ ls -ld /foo
  drwxr-xr-x+  2 root  wheel2 Jun 14 08:17 /foo
  $ getfacl -q /foo
  owner@:rwxpD-aARWcCos:---:allow
  group@:r-x---a-R-c--s:---:allow
   everyone@:r-x---a-R-c--s:---:allow  

  $ zfs get all rootfs | fgrep acl
  rootfs aclmode   discarddefault
  rootfs aclinheritrestricted default


signature.asc
Description: PGP signature


Re: svn commit: r301172 - head/contrib/blacklist

2016-06-03 Thread Jan Beich
Kurt Lidl  writes:

> Author: lidl
> Date: Wed Jun  1 22:04:10 2016
> New Revision: 301172
> URL: https://svnweb.freebsd.org/changeset/base/301172
>
> Log:
>   Import NetBSD's blacklist source from vendor tree
>   
>   This import includes The basic blacklist library and utility programs,
>   to add a system-wide packet filtering notification mechanism to
>   FreeBSD.
>   
>   The rational behind the daemon was given by Christos Zoulas in a
>   presentation at vBSDcon 2015: https://youtu.be/fuuf8G28mjs
>   
>   Reviewed by:rpaulo
>   Approved by:rpaulo
>   Obtained from:  NetBSD
>   Relnotes:   YES

Can you track FreeBSD version in manpages? Maybe ping upstream, so they
add .Fx as well.

$ fgrep .Nx contrib/blacklist/**/*.[0-9]
contrib/blacklist/bin/blacklistctl.8:.Nx 7 .
contrib/blacklist/bin/blacklistd.8:.Nx 7 .
contrib/blacklist/bin/blacklistd.conf.5:.Nx 7 .

$ man blacklistd | col -b | fgrep -A1 HISTORY
HISTORY
 blacklistd appeared in NetBSD 7.


signature.asc
Description: PGP signature


Re: svn commit: r301010 - in head/sys: cddl/contrib/opensolaris/common/zfs cddl/contrib/opensolaris/uts/common cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/fs/zfs/sys

2016-05-31 Thread Jan Beich
Allan Jude  writes:

> Author: allanjude
> Date: Tue May 31 04:12:14 2016
> New Revision: 301010
> URL: https://svnweb.freebsd.org/changeset/base/301010
>
> Log:
>   Connect the SHA-512t256 and Skein hashing algorithms to ZFS
>   
>   Support for the new hashing algorithms in ZFS was introduced in r289422
>   However it was disconnected because FreeBSD lacked implementations of
>   SHA-512 (truncated to 256 bits), and Skein.
>   
>   These implementations were introduced in r300921 and r300966 respectively
>   
>   This commit connects them to ZFS and enabled these new checksum algorithms
>   
>   This new algorithms are not supported by the boot blocks, so do not use them
>   on your root dataset if you boot from ZFS.

Can you document the feature and booting caveat in zpool-features(7) manpage?
And Illumos seems to limit booting support to pools vs. datasets.

  Booting off of pools using skein is NOT supported -- any attempt to
  enable skein on a root pool will fail with an error.

https://illumos.org/man/5/zpool-features


signature.asc
Description: PGP signature


Re: svn commit: r298537 - head/etc/rc.d

2016-04-24 Thread Jan Beich
Jens Schweikhardt  writes:

>  - parenthesize the "case" string for symmetry and improved
>search for matching paren (e.g. with vi's %)
[...]
>   case "${state}" in
> - [oO][nN])
> + ([oO][nN])
>   swapon /dev/zvol/${name}
>   ;;

For style consistency is more important. Why this case is special unlike
the rest of rc.d/* or rc.subr ?


signature.asc
Description: PGP signature


Re: svn commit: r297685 - in head/sys: conf dev/kbdmux modules/kbdmux

2016-04-07 Thread Jan Beich
Ngie Cooper  writes:

> On Thu, Apr 7, 2016 at 1:12 PM, Ed Maste  wrote:
>
>> Author: emaste
>> Date: Thu Apr  7 20:12:45 2016
>> New Revision: 297685
>> URL: https://svnweb.freebsd.org/changeset/base/297685
>>
>> Log:
>>   Add option to specify built-in keymap for kbdmux
>>
>>   PR:   153459
>>   Submitted by: swel...@gmail.com
>
> This doesn't seem to work in the sys/modules/kbdmux case (kbdmuxmap.h
> isn't generated via sys/modules/kbdmux/Makefile) -- should it be
> generated there as well?

Probably not. KBDMUX_DFLT_KEYMAP can only be defined via kernel config(5).
This is similar to sys/modules/usb/ukbd + opt_ukbd.h. So, build modules
as part of |make buildkernel|.


signature.asc
Description: PGP signature


Re: svn commit: r296823 - in head: sbin/ifconfig sys/net80211

2016-03-14 Thread Jan Beich
Adrian Chadd  writes:

> Author: adrian
> Date: Mon Mar 14 04:39:35 2016
> New Revision: 296823
> URL: https://svnweb.freebsd.org/changeset/base/296823
>
> Log:
>   [net80211] handle unlisted information elements.
>   
>   This displays the IE names in ifconfig but it doesn't yet decode things.
>   
>   Submitted by: Idwer Vollering 
>   Differential Revision:  https://reviews.freebsd.org/D3782
[...]
> Modified: head/sys/net80211/ieee80211.h
[...]
> +struct ieee80211_ap_chan_report_ie {
> + uint8_t ie;
> + uint8_t len;
> + uint8_t class; /* operating class */

"class" is a reserved keyword in C++. www/firefox implements wifi
geolocation in C++, so it's now broken. www/chromium is probably also
affected.

  In file included from netwerk/wifi/Unified_cpp_netwerk_wifi0.cpp:20:
  In file included from netwerk/wifi/nsWifiScannerFreeBSD.cpp:19:
  In file included from /usr/include/net80211/ieee80211_ioctl.h:35:
  /usr/include/net80211/ieee80211.h:800:11: error: declaration of anonymous 
class must be a definition
  uint8_t class; /* operating class */
  ^
  1 error generated.


signature.asc
Description: PGP signature


Re: svn commit: r294665 - head/usr.bin/ldd

2016-01-24 Thread Jan Beich
Ruslan Bukin  writes:

> Modified: head/usr.bin/ldd/ldd.c
> ==
> --- head/usr.bin/ldd/ldd.cSun Jan 24 15:12:49 2016(r294664)
> +++ head/usr.bin/ldd/ldd.cSun Jan 24 15:15:57 2016(r294665)
> @@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$");
>  
>  #include "extern.h"
>  
> -/* We don't support a.out executables on arm64 */
> -#ifndef __aarch64__
> +/* We don't support a.out executables on arm64 and riscv */
> +#if !defined(__aarch64__) && !defined(__riscv__)

a.out in userland is only supported by i386. On amd64 it'd mean 32bit jail
after |kldload aout|.

r292623 maybe an example fix if you can ignore whitespace noise.


signature.asc
Description: PGP signature


Re: svn commit: r293115 - head/etc

2016-01-04 Thread Jan Beich
Warner Losh  writes:

> Author: imp
> Date: Sun Jan  3 19:18:48 2016
> New Revision: 293115
> URL: https://svnweb.freebsd.org/changeset/base/293115
>
> Log:
>   Use /bin/rm to remove /firstboot*. Otherwise rm -i alias is picked
>   up and can cause issues on boot with the prompts.

Why do you have ~/.profile stuff leaking into rc* boot sequence?
And maybe use |command| instead.

  $ alias rm=foo /bin/rm=foo
  $ rm
  sh: foo: not found
  $ /bin/rm
  sh: foo: not found

  $ command rm
  usage: rm [-f | -i] [-dIPRrvWx] file ...
 unlink file

~/.profile may also contain syntax allowed by bash e.g.,

  $ rm() { bar; }; /bin/rm() { bar; }
  $ rm
  bash: bar: command not found
  $ /bin/rm
  bash: bar: command not found

  $ command rm
  rm: missing operand
  Try 'rm --help' for more information.


signature.asc
Description: PGP signature


Re: svn commit: r291079 - head/share/mk

2015-11-19 Thread Jan Beich
Warner Losh  writes:

> Author: imp
> Date: Thu Nov 19 17:06:12 2015
> New Revision: 291079
> URL: https://svnweb.freebsd.org/changeset/base/291079
>
> Log:
>   Add arm CPUTYPE values typically used on FreeBSD.
>
> Modified:
>   head/share/mk/bsd.cpu.mk

Why not put together with x86 examples? See /usr/share/examples/etc/make.conf


signature.asc
Description: PGP signature


Re: svn commit: r289114 - in head: libexec/dma/dmagent share/mk usr.sbin/ppp

2015-10-11 Thread Jan Beich
Baptiste Daroussin  writes:

> Modified: head/share/mk/bsd.own.mk
> ==
> --- head/share/mk/bsd.own.mk  Sat Oct 10 09:37:31 2015(r289113)
> +++ head/share/mk/bsd.own.mk  Sat Oct 10 10:48:09 2015(r289114)
> @@ -213,7 +213,7 @@ NLSGRP?=  ${SHAREGRP}
>  NLSMODE?=${NOBINMODE}
>  
>  INCLUDEDIR?= /usr/include
> -ETCDIR?= /etc
> +CONFIGDIR?=  /etc
>  
>  #
>  # install(1) parameters.

Why do you need CONFIGDIR when there's CONFDIR? Also, the former lacks
description in the header of the file.


signature.asc
Description: PGP signature


Re: svn commit: r289085 - head/share/mk

2015-10-11 Thread Jan Beich
Baptiste Daroussin  writes:

> +++ head/share/mk/bsd.confs.mkFri Oct  9 21:57:42 2015
> (r289085)
[...]
> +CONFGROUPS?= CONFS
[...]
> +.error bsd.conf.mk cannot be included directly.
> +.for group in ${CONFSGROUPS}

Typo: plural vs. singular

[...]
> +${group}OWN?=${SHAREOWN}
> +${group}GRP?=${SHAREGRP}
> +${group}MODE?=   ${SHAREMODE}
> +${group}DIR?=${ETCDIR}/

Have you considered patching bsd.files.mk instead of copying it just to
modify a few defaults? For one, bsd.confs.mk lacks r257095, r267276,
r284345, r287185 - anything from a few years ago.

Here's a quick attempt to merge changes back. Due to .mk files being
out of sync I may have missed some.

$ svn patch /path/to/below.diff
$ rm -f /usr/share/mk/bsd.files.mk
$ make -s install -C share/mk
$ make -sj2 all -C libexec/dma/dmagent
$ make -j2 install -C libexec/dma/dmagent
--- _proginstall ---
--- _FILESINS ---
--- _proginstall ---
install -s -o root -g mail -m 2555   dma /usr/libexec/dma
--- _FILESINS ---
install -o root -g wheel  -m 444 mailer.conf /usr/share/examples/dma
--- _CONFSINS ---
install -o root -g wheel  -m 644 dma.conf /etc/dma
--- _maninstall ---
install -o root -g wheel -m 444 dma.8.gz  /usr/share/man/man8

Index: share/mk/bsd.prog.mk
===
--- share/mk/bsd.prog.mk(revision 289150)
+++ share/mk/bsd.prog.mk(working copy)
@@ -249,7 +249,6 @@ _SCRIPTSINS_${script:T}: ${script}
 NLSNAME?=  ${PROG}
 .include 
 
-.include 
 .include 
 .include 
 .include 
Index: share/mk/bsd.files.mk
===
--- share/mk/bsd.files.mk   (revision 289150)
+++ share/mk/bsd.files.mk   (working copy)
@@ -7,7 +7,8 @@
 .if !target()
 :
 
-FILESGROUPS?=  FILES
+FILESGROUPS?=  FILES CONFS
+FILESVARPREFIX?=FILES.SHARE CONFS.CONF
 
 .for group in ${FILESGROUPS}
 # Add in foo.yes and remove duplicates from all the groups
@@ -22,10 +23,10 @@ all: buildfiles
 .if defined(${group}) && !empty(${group})
 installfiles: installfiles-${group}
 
-${group}OWN?=  ${SHAREOWN}
-${group}GRP?=  ${SHAREGRP}
-${group}MODE?= ${SHAREMODE}
-${group}DIR?=  ${BINDIR}
+${group}OWN?=  ${${FILESVARPREFIX:M${group}.*:E}OWN}
+${group}GRP?=  ${${FILESVARPREFIX:M${group}.*:E}GRP}
+${group}MODE?= ${${FILESVARPREFIX:M${group}.*:E}MODE}
+${group}DIR?=  ${${FILESVARPREFIX:M${group}.*:E}DIR}
 .if !make(buildincludes)
 STAGE_SETS+=   ${group}
 .endif
@@ -56,7 +57,7 @@ stage_as.${file:T}: ${file}
 
 installfiles-${group}: _${group}INS_${file:T}
 _${group}INS_${file:T}: ${file}
-   ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
+   ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \
-g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
${.ALLSRC} \
${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
@@ -70,11 +71,11 @@ stage_files.${group}: ${_${group}FILES}
 installfiles-${group}: _${group}INS
 _${group}INS: ${_${group}FILES}
 .if defined(${group}NAME)
-   ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+   ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \
-m ${${group}MODE} ${.ALLSRC} \
${DESTDIR}${${group}DIR}/${${group}NAME}
 .else
-   ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+   ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \
-m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
 .endif
 .endif
Index: share/mk/bsd.lib.mk
===
--- share/mk/bsd.lib.mk (revision 289150)
+++ share/mk/bsd.lib.mk (working copy)
@@ -390,7 +390,6 @@ _libinstall:
 .include 
 .include 
 .include 
-.include 
 .endif
 
 .include 


signature.asc
Description: PGP signature


Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc

2015-08-18 Thread Jan Beich
Jason Evans jas...@freebsd.org writes:

 Index: include/malloc_np.h
[...]
 +typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, 
 unsigned);
 +typedef bool (chunk_dalloc_t)(void *, size_t, bool, unsigned);

malloc_np.h changes regressing consumers isn't surprising given the lack
of tests for jemalloc shipped with FreeBSD.

  $ cc -include malloc_np.h -c -xc -/dev/null
  In file included from built-in:311:
  In file included from command line:1:
  /usr/include/malloc_np.h:39:55: error: unknown type name 'bool'
  typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, 
unsigned);
^
  /usr/include/malloc_np.h:39:63: error: unknown type name 'bool'
  typedef void *(chunk_alloc_t)(void *, size_t, size_t, bool *, bool *, 
unsigned);
^
  [...]

 +  - Remove the --enable-dss options, and make dss non-optional on all 
 platforms
 +which support sbrk(2).

FREEBSD-upgrade still references it.

 Modified: head/contrib/jemalloc/doc/jemalloc.3
[...]
 @@ -53,8 +51,7 @@ make variable)\.
  .sp
  .ft B
  .nf
 -#include stdlib\.h
 -#include malloc_np\.h
 +#include jemalloc/jemalloc\.h

Bad rebase.

 +  - Add sdallocx(), which implements sized deallocation.  The primary
 +optimization over dallocx() is the removal of a metadata read, which 
 often
 +suffers an L1 cache miss.
 [...]
 +  - Remove the *allocm() API, which is superseded by the *allocx() API.
 
 Symbol.map and manpages haven't been updated.
 [...]

 Committed; thanks!

Stale links have to be removed as well.

Index: contrib/jemalloc/FREEBSD-diffs
===
--- contrib/jemalloc/FREEBSD-diffs  (revision 286894)
+++ contrib/jemalloc/FREEBSD-diffs  (working copy)
@@ -20,7 +20,14 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xm
/refsect1
refsynopsisdiv
  titleSYNOPSIS/title
-@@ -2759,4 +2770,18 @@ malloc_conf = lg_chunk:24;]]/programlisting/para
+ funcsynopsis
+-  funcsynopsisinfo#include lt;filename 
class=headerfilejemalloc/jemalloc.h/filenamegt;/funcsynopsisinfo
++  funcsynopsisinfo#include lt;filename 
class=headerfilestdlib.h/filenamegt;
++#include lt;filename 
class=headerfilemalloc_np.h/filenamegt;/funcsynopsisinfo
+   refsect2
+ titleStandard API/title
+ funcprototype
+@@ -2759,4 +2771,18 @@ malloc_conf = lg_chunk:24;]]/programlisting/para
  paraThe functionposix_memalignparameter//function function 
conforms
  to IEEE Std 1003.1-2001 (ldquo;POSIX.1rdquo;)./para
/refsect1
Index: contrib/jemalloc/FREEBSD-upgrade
===
--- contrib/jemalloc/FREEBSD-upgrade(revision 286894)
+++ contrib/jemalloc/FREEBSD-upgrade(working copy)
@@ -72,7 +72,7 @@ do_extract() {
 patch -p1  ${src}/FREEBSD-diffs
 find . -name '*.orig' -delete
 # Generate various files.
-./autogen.sh --enable-cc-silence --enable-dss --enable-xmalloc \
+./autogen.sh --enable-cc-silence --enable-xmalloc \
   --enable-utrace --with-xslroot=/usr/local/share/xsl/docbook \
   --with-private-namespace=__ --with-lg-page-sizes=12,13,14,16
 gmake dist
Index: contrib/jemalloc/doc/jemalloc.3
===
--- contrib/jemalloc/doc/jemalloc.3 (revision 286894)
+++ contrib/jemalloc/doc/jemalloc.3 (working copy)
@@ -51,7 +51,8 @@ make variable)\.
 .sp
 .ft B
 .nf
-#include jemalloc/jemalloc\.h
+#include stdlib\.h
+#include malloc_np\.h
 .fi
 .ft
 .SS Standard API
Index: include/malloc_np.h
===
--- include/malloc_np.h (revision 286893)
+++ include/malloc_np.h (working copy)
@@ -33,6 +33,7 @@
 #define_MALLOC_NP_H_
 #include sys/cdefs.h
 #include sys/types.h
+#include stdbool.h
 #include strings.h
 
 __BEGIN_DECLS
Index: ObsoleteFiles.inc
===
--- ObsoleteFiles.inc   (revision 286893)
+++ ObsoleteFiles.inc   (working copy)
@@ -38,6 +38,12 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20150818: *allocm() are gone in jemalloc 4.0.0
+OLD_FILES+=usr/share/man/man3/allocm.3.gz
+OLD_FILES+=usr/share/man/man3/dallocm.3.gz
+OLD_FILES+=usr/share/man/man3/nallocm.3.gz
+OLD_FILES+=usr/share/man/man3/rallocm.3.gz
+OLD_FILES+=usr/share/man/man3/sallocm.3.gz
 # 20150802: Remove netbsd's test on pw(8)
 OLD_FILES+=usr/tests/usr.sbin/pw/pw_test
 # 20150719: Remove libarchive.pc


signature.asc
Description: PGP signature


Re: svn commit: r286866 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc

2015-08-17 Thread Jan Beich
Jason Evans jas...@freebsd.org writes:

 Author: jasone
 Date: Tue Aug 18 00:21:25 2015
 New Revision: 286866
 URL: https://svnweb.freebsd.org/changeset/base/286866

 Log:
   Update jemalloc to version 4.0.0.

Can you bump __FreeBSD_version for non-standard API changes? Some ports
like www/firefox may want to take advantage of it without complicating
configure scripts.

 +  - Add sdallocx(), which implements sized deallocation.  The primary
 +optimization over dallocx() is the removal of a metadata read, which 
 often
 +suffers an L1 cache miss.
[...]
+  - Remove the *allocm() API, which is superseded by the *allocx() API.

Symbol.map and manpages haven't been updated.

  $ nm -D /lib/libc.so.7 | fgrep sdalloc

Index: lib/libc/stdlib/jemalloc/Makefile.inc
===
--- lib/libc/stdlib/jemalloc/Makefile.inc   (revision 285602)
+++ lib/libc/stdlib/jemalloc/Makefile.inc   (working copy)
@@ -39,12 +39,8 @@ MLINKS+= \
jemalloc.3 xallocx.3 \
jemalloc.3 sallocx.3 \
jemalloc.3 dallocx.3 \
+   jemalloc.3 sdallocx.3 \
jemalloc.3 nallocx.3 \
-   jemalloc.3 allocm.3 \
-   jemalloc.3 rallocm.3 \
-   jemalloc.3 sallocm.3 \
-   jemalloc.3 dallocm.3 \
-   jemalloc.3 nallocm.3 \
jemalloc.3 malloc.conf.5
 
 .if defined(MALLOC_PRODUCTION)
Index: lib/libc/stdlib/jemalloc/Symbol.map
===
--- lib/libc/stdlib/jemalloc/Symbol.map (revision 285602)
+++ lib/libc/stdlib/jemalloc/Symbol.map (working copy)
@@ -51,6 +51,11 @@ FBSD_1.3 {
__nallocm;
 };
 
+FBSD_1.4 {
+   sdallocx;
+   __sdallocx;
+};
+
 FBSDprivate_1.0 {
_malloc_thread_cleanup;
_malloc_prefork;


signature.asc
Description: PGP signature


Re: svn commit: r278934 - in head: cddl/contrib/opensolaris/lib/libdtrace/common share/mk

2015-08-10 Thread Jan Beich
Mark Johnston ma...@freebsd.org writes:

 Author: markj
 Date: Wed Feb 18 03:54:54 2015
 New Revision: 278934
 URL: https://svnweb.freebsd.org/changeset/base/278934

 Log:
   Remove drti.o's dependency on libelf. This makes it possible to add DTrace
   probes to userland programs and libraries without also needing to link
   libelf.
   
   dtrace -G places the __SUNW_dof symbol at the beginning of the DOF (DTrace
   probe and provider metdata) section in the generated object file; drti.o
   now just uses this symbol to locate the section. A complication occurs
   when multiple dtrace-generated object files are linked together, since the
   __SUNW_dof symbol defined in each file is global. This is handled by
   using objcopy(1) to convert __SUNW_dof to a local symbol once drti.o has
   been linked with the generated object file. Upstream, this is done using a
   linker feature not present in GNU ld.
   
   Differential Revision:  https://reviews.freebsd.org/D1757
   Reviewed by:rpaulo
   MFC after:  1 month
   Relnotes:   yes

Any reason this wasn't MFC'd yet? It would serve as incentive to *not*
add FreeBSD-specific conditionals for building dtrace probes in various
upstream projects.


signature.asc
Description: PGP signature


Re: svn commit: r286524 - in head: . etc sys/dev/drm sys/dev/drm2

2015-08-09 Thread Jan Beich
Koop Mast k...@freebsd.org writes:

 Author: kwm (ports committer)
 Date: Sun Aug  9 12:58:56 2015
 New Revision: 286524
 URL: https://svnweb.freebsd.org/changeset/base/286524

 Log:
   Add a new group named 'video' with the id of 44. And make drm create
   devices in /dev/dri/ with this new group.

Would 'video' group include capture devices as well? Linux seems to mix
/dev/nvidia*, /dev/fb* and /dev/video* all under same group despite
all of them have different attack vectors.

 Modified: head/sys/dev/drm/drmP.h
 ==
 --- head/sys/dev/drm/drmP.h   Sun Aug  9 12:20:22 2015(r286523)
 +++ head/sys/dev/drm/drmP.h   Sun Aug  9 12:58:56 2015(r286524)
 @@ -175,7 +175,7 @@ SYSCTL_DECL(_hw_drm);
  
  #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
  #define DRM_DEV_UID  0
 -#define DRM_DEV_GID  0
 +#define DRM_DEV_GID  44  /* video group */

Why hardcode? Linux often uses udev(7) rules to assign a group which on
FreeBSD can easily be translated into devd.conf(5) or devfs.rules(5).

Having 'video' assigned by kernel wouldn't eliminate having to run
mergemaster/etcupdate + pw groupmod on upgrade.


signature.asc
Description: PGP signature


Re: svn commit: r284107 - head/sys/cddl/compat/opensolaris/sys

2015-06-09 Thread Jan Beich
Andriy Gapon a...@freebsd.org writes:

 Author: avg
 Date: Sun Jun  7 08:54:25 2015
 New Revision: 284107
 URL: https://svnweb.freebsd.org/changeset/base/284107

 Log:
   compat nvpair.h: make sure that the names are mangled only for kernel
   
   Currently there is no good reason to mangle the userland API.
   The change was introduced in eac1d566b46edef765754203bef22c75c1699966,
   r279437.  Also see https://reviews.freebsd.org/D1881.

Can you bump __FreeBSD_version? At least sysutils/geomWatch requires it.

https://svnweb.freebsd.org/changeset/ports/388906


signature.asc
Description: PGP signature


Re: svn commit: r284107 - head/sys/cddl/compat/opensolaris/sys

2015-06-09 Thread Jan Beich
Andriy Gapon a...@freebsd.org writes:

 On 09/06/2015 13:31, Jan Beich wrote:

 Andriy Gapon a...@freebsd.org writes:
 
 Author: avg Date: Sun Jun  7 08:54:25 2015 New Revision: 284107 URL:
 https://svnweb.freebsd.org/changeset/base/284107
 
 Log: compat nvpair.h: make sure that the names are mangled only for
 kernel
 
 Currently there is no good reason to mangle the userland API. The change
 was introduced in eac1d566b46edef765754203bef22c75c1699966, r279437.
 Also see https://reviews.freebsd.org/D1881.
 
 Can you bump __FreeBSD_version? At least sysutils/geomWatch requires it.
 
 https://svnweb.freebsd.org/changeset/ports/388906

 There should have been a bug report and an src fix instead of (parts of)
 https://svnweb.freebsd.org/ports?view=revisionrevision=386870

Good point. However, opensolaris libs have unclear ABI guarantees. Their
API is not exposed but the libs aren't marked PRIVATELIB. Some symbols
are removed on updates *without* corresponding SHLIB_MAJOR bumps.
libnvpair is mostly unchanged between 8.4R and 11.0C, though.

  # shouldn't be possible without libzfs.so.2 in libmap.conf
  /poudriere/jails/84amd64/sbin/zfs: Undefined symbol zpool_set_history_str

 I wonder why the libnvpair ABI breakage was silently accepted but the ABI fix
 requires some special magic...

I'll probably back out ports@386870 and ports@388906 after a while.
libnvpair with bogus ABI existed on 11.0C for 3 months, enough to end up
in the binary snapshots a few times.


signature.asc
Description: PGP signature


Re: svn commit: r281131 - head/etc

2015-04-14 Thread Jan Beich
Baptiste Daroussin b...@freebsd.org writes:

 Log:
   Enforce LC_COLLATE=C until we do support proper UTF-8 collation
[...]
 - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
 + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:LC_COLLATE=C:\

Did you mean to append value to :setenv instead of defining
a separate capability?

Index: etc/login.conf
===
--- etc/login.conf  (revision 281134)
+++ etc/login.conf  (working copy)
@@ -26,7 +26,7 @@ default:\
:passwd_format=sha512:\
:copyright=/etc/COPYRIGHT:\
:welcome=/etc/motd:\
-   :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:LC_COLLATE=C:\
+   :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,LC_COLLATE=C:\
:path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin 
~/bin:\
:nologin=/var/run/nologin:\
:cputime=unlimited:\


signature.asc
Description: PGP signature


Re: svn commit: r279487 - head/sys/dev/pci

2015-03-02 Thread Jan Beich
Jean-Sebastien Pedron dumbb...@freebsd.org writes:

 Modified: head/sys/dev/pci/vga_pci.c
[...]
 +int
 +vga_pci_repost(device_t dev)
 +{
 +#if defined(__amd64__) || defined(__i386__)
 + x86regs_t regs;
 +
 + if (!vga_pci_is_boot_display(dev))
 + return (EINVAL);
 +
 + if (x86bios_get_orm(VGA_PCI_BIOS_SHADOW_ADDR) == NULL)
 + return (ENOTSUP);
 +
 + x86bios_init_regs(regs);
[...]

This breaks build for a kernel without VESA or X86BIOS. Also, x86bios
maybe loaded later as a module.

$ make buildkernel
--- kernel.debug ---
linking kernel.debug
vga_pci.o: In function `vga_pci_repost':
/usr/src/sys/dev/pci/vga_pci.c:208: undefined reference to `x86bios_get_orm'
/usr/src/sys/dev/pci/vga_pci.c:211: undefined reference to `x86bios_init_regs'
/usr/src/sys/dev/pci/vga_pci.c:218: undefined reference to `x86bios_call'
/usr/src/sys/dev/pci/vga_pci.c:221: undefined reference to `x86bios_get_intr'
*** [kernel.debug] Error code 1


signature.asc
Description: PGP signature


Re: svn commit: r278616 - in head: . contrib/netbsd-tests/games etc etc/mtree etc/root games games/caesar games/fortune/datfiles release/scripts share/man/man4 share/man/man6 share/man/man7 share/mk s

2015-02-12 Thread Jan Beich
Devin Teske de...@shxd.cx writes:

 PLEASE! Do NOT remove the grand digital clock (grdc).

 So many of us over the years have used it as a terminal keeper-aliver :) (and 
 as a clock, to boot).

 I will be very sad if you remove grdc.

Aren't there better alternatives in ports? clock-mode in sysutils/tmux,
sysutils/tty-clock, sysutils/currtime to name a few.

OTOH, grdc(6) lacks a license, unmaintained, has a few PRs with patches.
Not to mention it paints the whole terminal black sans the glitchy
NCURSES_ASSUMED_COLORS=-1,-1.


signature.asc
Description: PGP signature


svn commit: r277444 - head/share/misc

2015-01-20 Thread Jan Beich
Author: jbeich (ports committer)
Date: Tue Jan 20 21:49:50 2015
New Revision: 277444
URL: https://svnweb.freebsd.org/changeset/base/277444

Log:
  - Add jbeich as a ports committer
  - List bapt and flo as his mentors
  
  Differential Revision:https://reviews.freebsd.org/D1562
  Approved by:  flo (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotTue Jan 20 21:48:42 2015
(r277443)
+++ head/share/misc/committers-ports.dotTue Jan 20 21:49:50 2015
(r277444)
@@ -116,6 +116,7 @@ itetcu [label=Ion-Mihai Tetcu\nitetcu@F
 jacula [label=Giuseppe Pilichi\njac...@freebsd.org\n2010/04/05]
 jadawin [label=Philippe Audeoud\njada...@freebsd.org\n2008/03/02]
 jase [label=Jase Thew\nj...@freebsd.org\n2012/05/30]
+jbeich [label=Jan Beich\njbe...@freebsd.org\n2015/01/19]
 jgh [label=Jason Helfman\n...@freebsd.org\n2011/12/16]
 jhale [label=Jason E. Hale\njh...@freebsd.org\n2012/09/10]
 jkim [label=Jung-uk Kim\nj...@freebsd.org\n2007/09/12]
@@ -267,6 +268,7 @@ bapt - bdrewery
 bapt - bofh
 bapt - eadler
 bapt - grembo
+bapt - jbeich
 bapt - jlaffaye
 bapt - marius
 bapt - marino
@@ -350,6 +352,7 @@ fjoe - osa
 
 flo - bar
 flo - jase
+flo - jbeich
 flo - grembo
 
 flz - garga
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r276941 - head/release/doc/en_US.ISO8859-1/relnotes

2015-01-10 Thread Jan Beich
Glen Barber g...@freebsd.org writes:

 Log:
   Document r273598, /dev/heptN devices for HPET access from
   userland.
[...]
 +para revision=273598The man.hpet.4; driver has been updated
 +  to create a
 +  filename/dev/heptreplaceableN/replaceable/filename

Typo: /dev/hpetN vs /dev/heptN

-

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r274177 - in head: share/man/man9 sys/net sys/netinet sys/netinet6 sys/sys

2014-11-06 Thread Jan Beich
Alexander V. Chernikov melif...@freebsd.org writes:

 Log:
   Finish r274118: remove useless fields from struct domain.
[...]
 Modified: head/sys/sys/domain.h
 ==
 --- head/sys/sys/domain.h Thu Nov  6 13:13:47 2014(r274176)
 +++ head/sys/sys/domain.h Thu Nov  6 14:39:04 2014(r274177)
 @@ -60,8 +60,6 @@ struct domain {
   (void **, int);
   int (*dom_rtdetach) /* clean up routing table */
   (void **, int);
 - int dom_rtoffset;   /* an arg to rtattach, in bits */
 - int dom_maxrtkey;   /* for routing layer */
   void*(*dom_ifattach)(struct ifnet *);
   void(*dom_ifdetach)(struct ifnet *, void *);
   int (*dom_ifmtu)(struct ifnet *);

It breaks build for options DDB, default in GENERIC on -CURRENT branch.

$ make buildkernel
...
--- uipc_debug.o ---
sys/kern/uipc_debug.c:258:38: error: no member named 'dom_rtoffset' in 'struct 
domain'
db_printf(dom_rtoffset: %d   , d-dom_rtoffset);
 ~  ^
sys/kern/uipc_debug.c:259:37: error: no member named 'dom_maxrtkey' in 'struct 
domain'
db_printf(dom_maxrtkey: %d\n, d-dom_maxrtkey);
~  ^

-

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r273762 - head/sys/modules/dtrace/dtraceall

2014-11-01 Thread Jan Beich
Julian Elischer jul...@freebsd.org writes:

 Log:
   Allow loading of dtraceall without nfscl if what you really wnat is 
 nfsclient

... or if what you really want is neither, no NFS by default.

   
   Obtained from:  Panzura tree
   MFC after:  1 week

 Modified:
   head/sys/modules/dtrace/dtraceall/dtraceall.c

 Modified: head/sys/modules/dtrace/dtraceall/dtraceall.c
 ==
 --- head/sys/modules/dtrace/dtraceall/dtraceall.c Tue Oct 28 03:42:09 
 2014(r273761)
 +++ head/sys/modules/dtrace/dtraceall/dtraceall.c Tue Oct 28 04:18:09 
 2014(r273762)
 @@ -67,7 +67,9 @@ MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1
  MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1);
  MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1);
  MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1);
 +#if defined(NFSCLIENT)

Did you mean #if defined(NFSCL) ? Otherwise, dtraceall.ko with GENERIC
kernel wouldn't pull dtnfscl.ko despite nfscl.ko being compiled in.

  MODULE_DEPEND(dtraceall, dtnfscl, 1, 1, 1);
 +#endif
  #if defined(NFSCLIENT)
  MODULE_DEPEND(dtraceall, dtnfsclient, 1, 1, 1);
  #endif

-

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r273872 - in head: etc/defaults etc/rc.d libexec/save-entropy share/examples/kld/random_adaptor sys/conf sys/dev/glxsb sys/dev/random sys/kern sys/modules sys/modules/padlock_rng sys/m

2014-11-01 Thread Jan Beich
Mark Murray ma...@freebsd.org writes:

 Log:
   This is the much-discussed major upgrade to the random(4) device,
 known to you all as /dev/random.
[...]
 Modified: head/sys/dev/random/randomdev_soft.c
 ===
 --- head/sys/dev/random/randomdev_soft.c  (revision 273871)
 +++ head/sys/dev/random/randomdev_soft.c  (revision 273872)
[...]
 +MID_DEV_MODULE(yarrow, randomdev_soft_modevent, NULL);
 +MODULE_VERSION(yarrow, 1);
 +MODULE_DEPEND(yarrow, random_adaptors, 1, 1, 1);

I have a minimalistic kernel where everything is pushed to a module for
easier/faster debugging before kload. As its config has no |device random|
loading random.ko fails because nothing provides random_adaptors e.g., try

  $ grep -r MODULE_VERSION.\*random_adaptors sys/dev/random

-

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r270232 - head/tools/tools/vt/keymaps

2014-09-04 Thread Jan Beich
Stefan Esser s...@freebsd.org writes:

 Author: se
 Date: Wed Aug 20 17:07:41 2014
 New Revision: 270232
 URL: http://svnweb.freebsd.org/changeset/base/270232

 Log:
   The conversion tools have been further improved and some erroneous
   conversions have been detected and fixed.
[...]
  sub local_to_UCS_code
  {
  my ($char) = @_;
  
 -return prettyprint_token(ord(Encode::decode(UTF-8, 
 local_to_UCS_string($char;
 +my $ucs_char = ord(Encode::decode(UTF-8, local_to_UCS_string($char)));
 +
 +$current_char = lc(chr($ucs_char)), print(SETCUR: $ucs_char\n)
 + if $current_char eq ;

The script now emits |SETCUR: 123| lines that kbdcontrol(1) doesn't like.
Either removing debug |print| or adding STDERR seems to fix.

  $ perl tools/tools/vt/keymaps/convert-keymap.pl \
share/vt/keymaps/us.kbd ASCII foo.kbd

  $ kbdcontrol -l ./foo.kbd /dev/ttyv0
  kbdcontrol: invalid key definition
  zsh: exit 1

-

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r268745 - in head/usr.bin: . timeout

2014-07-16 Thread Jan Beich
Baptiste Daroussin b...@freebsd.org writes:

 Author: bapt
 Date: Wed Jul 16 09:55:36 2014
 New Revision: 268745
 URL: http://svnweb.freebsd.org/changeset/base/268745

 Log:
   New BSDL timeout(1) utility compatible with GNU timeout
   
   it fully passes the GNU timeout regression tests, it is written in a mostly
   portable way (only signal parsing is relying on non portable structures)

--version is not supported unlike GNU timeout.

 +.It Fl -preserve-status
 +Always exist with the same status as

Exist? What does timeout(1) without the option? The man page lacks
EXIT STATUS section.

  $ timeout 1 sleep 10
  zsh: exit 124

  $ timeout --preserve-status 1 sleep 10
  zsh: exit 143

 + switch (*end) {
 + case 's':
 + break;
 + case 'm':
 + ret *= 60;
 + break;
 + case 'h':
 + ret *= 60 * 60;
 + break;
 + case 'd':
 + ret *= 60 * 60 * 24;
 + break;

These suffixes are not documented.

-

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r268461 - in head: . gnu/lib/libreadline gnu/lib/libreadline/history gnu/lib/libreadline/readline gnu/lib/libreadline/readline/doc gnu/usr.bin/gdb gnu/usr.bin/gdb/gdb gnu/usr.bin/gdb/g

2014-07-10 Thread Jan Beich
Baptiste Daroussin b...@freebsd.org writes:

 Log:
   The GNU readline library is now an INTERNALLIB - that is, it is
   statically linked into consumers (GDB and variants) in the base
   system, and the shared library is no longer installed.

WITH_LLDB=t build is broken because libedit doesn't install readline
compatibility headers.

In file included from 
usr.bin/clang/lldb/../../../contrib/llvm/tools/lldb/tools/driver/Driver.cpp:10:
In file included from 
usr.bin/clang/lldb/../../../contrib/llvm/tools/lldb/tools/driver/Driver.h:13:
usr.bin/clang/lldb/../../../contrib/llvm/tools/lldb/tools/driver/Platform.h:105:18:
 fatal error:
  'readline/readline.h' file not found
#include readline/readline.h
 ^
1 error generated.
*** Error code 1

Index: usr.bin/clang/lldb/Makefile
===
--- usr.bin/clang/lldb/Makefile (revision 268495)
+++ usr.bin/clang/lldb/Makefile (working copy)
@@ -6,7 +6,7 @@ PROG_CXX=lldb
 
 LLDB_SRCS=${.CURDIR}/../../../contrib/llvm/tools/lldb
 
-CFLAGS+=   -I${LLDB_SRCS}/include
+CFLAGS+=   -I${LLDB_SRCS}/include -I${.CURDIR}/../../../lib/libedit/edit
 CXXFLAGS+= -std=c++11
 
 SRCDIR=tools/lldb/tools/driver

-

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r253862 - head/sys/boot/ficl

2013-08-04 Thread Jan Beich
Marcel Moolenaar mar...@xcllnt.net writes:

 On Aug 4, 2013, at 2:06 PM, Jan Beich jbe...@tormail.org wrote:

 Marcel Moolenaar mar...@freebsd.org writes:
 
 +static union { 
 +   struct dirent dirent;
 +   char buf[512];
 +} u;
 +off_t off;
 +int len;
 [...]
 +/*
 + * The readdirfd() function is specific to the loader environment.
 + * We do the best we can to make freaddir work, but it's not at
 + * all guaranteed.
 + */
 +off = lseek(fd, 0LL, SEEK_CUR);
 +len = getdents(fd, u.buf, sizeof(u.buf));
 +d = (len != -1) ? u.dirent : NULL;
 +if (d != NULL)
 +   lseek(fd, off + d-d_reclen, SEEK_SET);
 
 How did you test?

 On amd64 with UFS. The problem is that using d_reclen to get to
 the next dirent is highly non-portable and depends on the FS
 used:

 fbsdvm64% uname -m
 amd64
 fbsdvm64% pwd
 /usr/src/sys/boot/ficl
 fbsdvm64% ./testmain 
 ficl Version 3.03
 Aug  4 2013 

 ok s /bin 0 fopen . cr
 3
 ok 3 freaddir . type cr
 -1 .
 ok 3 freaddir . type cr
 -1 ..
 ok 3 freaddir . type cr
 -1 chflags
 ok 3 freaddir . type cr
 -1 [
 ok 3 freaddir . type cr
 -1 cat
 ok 3 freaddir . type cr
 -1 domainname
 ok 3 freaddir . type cr
 -1 chio
 ok 3 freaddir . type cr
 -1 chmod
 ok 3 freaddir . type cr
 -1 cp
 ok 3 freaddir . type cr
 -1 csh

Except there'd be no FICL_FALSE after the last entry. Try running
my lsdir function.


 It's probably not going to work on any other FS. The
 alternative is to just not support freaddir due to lack
 of runtime support.

What's the issue with my version in bin/172542 ? It doesn't
use d_reclen but relies on a side-effect of readdir() call.

  +static DIR *dir;
  +if (lseek(fd, 0, SEEK_CUR) == 0)
  +   dir = fdopendir(fd);
  +if (dir != NULL)
  +   d = readdir(dir);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r251886 - in head: contrib/apr contrib/apr-util contrib/serf contrib/sqlite3 contrib/subversion share/mk usr.bin usr.bin/svn usr.bin/svn/lib usr.bin/svn/lib/libapr usr.bin/svn/lib/liba

2013-06-28 Thread Jan Beich
Peter Wemm pe...@freebsd.org writes:

 Author: peter
 Date: Tue Jun 18 02:53:45 2013
 New Revision: 251886
 URL: http://svnweb.freebsd.org/changeset/base/251886

 Log:
   Introduce svnlite so that we can check out our source code again.

Can you teach apr about WITH_ICONV?

  $ svnsync sync file:///freebsd/base
  svnsync: E22: Safe data 'In the Xen block front driver, take advantage of 
backends that
  support cache flush and write barrier commands.
  ...
  Submitted by:   Roger Pau Monn' was followed by non-ASCII byte 195: unable to 
convert to/from UTF-8
  Exit 1

  $ svn info file:///freebsd/base | awk '/^Rev/ { print $2 }'
  252259
  
  $ locale | awk -F. '/ctype/I { print $2; exit }'
  UTF-8

Not sure why svnsync tries to convert from UTF-8 to UTF-8 only to
fail without iconv().

Index: usr.bin/svn/lib/libapr_util/Makefile
===
--- usr.bin/svn/lib/libapr_util/Makefile(revision 252337)
+++ usr.bin/svn/lib/libapr_util/Makefile(working copy)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 .include ${.CURDIR}/../Makefile.inc
+.include bsd.own.mk
 
 INTERNALLIB=   yes
 LIB=   apr-util
@@ -28,5 +29,11 @@ CFLAGS+= -DHAVE_CONFIG_H \
-I${APR}/include/arch/unix \
-I${APR}/include
 
+.if ${MK_ICONV} != no
+CFLAGS+=   -DHAVE_ICONV_H -DAPU_HAVE_ICONV=1
+.else
+CFLAGS+=   -DAPU_HAVE_ICONV=0
+.endif
+
 .include bsd.lib.mk
 
Index: usr.bin/svn/lib/libapr_util/apu.h
===
--- usr.bin/svn/lib/libapr_util/apu.h   (revision 252337)
+++ usr.bin/svn/lib/libapr_util/apu.h   (working copy)
@@ -85,7 +85,6 @@
 #define APU_HAVE_SQLITE2   0
 
 #define APU_HAVE_APR_ICONV 0
-#define APU_HAVE_ICONV 0
 #define APR_HAS_XLATE  (APU_HAVE_APR_ICONV || APU_HAVE_ICONV)
 
 #endif /* APU_H */
Index: usr.bin/svn/lib/libapr_util/apu_config.h
===
--- usr.bin/svn/lib/libapr_util/apu_config.h(revision 252337)
+++ usr.bin/svn/lib/libapr_util/apu_config.h(working copy)
@@ -24,9 +24,6 @@
 /* Define if expat.h is available */
 #define HAVE_EXPAT_H 1
 
-/* Define to 1 if you have the iconv.h header file. */
-/* #undef HAVE_ICONV_H */
-
 /* Define to 1 if you have the inttypes.h header file. */
 #define HAVE_INTTYPES_H 1
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r246827 - in head: contrib/ldns contrib/ldns/compat contrib/ldns/drill contrib/ldns/ldns lib lib/libldns share/mk tools/build/options

2013-02-15 Thread Jan Beich
Dag-Erling Smørgrav d...@freebsd.org writes:

 Author: des
 Date: Fri Feb 15 13:44:18 2013
 New Revision: 246827
 URL: http://svnweb.freebsd.org/changeset/base/246827

 Log:
   Import LDNS and build it as an internal library.
[...]
 Index: share/mk/bsd.libnames.mk
 ===
 --- share/mk/bsd.libnames.mk  (revision 246826)
 +++ share/mk/bsd.libnames.mk  (revision 246827)
 @@ -85,6 +85,9 @@ LIBKICONV?= ${DESTDIR}${LIBDIR}/libkiconv.a
  LIBKRB5?=${DESTDIR}${LIBDIR}/libkrb5.a
  LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a
  LIBL?=   ${DESTDIR}${LIBDIR}/libl.a
 +.if ${MK_LDNS} != no
 +LIBLDNS?=${DESTDIR}${LIBDIR}/lib_ldns.a
 +.endif
  LIBLN?=  don't use LIBLN, use LIBL
  .if ${MK_BIND} != no
  LIBLWRES?=   ${DESTDIR}${LIBDIR}/liblwres.a

Why the underscore? lib/libldns/Makefile doesn't have it.
Not that WITH_LDNS build would succeed anyway:

  === lib/libldns (depend)
  /usr/src/lib/libldns/../../contrib/ldns/buffer.c:10:10: fatal error: 
'ldns/config.
  h' file not found
  #include ldns/config.h
   ^
  1 error generated.
  mkdep: compile failed
  *** [.depend] Error code 1
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

Re: svn commit: r243310 - head/share/mk

2012-11-22 Thread Jan Beich
Jung-uk Kim j...@freebsd.org writes:

 Author: jkim
 Date: Mon Nov 19 21:58:14 2012
 New Revision: 243310
 URL: http://svnweb.freebsd.org/changeset/base/243310

 Log:
   Add x86 CPUs supported by clang on head.
   
   Reviewed by:arch (silence)
   X-MFC:  r242624

No penryn? My core2 supports sse41.

  $ clang -v -march=native foo.c
  ... -target-cpu penryn ...

  $ gcc47 -v -march=native foo.c
  ... -march=core2 ...

  $ clang -march=penryn foo.c
  $ gcc47 -march=penryn foo.c
  foo.c:1:0: error: bad value (penryn) for -march= switch

  $ gcc47 -march=core2 -dM -E -/dev/null | fgrep -i sse4
  Exit 1
  $ gcc47 -march=native -dM -E -/dev/null | fgrep -i sse4
  #define __SSE4_1__ 1

Not to mention bsd.cpu.mk still thinks core2 doesn't need ssse3 on i386.

  $ __MAKE_CONF= make -V CFLAGS CPUTYPE=core2 MACHINE_CPUARCH=i386
  -O2 -pipe -march=prescott

  $ /usr/bin/gcc -m32 -march=prescott -dM -E -/dev/null | fgrep -i sse
  #define __SSE__ 1
  #define __SSE2__ 1
  #define __SSE3__ 1
  
  $ /usr/bin/gcc -m32 -march=core2 -dM -E -/dev/null | fgrep -i sse
  #define __SSSE3__ 1
  #define __SSE__ 1
  #define __SSE2__ 1
  #define __SSE3__ 1
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r243130 - head/etc/root

2012-11-15 Thread Jan Beich
Eitan Adler ead...@freebsd.org writes:

 Author: eadler
 Date: Fri Nov 16 04:25:35 2012
 New Revision: 243130
 URL: http://svnweb.freebsd.org/changeset/base/243130

 Log:
   dot.login is supposed to be for bourne shell, not csh

Can you explain better or point to the reference? sh(1) mentions
~/.profile while csh(1) mentions ~/.login for commands executed
once per login.

Besides, dot.login is not installed WITHOUT_TCSH.

  # /usr/src/etc/Makefile
  .if ${MK_TCSH} != no
  cd ${.CURDIR}/root; \
  ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
  dot.cshrc ${DESTDIR}/root/.cshrc; \
  ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
  dot.login ${DESTDIR}/root/.login; \
  rm -f ${DESTDIR}/.cshrc; \
  ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
  .endif

   
   Pointyhat to: me
   Approved by: cperciva (implicit)

 Modified:
   head/etc/root/dot.login

 Modified: head/etc/root/dot.login
 ==
 --- head/etc/root/dot.login   Fri Nov 16 03:33:34 2012(r243129)
 +++ head/etc/root/dot.login   Fri Nov 16 04:25:35 2012(r243130)
 @@ -6,4 +6,4 @@
  #
  
  # Uncomment to display a random cookie each login:
 -# if ( -x /usr/games/fortune ) /usr/games/fortune -s
 +# [ -x /usr/games/fortune ]  /usr/games/fortune -s
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242120 - head/usr.sbin/cpucontrol

2012-10-26 Thread Jan Beich
Eitan Adler ead...@freebsd.org writes:

 Author: eadler
 Date: Fri Oct 26 02:50:16 2012
 New Revision: 242120
 URL: http://svn.freebsd.org/changeset/base/242120

 Log:
   This utility builds without NO_WCAST_ALIGN

Not for clang. It probably predates NO_WCAST_ALIGN.clang= support.

intel.c:66:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[0] = idargs.data[1];
 ^~
intel.c:67:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[1] = idargs.data[3];
 ^~
intel.c:68:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[2] = idargs.data[2];
 ^~
intel.c:211:7: warning: cast from 'char *' to 'intel_ext_header_t *' (aka 
'struct
  intel_ext_header *') increases required alignment from 1 to 4 
[-Wcast-align]
(intel_ext_header_t *)((char *)fw_image + payload_size);
^~~
amd.c:64:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[0] = idargs.data[1];
 ^~
amd.c:65:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[1] = idargs.data[3];
 ^~
amd.c:66:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[2] = idargs.data[2];
 ^~
via.c:64:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[0] = idargs.data[1];
 ^~
via.c:65:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[1] = idargs.data[3];
 ^~
via.c:66:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *')
  increases required alignment from 1 to 4 [-Wcast-align]
((uint32_t *)vendor)[2] = idargs.data[2];
 ^~
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/examp

2012-10-24 Thread Jan Beich
Dimitry Andric d...@freebsd.org writes:

 On 2012-10-23 11:05, Dimitry Andric wrote:

 On 2012-10-22 16:58, Jan Beich wrote:
 Dimitry Andric d...@freebsd.org writes:
 On 2012-10-22 09:00, Jan Beich wrote:
 ...
 undefined reference to `std::__1::basic_ioschar,
 std::__1::char_traitschar ::clear(unsigned int)'
 clang++: error: linker command failed with exit code 1 (use -v to
 see invocation)
 Strange, for me it compiles (with a bunch of warnings, which I have
 fixed locally), and links just fine.  However, I always use -std=c++11,
 which -std= flag are you using, if any?
 Adding -std=c++11 doesn't help. Neither yours or Garrett's patches.
 Instead, removing local -finline-functions (implied by -O3) does.
 With clang, -O3 does not imply -finline-functions, but it may have some
 influence on the threshold for inlining.

 This error is still very strange though, and it might be a real bug in
 the optimizer at -O3; at this level, it really seems to generate a call
 to a function that is declared inline, with the __always_inline
 attribute.

 I have cherry-picked r165367 from the llvm trunk, which should fix this
 issue, and committed it into our head r242007.

 Can you please retry your buildworld with the -O3 flag after updating to
 at least that revision?

As of r242014, atf-run builds fine with -O3 and libc++ for me. Thanks.


 I will also MFC the fix to stable/9 later on.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/examp

2012-10-22 Thread Jan Beich
Dimitry Andric d...@freebsd.org writes:

 On 2012-10-22 09:00, Jan Beich wrote:
 ...

 atf-run fails to link when using -stdlib=libc++. It works if I remove
 `throw' from check_stream(). Any clue?

 test-program.o: In function `(anonymous
 namespace)::check_stream(std::__1::basic_ostreamchar,
 std::__1::char_traitschar )':
 /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76:
 undefined reference to `std::__1::basic_ioschar,
 std::__1::char_traitschar ::clear(unsigned int)'
 clang++: error: linker command failed with exit code 1 (use -v to
 see invocation)

 Strange, for me it compiles (with a bunch of warnings, which I have
 fixed locally), and links just fine.  However, I always use -std=c++11,
 which -std= flag are you using, if any?

Adding -std=c++11 doesn't help. Neither yours or Garrett's patches.
Instead, removing local -finline-functions (implied by -O3) does.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/examp

2012-10-22 Thread Jan Beich
Marcel Moolenaar mar...@freebsd.org writes:

 Author: marcel
 Date: Mon Oct 22 01:18:41 2012
 New Revision: 241823
 URL: http://svn.freebsd.org/changeset/base/241823

 Log:
   Add ATF to the build. This is may be a bit rought around the egdes,
   but committing it helps to get everyone on the same page and makes
   sure we make progress.
[...]

atf-run fails to link when using -stdlib=libc++. It works if I remove
`throw' from check_stream(). Any clue?

test-program.o: In function `(anonymous 
namespace)::check_stream(std::__1::basic_ostreamchar, 
std::__1::char_traitschar )':
/usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: 
undefined reference to `std::__1::basic_ioschar, std::__1::char_traitschar 
::clear(unsigned int)'
clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r236028 - head/lib/libkiconv

2012-05-27 Thread Jan Beich
Gabor Kovesdan ga...@freebsd.org writes:

 Author: gabor
 Date: Fri May 25 22:07:13 2012
 New Revision: 236028
 URL: http://svn.freebsd.org/changeset/base/236028

 Log:
   - Add support for BSD iconv when it is build into libc
[...]
 +.if !defined(MK_ICONV)
 +CFLAGS+= -DICONV_DLOPEN
 +.endif

This doesn't work unless you include bsd.own.mk before.

  $ make WITH_ICONV= -C lib/libkiconv
  Warning: Object directory not changed from original /a/freebsd/lib/libkiconv
  clang ... -DICONV_DLOPEN ... -o kiconv_sysctl.o
  [...]
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r233429 - in head: etc/root share/examples share/examples/csh

2012-03-24 Thread Jan Beich
Eitan Adler ead...@freebsd.org writes:

 Author: eadler
 Date: Sat Mar 24 18:43:18 2012
 New Revision: 233429
 URL: http://svn.freebsd.org/changeset/base/233429

 Log:
   - Make the default values for tcsh more user friendly
[...]
 Modified: head/etc/root/dot.cshrc
 ==
 --- head/etc/root/dot.cshrc   Sat Mar 24 18:25:16 2012(r233428)
 +++ head/etc/root/dot.cshrc   Sat Mar 24 18:43:18 2012(r233429)
[...]
 + bindkey \e[1~ beginning-of-line #make Home key work;
 + bindkey \e[4~ end-of-line #make End key work;

Home/End keys are already bound unless termcap is somehow broken.

  $ tcsh -f
   bindkey
  ...
  Arrow key bindings
  down   - down-history
  up - up-history
  left   - backward-char
  right  - forward-char
  home   - beginning-of-line
  end- end-of-line
 
Also, if you launch xterm with `-kt tcap' it would produce
whatever kh/@7 sequences are, e.g. different under tmux/screen.

 + bindkey \e[3~ delete-char #make Delete key work;

inb4 someone expands static list of arrow keys in tcsh

  set key_dc=`echotc kD`
  bindkey $key_dc delete-char
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r228157 - head/usr.bin/make

2011-11-30 Thread Jan Beich
Max Khon f...@freebsd.org writes:

 On Thu, Dec 1, 2011 at 7:16 AM, Alexander Best arun...@freebsd.org wrote:
 it would also be nice, if at some point, somebody could dive into the code
 to
 see why 'make buildkernel' will let clang produce coloured output, but
 'make -j(N1) buildkernel' doesn't (and why adding a -B switch to that
 command
 fixes it).


 This one is simple: job make (-jX) runs commands with stdin/stdout/stderr
 redirected to pipes.
 -B turns on compat mode for job make.

 This can be demonstrated by running make with -jX or -jX -B with the
 following Makefile:
 --- cut here ---
 all:
 @if [ -t 1 ]; then echo stdout is a tty; else echo stdout is not
 a tty; fi
 --- cut here ---

 If you really want to see colored output in -jX case you should teach clang
 to output ANSI color sequences not only in isatty(1) case, but also
 when MAKE_JOBS_FIFO environment variable is present (it is set when make
 runs in job mode).

Any way to distinguish between `make -jX' connected to tty and `make
-jX' redirected to a file then? Otherwise, inconsistent coloring
is still there, e.g.

  $ make build.log
  $ make -j8 build.log

Index: contrib/llvm/tools/clang/lib/Driver/Tools.cpp
===
--- contrib/llvm/tools/clang/lib/Driver/Tools.cpp   (revision 228149)
+++ contrib/llvm/tools/clang/lib/Driver/Tools.cpp   (working copy)
@@ -2115,7 +2115,8 @@ void Clang::ConstructJob(Compilation C, const Job
   // them.
   if (Args.hasFlag(options::OPT_fcolor_diagnostics,
options::OPT_fno_color_diagnostics,
-   llvm::sys::Process::StandardErrHasColors()))
+   llvm::sys::Process::StandardErrHasColors() ||
+   ::getenv(MAKE_JOBS_FIFO)))
 CmdArgs.push_back(-fcolor-diagnostics);
 
   if (!Args.hasFlag(options::OPT_fshow_source_location,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org