From nobody Wed Dec 22 10:05:46 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8885E1905650; Wed, 22 Dec 2021 10:05:53 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JJpqf6vKhz4YNy; Wed, 22 Dec 2021 10:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF69F1B4AA; Wed, 22 Dec 2021 10:05:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BMA5kx3091802; Wed, 22 Dec 2021 10:05:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BMA5kQQ091801; Wed, 22 Dec 2021 10:05:46 GMT (envelope-from git) Date: Wed, 22 Dec 2021 10:05:46 GMT Message-Id: <202112221005.1BMA5kQQ091801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 7785cdd1f9a8 - stable/12 - Reapply r360852 (by cem): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7785cdd1f9a82966cc8cee4f4a50ab438f392139 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640167551; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7rXaDMG+KStyNLiG2lEoD1VM+t0FfvTpzI8A2uUbylQ=; b=WW4jbqG/Nupw7Cv1Yrskk6ht/Lm8hKegdrtGXlWyAU0IvX8L4wK0AL0gr5+PqWyD+EoADU Mm7DddO3PMXrOHrCrXI2OWQ5SFe1K37GBsrFiVr9hXOjuhsnvOBqOFDNN8ncanfRf3Iw++ xafPizN89da7uKm8E240BR3GoLZdf+IadGtMPmFxtGVUIhXCOEvQ1i62YxWSQK0gzr4klY Eu68BODAU4Y/SLMO/O2Q0mn65aVsL2dtdZCryZ2ObyWQ6tkZKIB/v9T+fFvq4FkVWGVOV1 fPsLKKiLHrfHI6vP1vVnQSEiGPPeYTd/+26Cg7FDIDc56RAqEdP3jiatAHhxVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640167551; a=rsa-sha256; cv=none; b=eKt4OTvWDgsZR77TWj0VZDkR8RnYf3z/7/Zlt0eMNBQNCg0PYb+T8430NQ/0LYpr/dsbK1 yeLkorOTdqrNLGxGi2BVAfF8zg5TDawR2RlSL/MGgnCQJQf4hAfPPteJ7njSw3W+wOORo8 7LA8zdMPgHy8pxo+vxT/x0eimYDIafkDBUxBYuZiZZodeXNdqDh3u7hqTCe41tJTpDnYaT ZM2BeeZT3DPMMvvb0lkVUO+YiujdubcV77e0tcPBoRpcVbH5kdReyT00y461DaMA9VPc+A LrZTFwFDutQf9uiPEJ5OR9nliKe7wZhSDNI9M3EWtxXaDBxjzrPc0bUWFED7/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7785cdd1f9a82966cc8cee4f4a50ab438f392139 commit 7785cdd1f9a82966cc8cee4f4a50ab438f392139 Author: Dimitry Andric AuthorDate: 2020-08-06 19:23:00 +0000 Commit: Dimitry Andric CommitDate: 2021-12-22 09:58:23 +0000 Reapply r360852 (by cem): clang: Reject %n for __attribute__((format(__freebsd_kprintf__))) A follow-up to r360849. Reported by: imp Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D24786 (cherry picked from commit ec280e9ec4b825ae73cdeccffeb8e72ce7dcc99d) --- contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp b/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp index f3ac181214ac..0de2b112fb8a 100644 --- a/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp +++ b/contrib/llvm-project/clang/lib/AST/PrintfFormatString.cpp @@ -317,8 +317,8 @@ static PrintfSpecifierResult ParsePrintfSpecifier(FormatStringHandler &H, case 'g': k = ConversionSpecifier::gArg; break; case 'i': k = ConversionSpecifier::iArg; break; case 'n': - // Not handled, but reserved in OpenCL. - if (!LO.OpenCL) + // Not handled, but reserved in OpenCL and FreeBSD kernel. + if (!LO.OpenCL && !isFreeBSDKPrintf) k = ConversionSpecifier::nArg; break; case 'o': k = ConversionSpecifier::oArg; break;