From owner-svn-src-stable-12@freebsd.org Mon Sep 16 14:25:52 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 882D31238F2; Mon, 16 Sep 2019 14:25:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46X7nr31pPz3FK9; Mon, 16 Sep 2019 14:25:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 466C92190B; Mon, 16 Sep 2019 14:25:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8GEPqJ6023977; Mon, 16 Sep 2019 14:25:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8GEPqsa023976; Mon, 16 Sep 2019 14:25:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201909161425.x8GEPqsa023976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 16 Sep 2019 14:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r352397 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 352397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2019 14:25:52 -0000 Author: andrew Date: Mon Sep 16 14:25:51 2019 New Revision: 352397 URL: https://svnweb.freebsd.org/changeset/base/352397 Log: MFC r348323: The alignment is passed into contigmalloc_domainset in the 7th argument. KUBSAN was complaining the pointer contigmalloc_domainset returned was misaligned. Fix this by using the correct argument to find the alignment in the function signature. Reported by: KUBSAN Sponsored by: DARPA, AFRL Modified: stable/12/sys/sys/malloc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/malloc.h ============================================================================== --- stable/12/sys/sys/malloc.h Mon Sep 16 14:07:30 2019 (r352396) +++ stable/12/sys/sys/malloc.h Mon Sep 16 14:25:51 2019 (r352397) @@ -177,7 +177,7 @@ void *contigmalloc(unsigned long size, struct malloc_t void *contigmalloc_domainset(unsigned long size, struct malloc_type *type, struct domainset *ds, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, vm_paddr_t boundary) - __malloc_like __result_use_check __alloc_size(1) __alloc_align(6); + __malloc_like __result_use_check __alloc_size(1) __alloc_align(7); void free(void *addr, struct malloc_type *type); void free_domain(void *addr, struct malloc_type *type); void *malloc(size_t size, struct malloc_type *type, int flags) __malloc_like