daily CVS update output
Updating src tree: P src/distrib/sets/lists/tests/mi P src/lib/libc/regex/regcomp.c P src/lib/libc/regex/regex.3 P src/share/man/man4/cardbus.4 P src/share/man/man4/ddb.4 P src/share/man/man4/eisa.4 P src/share/man/man4/hdaudio.4 P src/share/man/man4/iic.4 P src/share/man/man4/isa.4 P src/share/man/man4/mca.4 P src/share/man/man4/pci.4 P src/share/man/man4/pcmcia.4 P src/share/man/man4/sbus.4 P src/share/man/man4/spi.4 P src/share/man/man4/tc.4 P src/sys/arch/aarch64/aarch64/db_machdep.c P src/sys/arch/aarch64/include/db_machdep.h P src/sys/arch/macppc/dev/snapper.c P src/sys/arch/powerpc/include/db_machdep.h P src/sys/arch/powerpc/oea/pmap.c P src/sys/arch/sparc64/dev/vnet.c P src/sys/dev/pci/ixgbe/ix_txrx.c P src/sys/netinet6/ip6_var.h P src/tests/usr.bin/indent/Makefile U src/tests/usr.bin/indent/token-binary_op.0 U src/tests/usr.bin/indent/token-binary_op.0.pro U src/tests/usr.bin/indent/token-binary_op.0.stdout U src/tests/usr.bin/indent/token-case_label.0 U src/tests/usr.bin/indent/token-case_label.0.pro U src/tests/usr.bin/indent/token-case_label.0.stdout U src/tests/usr.bin/indent/token-colon.0 U src/tests/usr.bin/indent/token-colon.0.pro U src/tests/usr.bin/indent/token-colon.0.stdout U src/tests/usr.bin/indent/token-comma.0 U src/tests/usr.bin/indent/token-comma.0.pro U src/tests/usr.bin/indent/token-comma.0.stdout U src/tests/usr.bin/indent/token-comment.0 U src/tests/usr.bin/indent/token-comment.0.pro U src/tests/usr.bin/indent/token-comment.0.stdout U src/tests/usr.bin/indent/token-decl.0 U src/tests/usr.bin/indent/token-decl.0.pro U src/tests/usr.bin/indent/token-decl.0.stdout U src/tests/usr.bin/indent/token-do_stmt.0 U src/tests/usr.bin/indent/token-do_stmt.0.pro U src/tests/usr.bin/indent/token-do_stmt.0.stdout U src/tests/usr.bin/indent/token-end_of_file.0 U src/tests/usr.bin/indent/token-end_of_file.0.pro U src/tests/usr.bin/indent/token-end_of_file.0.stdout U src/tests/usr.bin/indent/token-for_exprs.0 U src/tests/usr.bin/indent/token-for_exprs.0.pro U src/tests/usr.bin/indent/token-for_exprs.0.stdout U src/tests/usr.bin/indent/token-form_feed.0 U src/tests/usr.bin/indent/token-form_feed.0.pro U src/tests/usr.bin/indent/token-form_feed.0.stdout U src/tests/usr.bin/indent/token-funcname.0 U src/tests/usr.bin/indent/token-funcname.0.pro U src/tests/usr.bin/indent/token-funcname.0.stdout U src/tests/usr.bin/indent/token-ident.0 U src/tests/usr.bin/indent/token-ident.0.pro U src/tests/usr.bin/indent/token-ident.0.stdout U src/tests/usr.bin/indent/token-if_expr.0 U src/tests/usr.bin/indent/token-if_expr.0.pro U src/tests/usr.bin/indent/token-if_expr.0.stdout U src/tests/usr.bin/indent/token-if_expr_stmt.0 U src/tests/usr.bin/indent/token-if_expr_stmt.0.pro U src/tests/usr.bin/indent/token-if_expr_stmt.0.stdout U src/tests/usr.bin/indent/token-if_expr_stmt_else.0 U src/tests/usr.bin/indent/token-if_expr_stmt_else.0.pro U src/tests/usr.bin/indent/token-if_expr_stmt_else.0.stdout U src/tests/usr.bin/indent/token-keyword_do.0 U src/tests/usr.bin/indent/token-keyword_do.0.pro U src/tests/usr.bin/indent/token-keyword_do.0.stdout U src/tests/usr.bin/indent/token-keyword_do_else.0 U src/tests/usr.bin/indent/token-keyword_do_else.0.pro U src/tests/usr.bin/indent/token-keyword_do_else.0.stdout U src/tests/usr.bin/indent/token-keyword_else.0 U src/tests/usr.bin/indent/token-keyword_else.0.pro U src/tests/usr.bin/indent/token-keyword_else.0.stdout U src/tests/usr.bin/indent/token-keyword_for_if_while.0 U src/tests/usr.bin/indent/token-keyword_for_if_while.0.pro U src/tests/usr.bin/indent/token-keyword_for_if_while.0.stdout U src/tests/usr.bin/indent/token-keyword_struct_union_enum.0 U src/tests/usr.bin/indent/token-keyword_struct_union_enum.0.pro U src/tests/usr.bin/indent/token-keyword_struct_union_enum.0.stdout U src/tests/usr.bin/indent/token-lbrace.0 U src/tests/usr.bin/indent/token-lbrace.0.pro U src/tests/usr.bin/indent/token-lbrace.0.stdout U src/tests/usr.bin/indent/token-lparen.0 U src/tests/usr.bin/indent/token-lparen.0.pro U src/tests/usr.bin/indent/token-lparen.0.stdout U src/tests/usr.bin/indent/token-newline.0 U src/tests/usr.bin/indent/token-newline.0.pro U src/tests/usr.bin/indent/token-newline.0.stdout U src/tests/usr.bin/indent/token-period.0 U src/tests/usr.bin/indent/token-period.0.pro U src/tests/usr.bin/indent/token-period.0.stdout U src/tests/usr.bin/indent/token-postfix_op.0 U src/tests/usr.bin/indent/token-postfix_op.0.pro U src/tests/usr.bin/indent/token-postfix_op.0.stdout U src/tests/usr.bin/indent/token-preprocessing.0 U src/tests/usr.bin/indent/token-preprocessing.0.pro U src/tests/usr.bin/indent/token-preprocessing.0.stdout U src/tests/usr.bin/indent/token-question.0 U src/tests/usr.bin/indent/token-question.0.pro U src/tests/usr.bin/indent/token-question.0.stdout U src/tests/usr.bin/indent/token-rbrace.0 U src/tests/usr.bin/indent/token-rbrace.0.pro U src/tests/usr.bin/indent/token-rbrace.0.stdout U src/tests/usr.bin/indent/token-rparen.0 U src/tests/usr.bin/indent/token
Re: sed and xentools413
On Thu, 11 Mar 2021, RVP wrote: This, depeneds on the shell, I think. Only very old shells turn _every_ '\char' -> 'char'. In POSIX shells, only some chars are special after a '\' inside double-quotes: \\ -> \ \" -> " \` -> ` I missed the obvious one there: \$ -> $ -RVP
Re: sed and xentools413
On Thu, 11 Mar 2021, Martin Neitzel wrote: sed "s/^ *\([0-9]*\)\t.*$/\1/" hunspell-capmain-plus_de_DE[...] sed: 1: "s/^ *\([0-9]*\)\t.*$/\1/": RE error: trailing backslash (\) (1) Others have already corrected this silently but to make it explicit: The \ need to be \\ within double-quotes. They simply vanish when used as above. This, depeneds on the shell, I think. Only very old shells turn _every_ '\char' -> 'char'. In POSIX shells, only some chars are special after a '\' inside double-quotes: \\ -> \ \" -> " \` -> ` All other instances of '\char' in a DQ-string are preserved. -RVP
Re: sed and xentools413
RVP wrote: > > In POSIX shells, only some chars are > special after a '\' inside double-quotes: > \\ -> \ > \" -> " > \` -> ` > \$ -> $ > All other instances of '\char' in a DQ-string are preserved. You are 100% correct, I wrote complete crap. And it would have been so easy to simply check $ echo "s/^ *\([0-9]*\)\t.*$/\1/" s/^ *\([0-9]*\)\t.*$/\1/ Thanks for reminding me of reality! Martin
odd ATF failure for sh: ulimit_redirection_interaction failed
My build (for amd64) of very recent -current sources (2021/03/08) exhibit an odd failure in the ATF tests for /bin/sh. (I'm not sure when this first appeared, but it's not there in my older builds, e.g. from 2020/06) From glancing through the test script I'm not sure quite what's happening, though I've not tried to dig much deeper yet. From the log: tc-start: 1615494985.794473, ulimit_redirection_interaction tc-so:Executing command [ /bin/sh helper.sh ] tc-se:Fail: incorrect exit status: 1, expected: 0 tc-se:stdout: tc-se: tc-se:stderr: tc-se:helper.sh: 1: Invalid argument tc-se: tc-end: 1615494985.880185, ulimit_redirection_interaction, failed, atf-check failed; see the output of the test for details -- Greg A. Woods Kelowna, BC +1 250 762-7675 RoboHack Planix, Inc. Avoncote Farms pgpgCp7gHm4g5.pgp Description: OpenPGP Digital Signature
NetBSD Security Advisory 2021-001: Predictable ID disclosures in IPv4 and IPv6
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 NetBSD Security Advisory 2021-001 = Topic: Predictable ID disclosures in IPv4 and IPv6 Version:NetBSD-current: affected NetBSD 9.1: affected NetBSD 8.2: affected Severity: Possible data exfiltration from firewalled or NATed networks Fixed: NetBSD-current: March 9, 2021 NetBSD-9 branch:March 9, 2021 NetBSD-8 branch:March 9, 2021 Please note that NetBSD releases prior to 8.2 are no longer supported. It is recommended that all users upgrade to a supported release. Abstract IP ID randomization was not enabled by default and the randomization algorithms were not strong enough. Technical Details = 1. IPv4 and IPv6 fragment ids were not randomly generated by default. Furthermore the randomization algorithms were not strong enough. 2. The TCP ISS random generation had an information leak. 3. The IPv6 flow label generation algorithm was not strong enough. Solutions and Workarounds = For all NetBSD versions, you need to obtain fixed kernel sources, rebuild and install the new kernel, and reboot the system. The following revisions fix the issues: src/sys/netinet/in_var.h1.99,1.102 src/sys/netinet/ip6.h 1.30 src/sys/netinet/ip_input.c 1.400 src/sys/netinet/tcp_subr.c 1.285,1.286 src/sys/netinet/tcp_timer.c 1.96 src/sys/netinet6/ip6_id.c 1.20 src/sys/netinet6/ip6_var.h 1.88 The fixed source may be obtained from the NetBSD CVS repository. The following instructions briefly summarise how to upgrade your kernel. In these instructions, replace: ARCH with your architecture (from uname -m), and KERNCONF with the name of your kernel configuration file. To update from CVS, re-build, and re-install the kernel: # cd src # cvs update -d -P sys/netinet sys/netinet6 # ./build.sh kernel=KERNCONF # mv /netbsd /netbsd.old # cp sys/arch/ARCH/compile/obj/KERNCONF/netbsd /netbsd # shutdown -r now For more information on how to do this, see: https://www.NetBSD.org/docs/guide/en/chap-kernel.html Thanks To = Amit Klein for reporting these vulnerabilities and Taylor R. Campbell for fixing them. More Information Advisories may be updated as new information becomes available. The most recent version of this advisory (PGP signed) can be found at https://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2021-001.txt.asc Information about NetBSD and NetBSD security can be found at https://www.NetBSD.org/ https://www.NetBSD.org/Security/ Copyright 2021, The NetBSD Foundation, Inc. All Rights Reserved. Redistribution permitted only in full, unmodified form. -BEGIN PGP SIGNATURE- iQIcBAEBAgAGBQJgSn73AAoJEIkmHhf170n/jpYQAKzk+vo/CDcYchOk+/wgPhBL TbG6rxD3xAVD1aH/sz1lviYTBE5i3W+RohJtZtvUAEoSivFuAODw3TYH/S+KWhDY IyZ1shNICPTqB1dCrgjiQpmOq9fYQ4i0zpGHhvkqWGjWXMnN2nMy37fPvsZ2TvG2 WrwKThptM8Ls6aB+K4Fg0NcHW6ifdvbXY5r2ddXftoT+zsbW9mclfu9spsAHQtLh I11GedEU7BOsvT/woFW6mG3VsHPUXofaC5BTINEiJq1o/VE9HoRmhp05Ik+NCwCv BTzLrKmpOkMJzPp3wvOE2TeolyG57rw1LrHHh6Y/Zb4BIJb6mDP03xuaulRvHg/i D27/p8qvK4lxSVQtwci15TUa45MbW/nAGMgDEPuMHxEAxwqcfZtdlTiCSSSUuVZV BxBaW6hB1gTpkNxmtMt7H0W09xbfgztQndHlZaWv2vTeOlHHKO6298C43g12PS/M pGd3XD3e1hrdrxjtfmiA8oZgOqCM6GJdGpaxE6sBWsVHNyNVurgGI1h5orW9OzO1 vuK6iwq8AZtIp5s/IFddbdFyTNGuzc4gdNx/ON9CnuJRTJ5pWEABYH25imf3fcfU wRqpGwB2oOMdKnQ56o0qMykuSurXbJNM65R3xlijjuZrclt7cr6Kz3uO+zRr0yGM 1MAq4vRQavtS6+04kZiV =Oxq5 -END PGP SIGNATURE-
Re: sed and xentools413
> sed "s/^ *\([0-9]*\)\t.*$/\1/" hunspell-capmain-plus_de_DE[...] > sed: 1: "s/^ *\([0-9]*\)\t.*$/\1/": RE error: trailing backslash (\) (1) Others have already corrected this silently but to make it explicit: The \ need to be \\ within double-quotes. They simply vanish when used as above. The \ could remain single \ within single-quotes. (2) Also, as others have already noted: NetBSD/POSIX sed won't grok the \t as a TAB notation. A cut-n-paste-safe version would be: TAB=$(printf '\t') sed 's/^ *\([0-9]*\)'"$TAB"'.*$/\1/' hunspell-capmain-plus_de_DE[...] Martin Neitzel [Sorry for the extra header quote in my last mail.]
Re: ACPI display brightness on Lenovo Thinkpad T430s
Hi, FWIW, I've been successfully using the following patch for quite some time. It allows to set the brightness on Intel hw with wsconsctl and xrandr --output XXX --set BACKLIGHT YYY. It doesn't use ACPI though, but relies on the code in the DRM/KMS kernel driver. Regards, Aymeric diff -r 6b4d07813856 sys/external/bsd/drm2/dist/drm/i915/intel_panel.c --- a/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c Sun Mar 07 19:06:20 2021 + +++ b/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c Thu Mar 11 14:52:04 2021 +0100 @@ -432,7 +432,7 @@ return target_val; } -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) +#if 1 /* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */ static inline u32 scale_user_to_hw(struct intel_connector *connector, u32 user_level, u32 user_max) @@ -677,9 +677,11 @@ panel->backlight.set(connector, level); } -#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) +#if 1 +void intel_panel_set_backlight(struct intel_connector *, u32, u32); + /* set backlight brightness to level in range [0..max], scaling wrt hw min */ -static void intel_panel_set_backlight(struct intel_connector *connector, +void intel_panel_set_backlight(struct intel_connector *connector, u32 user_level, u32 user_max) { struct drm_device *dev = connector->base.dev; diff -r 6b4d07813856 sys/external/bsd/drm2/i915drm/intelfb.c --- a/sys/external/bsd/drm2/i915drm/intelfb.c Sun Mar 07 19:06:20 2021 + +++ b/sys/external/bsd/drm2/i915drm/intelfb.c Thu Mar 11 14:52:04 2021 +0100 @@ -55,12 +55,18 @@ static paddr_t intelfb_drmfb_mmapfb(struct drmfb_softc *, off_t, int); +static int intelfb_get_brightness(void *, int *); +static int intelfb_set_brightness(void *, int); +static int intelfb_upd_brightness(void *, int); + struct intelfb_softc { struct drmfb_softc sc_drmfb; /* XXX Must be first. */ device_tsc_dev; struct intelfb_attach_args sc_ifa; bus_space_handle_t sc_fb_bsh; struct i915drmkms_task sc_attach_task; + struct genfb_parameter_callback genfb_brightness_params; + int current_brightness; boolsc_mapped:1; boolsc_scheduled:1; boolsc_attached:1; @@ -97,6 +103,8 @@ sc->sc_scheduled = false; sc->sc_attached = false; + sc->current_brightness = 255; + aprint_naive("\n"); aprint_normal("\n"); @@ -166,6 +174,7 @@ struct intelfb_softc *const sc = container_of(task, struct intelfb_softc, sc_attach_task); const struct intelfb_attach_args *const ifa = &sc->sc_ifa; + prop_dictionary_t dict = device_properties(sc->sc_dev); const struct drmfb_attach_args da = { .da_dev = sc->sc_dev, .da_fb_helper = ifa->ifa_fb_helper, @@ -176,6 +185,17 @@ }; int error; + sc->genfb_brightness_params.gpc_cookie = sc; + sc->genfb_brightness_params.gpc_get_parameter = intelfb_get_brightness; + sc->genfb_brightness_params.gpc_set_parameter = intelfb_set_brightness; + sc->genfb_brightness_params.gpc_upd_parameter = intelfb_upd_brightness; + + if (!prop_dictionary_set_uint64(dict, "brightness_callback", + (uint64_t) (intptr_t) &sc->genfb_brightness_params)) { + aprint_error_dev(sc->sc_dev, + "Could not set brightness callback"); + } + error = drmfb_attach(&sc->sc_drmfb, &da); if (error) { aprint_error_dev(sc->sc_dev, "failed to attach drmfb: %d\n", @@ -218,3 +238,45 @@ i915_gem_obj_ggtt_offset(fbdev->fb->obj) + offset, prot, BUS_SPACE_MAP_PREFETCHABLE); } + +static int +intelfb_get_brightness(void *cookie, int *valp) { + struct intelfb_softc *sc = cookie; + + *valp = sc->current_brightness; + + return 0; +} + +void intel_panel_set_backlight(struct intel_connector *, u32, u32); + +static int +intelfb_set_brightness(void *cookie, int val) { + struct intelfb_softc *sc = cookie; + struct drm_fb_helper *const fb_helper = sc->sc_ifa.ifa_fb_helper; + unsigned i; + + sc->current_brightness = val; + + for (i = 0; i < fb_helper->connector_count; i++) { + struct intel_connector *const connector = + (struct intel_connector *const) + fb_helper->connector_info[i]->connector; + intel_panel_set_backlight(connector, val, 255); + } + + return 0; +} + +static int +intelfb_upd_brightness(void *cookie, int delta) { + struct intelfb_softc *sc = cookie; + int new_val = sc->current_brightness + delta; + + if (new_val < 0) + new_val = 0; + if (new_val > 255) +
Re: ACPI display brightness on Lenovo Thinkpad T430s
On 2021. 03. 11. 15:33, nia wrote: On Wed, Mar 10, 2021 at 11:23:50AM +0100, Fekete Zoltn wrote: Hi There, Please give me advice how to proceed in the topic below. I want to have the display brightness working. I have traced the route of the brightness buttonpress (up or down) in the acpi subsystem in the kernel on my laptop. Everything seems to be alright. The driver takes the button press, translates into an acpi code, then it calls the acpi driver, which sends the code to the hardware. The brightness of the display is not changing, however. Does anybody know what to do? I think the brightness tweaking bits were broken when DRM was updated for NetBSD 9.0, we have another chance to get it right for the next DRM update. Modifying the hw.acpi.acpiout0.brightness sysctl should not do nothing. Currently, I use sysutils/intel-backlight from pkgsrc. It performs raw access to PCI device nodes, so needs root and kern.securelevel=0 unfortunately. Thank you, this is the simplest way I could have it working. Regards, FeZ
Re: ACPI display brightness on Lenovo Thinkpad T430s
On Wed, Mar 10, 2021 at 11:23:50AM +0100, Fekete Zoltn wrote: > Hi There, > > Please give me advice how to proceed in the topic below. I want to have the > display brightness working. > > I have traced the route of the brightness buttonpress (up or down) in the > acpi subsystem in the kernel on my laptop. Everything seems to be alright. > The driver takes the button press, translates into an acpi code, then it > calls the acpi driver, which sends the code to the hardware. > The brightness of the display is not changing, however. > > Does anybody know what to do? I think the brightness tweaking bits were broken when DRM was updated for NetBSD 9.0, we have another chance to get it right for the next DRM update. Modifying the hw.acpi.acpiout0.brightness sysctl should not do nothing. Currently, I use sysutils/intel-backlight from pkgsrc. It performs raw access to PCI device nodes, so needs root and kern.securelevel=0 unfortunately.
Re: sed and xentools413
r...@sdf.org (RVP) writes: >The NetBSD sed doesn't understand '\t' as signifying a tab: >You'll have to rewrite that regex like this: >$ nl /etc/motd | sed 's/^ *\([0-9]*\)'$'\t''.*$/\1/' The $'\t' syntax is also new. For old shells (e.g. NetBSD-8) you need to use a literal TAB. Usually like: TAB=' ' # <--- literal TAB sed "s/^ *\([0-9]*\)${TAB}.*$/\1/" -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."
Re: sed and xentools413
w...@netbsd.org (Thomas Klausner) writes: >sed "s/^ *\([0-9]*\)\t.*$/\1/" hunspell-capmain-plus_de_DE.tmp.unknown.tmp > >hunspell-capmain-plus_de_DE.tmp.list-unknown-lines.tmp >sed: 1: "s/^ *\([0-9]*\)\t.*$/\1/": RE error: trailing backslash (\) >What is the trailing backslash in that regex? sed doesn't understand \t as TAB. NetBSD-9 sed also doesn't understand it, but it (or rather the underlying regcomp() function) doesn't bail out. N.B. usage of '$' in a double-quoted string is also questionable. -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."
Re: sed and xentools413
On Thu, 11 Mar 2021, Thomas Klausner wrote: I also see problems building textproc/hunspell-de, but I don't understand the error: ... sed: 1: "s/^ *\([0-9]*\)\t.*$/\1/": RE error: trailing backslash (\) What is the trailing backslash in that regex? The NetBSD sed doesn't understand '\t' as signifying a tab: $ echo $'hello\tworld' | sed 's/\t/ /g' | sed -n l hello\tworld$ $ You'll have to rewrite that regex like this: $ nl /etc/motd | sed 's/^ *\([0-9]*\)'$'\t''.*$/\1/' 1 2 3 4 5 6 7 8 9 10 11 $ -RVP