Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3931139imm; Mon, 8 Oct 2018 11:53:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV63ozFBjZ6ZiIUFTK7HRLefKkWk0RMPVluYpf8G1Bv/0amv+/hyhqcqyltuqe3e1LP/jZnwM X-Received: by 2002:a62:75c7:: with SMTP id q190-v6mr26667518pfc.137.1539024807881; Mon, 08 Oct 2018 11:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024807; cv=none; d=google.com; s=arc-20160816; b=bD083n4bBYLNigbsogCiuWrrOuc+d1XF9G0ruAKTNVX55C47Rr1KdVwmn61nY5OzHx qbGS1EZQ86Pcax5g9pbMzavdO5VjfJiU+CRCT3O5RnOr+199a+GBt3Xf8RYvUFraKfJY mc99Vi7RwUt5AcSjYqJrOV9fy30Ne5ahVwd14QtIpFObz1GLPpOhI+xqqBBtpzTiBLyS zaj8MP6zv75c79r9zxn9yJ2kECeMURUpGwLnn7zcKnDmbAbhmH3jzxwV8q1SwZJpEarg OcyZI2+isEjrmVvgVMPcicY5D37gDB48ZWk1XWnrADT1vsxFsb4II/jwmp1vciBpawCl LNog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Jtf1hbkk4j8xyXFWo9+ivuD+/urYCGROe++nyC65zZY=; b=KoTdeTnUTme9ZFAldmgoeSaDjvsp65rWGHPuYLyLt4nbVszSwE6hqY6OE/W2B2jGV3 sSsvQRaopIXShkV//Lf/5Z/nvQ1eWrmi+B+BzNdGbgnXQOzrXrRngbHFD8rP8gUpQau3 UNyyJAWGFZOYTCigIMCQdM2FKUs2WeBLB/+Q5r6RR9E2xjEJA1PVCLnqmE+c2uJXGo6S QrNgrHQt1hPctnZ7O7oSB22HE3tlcUzGopwf4PvFw5SbdBKt/l2nEJB18z7dteVYZHrC 5pzpcaD+Zv4FPLolfHdJF2b3U8pCyDto+8ZWbl3arrauJjgyLefyw9GkW5A9OTfr10Nf nzuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="n5/EVPml"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13-v6si18038435pgg.89.2018.10.08.11.53.12; Mon, 08 Oct 2018 11:53:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="n5/EVPml"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732628AbeJICGB (ORCPT + 99 others); Mon, 8 Oct 2018 22:06:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:56236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729209AbeJICGA (ORCPT ); Mon, 8 Oct 2018 22:06:00 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B023D204FD; Mon, 8 Oct 2018 18:52:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024772; bh=OdiapfU9klsnPjN+w14cW8JGSEwN5iWU3msJDSV1qcg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n5/EVPmle95FBxkX3CvldNeGKcN06zVaz+tx3t1KPaaEhojWoYKD2n3hpN/GSMWwR IZTU639VVh8K6GLU1KHJ4nV4dmnO8voA+xJ6tZUVdb2SIomin2SkY4jtpcvq7VpH70 MSFLbUyYQu4eKVffaJ/typHmf5702rAO+KJSWTyU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Amir Goldstein , Miklos Szeredi Subject: [PATCH 4.18 149/168] ovl: fix format of setxattr debug Date: Mon, 8 Oct 2018 20:32:09 +0200 Message-Id: <20181008175625.701144946@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miklos Szeredi commit 1a8f8d2a443ef9ad9a3065ba8c8119df714240fa upstream. Format has a typo: it was meant to be "%.*s", not "%*s". But at some point callers grew nonprintable values as well, so use "%*pE" instead with a maximized length. Reported-by: Amir Goldstein Signed-off-by: Miklos Szeredi Fixes: 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up") Cc: # v4.12 Signed-off-by: Greg Kroah-Hartman --- fs/overlayfs/overlayfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -147,8 +147,8 @@ static inline int ovl_do_setxattr(struct const void *value, size_t size, int flags) { int err = vfs_setxattr(dentry, name, value, size, flags); - pr_debug("setxattr(%pd2, \"%s\", \"%*s\", 0x%x) = %i\n", - dentry, name, (int) size, (char *) value, flags, err); + pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0x%x) = %i\n", + dentry, name, min((int)size, 48), value, size, flags, err); return err; }