svn commit: r354127 - head/sys/cddl/boot/zfs
Author: tsoome Date: Sun Oct 27 08:35:29 2019 New Revision: 354127 URL: https://svnweb.freebsd.org/changeset/base/354127 Log: loader: zio_checksum_verify should check byteswap We do have both native and byteswap checksum callbacks in place but the selection is not wired. MFC after:1 week Modified: head/sys/cddl/boot/zfs/zfsimpl.h head/sys/cddl/boot/zfs/zfssubr.c Modified: head/sys/cddl/boot/zfs/zfsimpl.h == --- head/sys/cddl/boot/zfs/zfsimpl.hSun Oct 27 05:32:08 2019 (r354126) +++ head/sys/cddl/boot/zfs/zfsimpl.hSun Oct 27 08:35:29 2019 (r354127) @@ -442,6 +442,13 @@ _NOTE(CONSTCOND) } while (0) ZIO_SET_CHECKSUM(&(bp)->blk_cksum, 0, 0, 0, 0); \ } +#if BYTE_ORDER == _BIG_ENDIAN +#defineZFS_HOST_BYTEORDER (0ULL) +#else +#defineZFS_HOST_BYTEORDER (1ULL) +#endif + +#defineBP_SHOULD_BYTESWAP(bp) (BP_GET_BYTEORDER(bp) != ZFS_HOST_BYTEORDER) #defineBPE_NUM_WORDS 14 #defineBPE_PAYLOAD_SIZE (BPE_NUM_WORDS * sizeof (uint64_t)) #defineBPE_IS_PAYLOADWORD(bp, wp) \ Modified: head/sys/cddl/boot/zfs/zfssubr.c == --- head/sys/cddl/boot/zfs/zfssubr.cSun Oct 27 05:32:08 2019 (r354126) +++ head/sys/cddl/boot/zfs/zfssubr.cSun Oct 27 08:35:29 2019 (r354127) @@ -318,8 +318,9 @@ zio_checksum_verify(const spa_t *spa, const blkptr_t * byteswap_uint64_array(&expected_cksum, sizeof (zio_cksum_t)); } else { + byteswap = BP_SHOULD_BYTESWAP(bp); expected_cksum = bp->blk_cksum; - ci->ci_func[0](data, size, ctx, &actual_cksum); + ci->ci_func[byteswap](data, size, ctx, &actual_cksum); } if (!ZIO_CHECKSUM_EQUAL(actual_cksum, expected_cksum)) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r353937 - in head/share: man/man5 mk
On Sat, Oct 26, 2019 at 04:34:14PM +0200, Dimitry Andric wrote: > > On 24 Oct 2019, at 14:49, Alexey Dokuchaev wrote: > > What are the benefits of the new order? > > The advantages and disadvantages of dynamic linking are a contentious > and almost religious issue, so I hope you don't mind that I will not go > into this. OK. :-) > > What about those of us who cannot use BEs, VMs, and other "cloudy" > > tech because, well, they might not work as well and reliably as one > > might think? > > There are many possibilities, such as making backups, using > WITHOUT_SHARED_TOOLCHAIN (and hoping that you can compile/link your way > out of a botched installation), or even using NO_SHARED. WITHOUT_SHARED_TOOLCHAIN sounds good, I hope it won't go away one day. > > Very good point. [about regressed performance] > > But if you take this point to its logical conclusion, then you should > link everything statically, and never use dynamic linking at all. :) Toolchain is special: many people prefer (or have to) build their ports and stuff; even those who prefer binary packages may need to test their ports in a tinderbox or p*re. In other words, I don't mind Firefox being dynalinked because I launch it once a month, contrary to the compiler. > I only tested -j24 on a 32-core system, but I could probably repeat the > experiment with lower and higher -j values: [...] > > So ~2.3% difference in real time, which is not too bad I think. Well, I'd say it's acceptable. :-/ > There are probably opportunities to improve the performance of the > dynamic linker, which would be beneficial to every program in the > system. Now that's a good point; I look forward to it! Thanks for replying, ./danfe ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r354121 - in head/tests/sys/netpfil: common pf
On 2019-10-26 21:19:55 (+), Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Oct 26 21:19:55 2019 > New Revision: 354121 > URL: https://svnweb.freebsd.org/changeset/base/354121 > > Log: > Upgrade (scapy) py2 tests to work on py3. > > In order to move python2 out of the test framework to avoid py2 vs. py3 > confusions upgrade the remaining test cases using scapy to work with py3. > That means only one version of scapy needs to be installed in the CI system. > It also gives a path forward for testing i386 issues observed in the CI > system with some of these tests. > > Fixes are: > - Use default python from environment (which is 3.x these days). > - properly ident some lines as common for the rest of the file to avoid > errors. > - cast the calculated offset to an int as the division result is considered > a float which is not accepted input. > - when comparing payload to a magic number make sure we always add the > payload properly to the packet and do not try to compare string in > the result but convert the data payload back into an integer. > - fix print formating. > > Discussed with: lwhsu, kp (taking it off his todo :) Thank you! Kristof ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r354129 - head/libexec/rc
Author: cy Date: Sun Oct 27 18:27:25 2019 New Revision: 354129 URL: https://svnweb.freebsd.org/changeset/base/354129 Log: Remove trailing tab. MFC after:3 days Modified: head/libexec/rc/rc.subr Modified: head/libexec/rc/rc.subr == --- head/libexec/rc/rc.subr Sun Oct 27 09:28:33 2019(r354128) +++ head/libexec/rc/rc.subr Sun Oct 27 18:27:25 2019(r354129) @@ -1281,7 +1281,7 @@ $command $rc_flags $command_args" ${PROTECT} -p ${pid} ;; esac - fi + fi ;; esac ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r354130 - head/tests/sys/netpfil/common
Author: lwhsu Date: Sun Oct 27 21:07:50 2019 New Revision: 354130 URL: https://svnweb.freebsd.org/changeset/base/354130 Log: Follow r354121 to fix some python3 errors in sys.netpfil.* stderr: Traceback (most recent call last): File "/usr/tests/sys/netpfil/common/pft_ping.py", line 135, in main() File "/usr/tests/sys/netpfil/common/pft_ping.py", line 124, in main ping(args.sendif[0], args.to[0], args) File "/usr/tests/sys/netpfil/common/pft_ping.py", line 74, in ping raw = sp.raw(str(PAYLOAD_MAGIC)) File "/usr/local/lib/python3.6/site-packages/scapy/compat.py", line 52, in raw return bytes(x) TypeError: string argument without an encoding MFC with: r354121 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netpfil/common/pft_ping.py Modified: head/tests/sys/netpfil/common/pft_ping.py == --- head/tests/sys/netpfil/common/pft_ping.py Sun Oct 27 18:27:25 2019 (r354129) +++ head/tests/sys/netpfil/common/pft_ping.py Sun Oct 27 21:07:50 2019 (r354130) @@ -5,7 +5,7 @@ import scapy.all as sp import sys from sniffer import Sniffer -PAYLOAD_MAGIC = 0x42c0ffee +PAYLOAD_MAGIC = bytes.fromhex('42c0ffee') def check_ping_request(args, packet): if args.ip6: @@ -34,7 +34,7 @@ def check_ping4_request(args, packet): raw = packet.getlayer(sp.Raw) if not raw: return False - if int(raw.load) != PAYLOAD_MAGIC: + if raw.load != PAYLOAD_MAGIC: return False # Wait to check expectations until we've established this is the packet we @@ -62,7 +62,7 @@ def check_ping6_request(args, packet): icmp = packet.getlayer(sp.ICMPv6EchoRequest) if not icmp: return False - if int(icmp.data) != PAYLOAD_MAGIC: + if icmp.data != PAYLOAD_MAGIC: return False return True @@ -71,7 +71,7 @@ def ping(send_if, dst_ip, args): ether = sp.Ether() ip = sp.IP(dst=dst_ip) icmp = sp.ICMP(type='echo-request') - raw = sp.raw(str(PAYLOAD_MAGIC)) + raw = sp.raw(PAYLOAD_MAGIC) if args.send_tos: ip.tos = int(args.send_tos[0]) @@ -82,7 +82,7 @@ def ping(send_if, dst_ip, args): def ping6(send_if, dst_ip, args): ether = sp.Ether() ip6 = sp.IPv6(dst=dst_ip) - icmp = sp.ICMPv6EchoRequest(data=sp.raw(str(PAYLOAD_MAGIC))) + icmp = sp.ICMPv6EchoRequest(data=sp.raw(PAYLOAD_MAGIC)) req = ether / ip6 / icmp sp.sendp(req, iface=send_if, verbose=False) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"