Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp7515868rwl; Thu, 23 Mar 2023 05:32:56 -0700 (PDT) X-Google-Smtp-Source: AK7set8BsoiZTJcErbmfiqwHZ3H3F9kpQBSLS8dlvgnBPU2S87saoVNXRbJmUWS9UwoYRYwDkqFD X-Received: by 2002:a17:902:e381:b0:19e:2869:7793 with SMTP id g1-20020a170902e38100b0019e28697793mr4678724ple.16.1679574776318; Thu, 23 Mar 2023 05:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679574776; cv=none; d=google.com; s=arc-20160816; b=GYHkX08C7lf2k6P3pDTFA49ChQJ52e1qoMkhYptGlYJFgV0fDJXk1mpg5SLUdclCpH HcBz7t9XiXrHhrU8fY9eAAYtSIfrjpPkBK8NywDZX7mQYHikStVF9Ttf9yqSY2if+tlW 59WGP00SGNM02nKzRAmpAiSE6bn9lLZAk89OQkdts4y8oiNwguEae/7/k+bxwMqqqVhd 4ip8epoU6xYxfZ/gIIqXqOEGAs6JsudTAl6iZgDA/vgUDBhSQLwoCbXzqx5CFiDOABtO lbpAQlWEA2+pMX2V+kMXequn1c37cyWGxbYja6gzCPKnKjc322beHvBmpKcx+nEz+Hpd FaKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=slzi2/SGiNzGpWxg8nbtRYAUNuCepI3thUwObjsiqRo=; b=IBg4prUGaJO9wFJIaJvUKBJ/XtWSFiCkqpsHcVJN22qbvwtrZCC2tPHYMBFSDTHINV M44xJgNYdPb4p0MqaINW3RK8pf5YII+Toc03ZH1o259BnliQTFVgFp8Kc65gW1uxofJf cBL8QCBQl+OHUZlGlwrdbAo54XMBqZbeGJP7B3IbPeOGcOjJW8K3Oag0TcXgmr9PUcxg NbEeu0TCLVMhud6t59rzS3t6sydDenr6AIkT+d6hN/QoRUDvS+dq2ONuqzKniIR6dUyb C4N2q3SUN5Yxv/0RceIvtK3ndqaO8QevTZwru4mZs6v7SX6KYSMfVGu5w3BXW+mus5v4 gBEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OCD68J1N; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a170902d2d000b001a206785ee3si722399plc.462.2023.03.23.05.32.43; Thu, 23 Mar 2023 05:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@intel.com header.s=Intel header.b=OCD68J1N; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbjCWM14 (ORCPT + 99 others); Thu, 23 Mar 2023 08:27:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230342AbjCWM1n (ORCPT ); Thu, 23 Mar 2023 08:27:43 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF252233D0; Thu, 23 Mar 2023 05:27:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679574462; x=1711110462; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FRzwRP38LV+jCz/x8LDx7T/2ywMp/f+ziP/0J2e9bvc=; b=OCD68J1NX7vX2RWmQOEghg37P4iVKXJ62FNd6q0GOrLZMfE9J4S9uhLA VIz3OGBO4Im5FF92ki0SnP5lQp2T8n4vpzwAcl+nF6bj3YtDfdaEY2CWQ KL8sj+HXYZfMKNF7CELNDfyQpO3ZvXbbnJ92mKF0vCSEfVb5yoNuqq02o nJb4g7h4Zz4jIaahMnkbgulw9sNpKzI1w+YugQu8SvWc+ZE2EXphSPGvx MewNxhfy9j3cG6pxGA5VpuIDKK1aBB26MZOM4nZpTMVWgnw0eD8oBbtz3 zv0+wZ6vL/4cU55gpw5kmIab5cYF5hY64flXKdUiYmN4dNzMkoJyYbAwn g==; X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="425749847" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="425749847" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 05:27:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10657"; a="659579104" X-IronPort-AV: E=Sophos;i="5.98,283,1673942400"; d="scan'208";a="659579104" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP; 23 Mar 2023 05:27:39 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pfK2b-007VT8-15; Thu, 23 Mar 2023 14:27:37 +0200 Date: Thu, 23 Mar 2023 14:27:37 +0200 From: Andy Shevchenko To: Jan Kara Cc: Kees Cook , Greg Kroah-Hartman , Cezary Rojewski , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Theodore Ts'o , Jan Kara , "Rafael J. Wysocki" Subject: Re: [PATCH v1 1/3] jbd2: Avoid printing out the boundary Message-ID: References: <20230322141206.56347-1-andriy.shevchenko@linux.intel.com> <20230322141206.56347-2-andriy.shevchenko@linux.intel.com> <20230323095346.ibpv25xjjf6rozpv@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230323095346.ibpv25xjjf6rozpv@quack3> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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-ext4@vger.kernel.org On Thu, Mar 23, 2023 at 10:53:46AM +0100, Jan Kara wrote: > On Wed 22-03-23 16:12:04, Andy Shevchenko wrote: > > Theoretically possible that "%pg" will take all room for the j_devname > > and hence the "-%lu" will go out the boundary due to unconditional > > sprintf() in use. To make this code more robust, replace two sequential > > s*printf():s by a single call and then replace forbidden character. > > It's possible to do this way, because '/' won't ever be in the result > > of "-%lu". > > > > Signed-off-by: Andy Shevchenko > > Looks good. Feel free to add: > > Reviewed-by: Jan Kara Thank you! I'll incorporate this into v2 with dropping not anymore used variable (as found by LKP). -- With Best Regards, Andy Shevchenko