Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4724314rwl; Mon, 3 Apr 2023 08:46:26 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+Td+TBFK74HyCiHNUZswIQ2Ln5UJmxofBGUBQQ0Ns6Sz/wBcQfEFrYQ/H6Ohbjdtl2HP2 X-Received: by 2002:a17:906:4b08:b0:928:796d:71e8 with SMTP id y8-20020a1709064b0800b00928796d71e8mr34734763eju.3.1680536759299; Mon, 03 Apr 2023 08:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680536759; cv=none; d=google.com; s=arc-20160816; b=b6KT1n9h1n2jkE5+W1YcofXoSgW0gw3dnOI5UsQdo3bYYGf3RsaS9EgC9mshk1D/1O HPuMjwaBg/KSr4anoLfiSe9MS2hm8ArGVr9q6bd/yJjEx0iwTddzfMVhRrfR+btggbEy k3ADOwfevqAkxE1VKzreNs/37Oj/G7vNx1vCO0juV+EQOqnh/mpmu0C2rFbyWGxY4pRm wIHL8Ts1F5cQ7K61ob8vwi5WGCZnAJDvqxmRtoC5jbKHxvJC/fx4QhHJr3BrH4D8JVJH eGjz5DSwcMy3SiMAM48r8ztDPCe3Xsyf2TnFTpbMPt6xOw7ZP45FMRcUojW3TBnQkkc8 eaUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fR2s9+JDNNa1uEdAtZHMM34i2EJ2xvvS10PJPUpk8Tw=; b=V02PBG6VeNz3yMB2pBDZ0IvQxG+AEgEz/LnxkU5QWeBOiScELL2UF+2d0/0hBQjllu eE8g+BHpxGbRveLLj91S1EJ1yDRs/NdHRtxoIiHEopfKaiw7H+kqEt+4Joqly1j+c9JM pU5iji2dsprRMNwgnOeSYMOHquNvAxItiq0EcAkVvtpc/qIW4R81n+OktSpACKu6SvYW 1WwVleVPfW3I3oudibkWUR76ESmH3cMiuKGDWPFnv4p0Nw4zi8kYBFHyEoZjTI3LiNK3 OgmtTAFRbztmA4NjS3TwYv6prqOl1s1FEoqNGTxfPDElFjU/2WSvOsxPRWNHdQH4uP9H Wsow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JeEDSZDd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wb8-20020a170907d50800b00947c4925900si5226788ejc.348.2023.04.03.08.45.34; Mon, 03 Apr 2023 08:45:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JeEDSZDd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232874AbjDCPfI (ORCPT + 99 others); Mon, 3 Apr 2023 11:35:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232858AbjDCPfH (ORCPT ); Mon, 3 Apr 2023 11:35:07 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E379B1BE1 for ; Mon, 3 Apr 2023 08:35:05 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id c18so28378416ple.11 for ; Mon, 03 Apr 2023 08:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1680536105; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fR2s9+JDNNa1uEdAtZHMM34i2EJ2xvvS10PJPUpk8Tw=; b=JeEDSZDdrhUuzUy391WQWKkkvpcdSBaOtDd6sAfXdgcQ0si3zVaG88tzCJbsDWfpqE /oiggCHPIWfK8U+lMtNOrAqJQgCDxFhVmkKjISMu9m3FeCArnhwiN58oCX0cd5ihNmVB dt5+py3or0hapeKq3ptfUgORdG6Ym8ZNkZbmU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680536105; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fR2s9+JDNNa1uEdAtZHMM34i2EJ2xvvS10PJPUpk8Tw=; b=sLacMPr/1Avi9JEtmpBmw13VGniyonCqcqqddeZhx/oPqkOOWswwC921ZzS1FkFyGF rksZMSsDDU+EJMcrFxglZnurKINj55QaVvvInpu+2PVxalw//vi+9l6s3SuYSx48nT9V ddIMbosKAZjYzcuY6DJjJEFDXFI3bE9JyWTBezONNSWC3DuKJUmoyRBpickBUSRejNl9 r/ogYWIu2wHHZFko3vSqFUWVorWM7jLxQiASzvVRvpdjhyhK4gvsR+QgZGESO9WMRJ2n kzg8c3UFHzx95Q8WK4/nssxhArnfhazvD8Iq9LF6tJeNWAoZVmSHz3+QzbszYK1k8nLx Py2A== X-Gm-Message-State: AAQBX9dwnvDjN9vZ9RevGNb/l+icncermgxT12NdTYwlYE2JG1HnHTc3 PWB7tf9L5mYyP+AHVa/UehOMBw== X-Received: by 2002:a17:902:e847:b0:19e:d6f2:feea with SMTP id t7-20020a170902e84700b0019ed6f2feeamr46232340plg.9.1680536105355; Mon, 03 Apr 2023 08:35:05 -0700 (PDT) Received: from google.com (KD124209188001.ppp-bb.dion.ne.jp. [124.209.188.1]) by smtp.gmail.com with ESMTPSA id t12-20020a170902bc4c00b001a1d4a985eesm6698057plz.228.2023.04.03.08.35.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 08:35:03 -0700 (PDT) Date: Tue, 4 Apr 2023 00:34:58 +0900 From: Sergey Senozhatsky To: Jaewon Kim Cc: Petr Mladek , Jaewon Kim , "senozhatsky@chromium.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , GyeongHwan Hong Subject: Re: [RFC] vsprintf: compile error on %09pK Message-ID: <20230403153458.GE12892@google.com> References: <20230403104617epcms1p383bacbca705c0d7e4fffca6833050e42@epcms1p3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (23/04/03 23:39), Jaewon Kim wrote: [..] > > Okay, then we can't use %09pK. I've just wondered because %9pK works. This is not per printk / kernel, Wformat warnings come from the compiler. Per C11 (7.21.6 6): 0 For d, i, o, u, x, X, a, A, e, E, f, F, g, and G conversions, leading zeros (following any indication of sign or base) are used to pad to the field width rather than performing space padding ... For other conversions, the behavior is undefined. So using 0 for p should trigger an undefined behavior as far as the standard C concerned. Unless I'm missing something.