From owner-freebsd-current@freebsd.org Tue Mar 6 11:07:04 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C61ABF4A6A3 for ; Tue, 6 Mar 2018 11:07:04 +0000 (UTC) (envelope-from raichoo@googlemail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F4817098A for ; Tue, 6 Mar 2018 11:07:04 +0000 (UTC) (envelope-from raichoo@googlemail.com) Received: by mail-io0-x22d.google.com with SMTP id 30so21621573iog.2 for ; Tue, 06 Mar 2018 03:07:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yegiSZ8vF166nYqAm84OCOu3Ej09MNseV92OHliWMRk=; b=HESBK5OIVuwd6/oEGGfQGgODViGeuobL5XHW8IvsCVWMriJtSImGU6y8oaSQmOVNNY qnLAQBJTXOCjIp4CRTRdYCBv2ZE0CitcGFj+ZAJr4X9GuuPwKqtvC8NgfyGRgcHHDE2R w3UkFDkpmfkd1jVMe3ilx7+PE41k/4EvBdwVmZ2LkVHa9gGovjm1AjBfr4yFi8yIkDpT vAsa34yW1GJtKQ1p/qYcEsaiDI3ZJ48lrURk5VUoEfP117AzrSX26aIhTynq+I6/1NEu EYATndZR7u8gMG3jKz9m/xmkb6xj0EKiWya5VScnyKXxTtyCzRsZViwj0RyfHqixtwdy Hqaw== X-Gm-Message-State: APf1xPBsRnheUhylyaACse82JiIs5sG/+e4SAizlV6m4sGqj6eJE5JHm F9NKer7IsBQJLMHxCmft9deYrKWARbvj/PD+YXuYVg== X-Google-Smtp-Source: AG47ELtVMnlVGHl6p+GqX0xfSMphBgRi7ghxt9c06y6LDKOVaKmpYTqNC0lw+jIdgOZLMuJWTeUSC3Gc/YiwStsfXCc= X-Received: by 10.107.183.131 with SMTP id h125mr21289824iof.133.1520334423209; Tue, 06 Mar 2018 03:07:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.141.210 with HTTP; Tue, 6 Mar 2018 03:07:02 -0800 (PST) From: raichoo Date: Tue, 6 Mar 2018 12:07:02 +0100 Message-ID: Subject: DTrace suddenly running out of scratch space. To: freebsd-current@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 11:07:05 -0000 Hi, I'm encountering an issue with recent builds of FreeBSD CURRENT that haven't been present by the end of last year. I gave a presentation at 34c3 where I demoed using DTrace to identify code that is susceptible to timing side channel attacks. The script is rather simple but worked fine back then. #pragma D option dynvarsize=512m int len; BEGIN { len = 0; } pid$$target:authenticate:check:entry { self->enter = vtimestamp; self->arg = copyinstr(arg0); } pid$$target:authenticate:check:return /self->enter/ { @timing[self->arg] = lquantize(vtimestamp - self->enter, 700, 800, 10); if (strlen(self->arg) != len) { len = strlen(self->arg); trunc(@timing); } self->enter = 0; } pid$$target:authenticate:check:return /arg1 == 1/ { printf("Password is: %s\n", self->arg); exit(0); } pid$$target:authenticate:check:return { self->arg = 0; } tick-3s { printa(@timing); } It basically measures the time it takes to compare 2 strings, nothing fancy. For some reason dtrace now reports the following when I run this script: dtrace: error on enabled probe ID 2 (ID 76791: pid3282:authenticate:check:entry): out of scratch space in action #2 at DIF offset 12 dtrace: error on enabled probe ID 7 (ID 76792: pid3282:authenticate:check:return): invalid address (0x0) in action #1 at DIF offset 24 I'm not quite sure where this is coming from. Maybe the script was wrong in the first place and recent changes are reacting to that, but to me it seems as is the aggregations are not getting cleaned up properly. Kind regards, raichoo