From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36173C433EF for ; Tue, 12 Oct 2021 11:34:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CDE41610CE for ; Tue, 12 Oct 2021 11:34:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CDE41610CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4DA6D6B006C; Tue, 12 Oct 2021 07:34:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 48A766B0071; Tue, 12 Oct 2021 07:34:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3792A900002; Tue, 12 Oct 2021 07:34:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 262416B006C for ; Tue, 12 Oct 2021 07:34:01 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CB8368249980 for ; Tue, 12 Oct 2021 11:34:00 +0000 (UTC) X-FDA: 78687576240.38.CDAE2CC Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf19.hostedemail.com (Postfix) with ESMTP id 63A56B0000A7 for ; Tue, 12 Oct 2021 11:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=b0i5HpD35IYYo2kDqjwLQoiEsM4wegEvTFvA+h6cYqs=; b=v49KA2RzhVySMhrhx3QnDrAKMS sLDFKlQYrCHMK+4pIep91RSNNr2oz3Av4KP8uphItv1EI5EIGgIItq7JvnOgZilUKpZByfMcnaLHE R4ed0SMkpxpD+lgCoDePTivmnoZgemBDMP1QvlJZtJYB+pYoUCvEScm93imE8THYM0KDeiIiG/5e7 9sFZHxx6nI+OhNtE4cixRzCZexMu9d2ikHlapB8LtKGClA40QoWb5c/cMhEonWdE7I5Q52mqC3P6D wCu4g+VUqKwDdzkBpIsZXKQwsp5S8PqY/Qeg6mrABFVAAUmTEtX+Zr6SzRE+0kMD7s+96qVGU11F7 GFxq9WMg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1maG1i-006SX8-0Q; Tue, 12 Oct 2021 11:33:16 +0000 Date: Tue, 12 Oct 2021 12:32:57 +0100 From: Matthew Wilcox To: Rasmus Villemoes Cc: linux-mm@kvack.org, Vlastimil Babka Subject: Re: [PATCH] vsprintf: Make %pGp print the hex value Message-ID: References: <20211008193829.849532-1-willy@infradead.org> <1093c8db-5d96-18ff-cb27-e74cddb757a4@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1093c8db-5d96-18ff-cb27-e74cddb757a4@rasmusvillemoes.dk> Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=v49KA2Rz; spf=none (imf19.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 63A56B0000A7 X-Stat-Signature: cwxudppzf7zoismb3i8eh8wmmm58axdw X-HE-Tag: 1634038440-769452 X-Bogosity: Ham, tests=bogofilter, spamicity=0.015139, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Oct 12, 2021 at 11:55:50AM +0200, Rasmus Villemoes wrote: > ...default_flag_spec has '.flags = SPECIAL | SMALL,', i.e. what one > would get from %#x . I'm guessing that's what upsets 0-day. > > Geez it would be nice if 0day actually reported the "Expected foo, but > bar was emitted to the buffer". It's there; you just have to dive into the dmesg.xz to get it: [ 48.607787][ T1214] test_printf: vsnprintf(buf, 256, "%pGp", ...) returned 33, expected 29 [ 48.616106][ T1214] test_printf: vsnprintf(buf, 18, "%pGp", ...) returned 33, expected 29 [ 48.624292][ T1214] test_printf: vsnprintf(buf, 0, "%pGp", ...) returned 33, expected 29 [ 48.632403][ T1214] test_printf: kvasprintf(..., "%pGp", ...) returned '0x0(node=0|zone=0|lastcpupid=0x0)', expected 'node=0|zone=0|lastcpupid=0x0)' [ 48.645741][ T1214] test_printf: vsnprintf(buf, 256, "%pGp", ...) returned 33, expected 29 [ 48.654023][ T1214] test_printf: vsnprintf(buf, 23, "%pGp", ...) returned 33, expected 29 [ 48.662218][ T1214] test_printf: vsnprintf(buf, 0, "%pGp", ...) returned 33, expected 29 [ 48.670327][ T1214] test_printf: kvasprintf(..., "%pGp", ...) returned '0x0(node=0|zone=0|lastcpupid=0x0)', expected 'node=0|zone=0|lastcpupid=0x0)' [ 48.683670][ T1214] test_printf: vsnprintf(buf, 256, "%pGp", ...) returned 88, expected 71 [ 48.691937][ T1214] test_printf: vsnprintf(buf, 64, "%pGp", ...) returned 88, expected 71 [ 48.700128][ T1214] test_printf: vsnprintf(buf, 0, "%pGp", ...) returned 88, expected 71 [ 48.708249][ T1214] test_printf: kvasprintf(..., "%pGp", ...) returned '0x4fffffc008003c(uptodate|dirty|lru|active|swapbacked|node=1|zone=1|lastcpupid=0x1fffff)', expected 'uptodate|dirty|lru|active|swapbacked|node=1|zone=1|lastcpupid=0x1fffff)' [ 48.730275][ T1214] test_printf: failed 12 out of 420 tests So you're right, it's missing the 0x, but I still don't know how to run this self-test.