Received: by mail.netbsd.org (Postfix, from userid 605) id 668DC84DB3; Mon, 23 Sep 2019 23:06:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id DAAD284DB2 for ; Mon, 23 Sep 2019 23:06:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id EOoajmH75E3J for ; Mon, 23 Sep 2019 23:06:26 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 66EC784D4E for ; Mon, 23 Sep 2019 23:06:26 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 5FF25FBF4; Mon, 23 Sep 2019 23:06:26 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Mon, 23 Sep 2019 23:06:26 +0000 From: "Kamil Rytarowski" Subject: CVS commit: src/sys/arch To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20190923230626.5FF25FBF4@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Kamil Rytarowski" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: kamil Date: Mon Sep 23 23:06:26 UTC 2019 Modified Files: src/sys/arch/amd64/include: types.h src/sys/arch/i386/include: types.h Log Message: Disable __NO_STRICT_ALIGNMENT on amd64/i386 for UBSan builds This change allows to pick code paths in the kernel that are tuned for alignment sensitive (and stricted in C meaning) code paths. In particular the IPv6 code uses this heavily and skips whenever possible the process of aligning of networking data. With this modification all ATF tests are executed on amd64 without triggering any UBSan reports in dmesg. In theory __NO_STRICT_ALIGNMENT could be tuned for vax and m68k, however these machines are still unsupported in LLVM sanitizers and syzkaller. sys/netinet6/scope6.c:404:6, member access within misaligned address 0xfffffaea81276086 for type 'struct in6_addr' which requires 4 byte alignment Reported-by: syzbot+a86f58d17685317b3df9@syzkaller.appspotmail.com sys/net/rtsock_shared.c:629:41, member access within misaligned address 0xffffddb5db3ff04c for type 'struct rt_msghdr50' which requires 8 byte alignment Reported-by: syzbot+0a3a022bc9d2b8880c16@syzkaller.appspotmail.com To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/amd64/include/types.h cvs rdiff -u -r1.89 -r1.90 src/sys/arch/i386/include/types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.