crypto/external/cpl/tpm-tools/lib/libtpm_unseal/Makefile
author knakahara <knakahara@NetBSD.org>
Thu, 19 Sep 2019 06:09:52 +0000
branchtrunk
changeset 454505 e58755df0724
parent 415281 8deecf9ea5d2
permissions -rw-r--r--
l2tp(4): avoid having struct ifqueue directly in a percpu storage. percpu(9) has a certain memory storage for each CPU and provides it by the piece to users. If the storages went short, percpu(9) enlarges them by allocating new larger memory areas, replacing old ones with them and destroying the old ones. A percpu storage referenced by a pointer gotten via percpu_getref can be destroyed by the mechanism after a running thread sleeps even if percpu_putref has not been called. Tx processing of l2tp(4) uses normally involves sleepable operations so we must avoid dereferencing a percpu data (struct ifqueue) after executing Tx processing. Address this situation by having just a pointer to the data in a percpu storage instead. Reviewed by ozaki-r@ and yamaguchi@

# $NetBSD: Makefile,v 1.3 2016/07/25 06:20:26 christos Exp $
.include "../Makefile.inc"

.PATH.c: ${DIST}/lib

LIB=tpm_unseal
SRCS= \
tpm_unseal.c

SHLIB_MAJOR=1
SHLIB_MINOR=0

LIBDPLIBS+=tspi ${.CURDIR}/../../../trousers/lib/libtspi
COPTS.tpm_unseal.c+=-Wno-stack-protector

.include <bsd.lib.mk>