Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp60230pxu; Thu, 22 Oct 2020 15:29:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1r2RvcSow7xIgK5dL3BXEbkXJBW01Jvbnuiv+b3uKAOTbEyHjmIC5trpI+nVwqb/pohkl X-Received: by 2002:a17:906:cc0d:: with SMTP id ml13mr4409137ejb.2.1603405758568; Thu, 22 Oct 2020 15:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603405758; cv=none; d=google.com; s=arc-20160816; b=WfkjZIS/dftM0ZZPJMqQ/VbNEvs/35Qyld9TgftFlTSnnSVxTtlfhdP4w0ReiNvcGG nQakC8d/0Z4tvqnKXxTFkucTKmlYCuNrSUtBUzXI6q6SafL8/aFGxvjUDS6kXc6IS2Zo PUs3E8W3A2NXj7BzEckCW7pOOal6X7NH6/nxsX7pbzBWdq7X1/JjDyt+lRzkrY22E6kb laxznkEyNZ5KrhNbuD0K0ZnWzYZmavE4H63W7NC4eOKl41BpVDjLfOeE73TdUJnVntZm fW8ylSRBunEamHt95mNDXBfawHqEMX5mEuHo8QtJp9eY79XFG0RZC2DnW2qeT493MSOg vH6w== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=enF/NQ78UlHZi0kpjlRMqO+lesxBNMFNnWEi966YlwU=; b=xvnNd+rtHZJT/2bm8XSVYTAF9nRzSCzh6BrCaf7qHQ0gH45RQ+4kfxjLAvP/fqjHMk GgaIUp3VBTzOCAHMNvGhIgiF2ngX5HU5Qhy2IKEo5QaNHYYZjYORJbUFU+D2Dp0jBREh W0WZwiC6k1RX6ezmU+gRitTQJkQVS6xvSR7e2okBFlPNX4jgAsx07SwFT+xYVhNfyS9Y /oxeuF+XdhvMoo3bDwk4dxjl0hd7EJtWw6qeV1ogx6yyclHiSdO8OLXQ4PxVYhMFeQl1 TGgBYm/zh96Te42z2F7m+hAhVoOM5zqmu/SjSYzuDGaTR5TjIYmJNeQYqn60nbNPZpY3 dcrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=lcgl8Reh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d18si1934323ejo.406.2020.10.22.15.28.56; Thu, 22 Oct 2020 15:29:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=lcgl8Reh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2895554AbgJVONy (ORCPT + 99 others); Thu, 22 Oct 2020 10:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2895495AbgJVONy (ORCPT ); Thu, 22 Oct 2020 10:13:54 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB0A6C0613CF for ; Thu, 22 Oct 2020 07:13:52 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id l15so2438296wmi.3 for ; Thu, 22 Oct 2020 07:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=enF/NQ78UlHZi0kpjlRMqO+lesxBNMFNnWEi966YlwU=; b=lcgl8RehFALlBvKW+2WEqI6hL3DQCvnayUx386YFYdIACL6eZdDekWSge6wl0xau/P OurS80PGFdE+uCz2ywydsXe1KEcW2OKxZnMZUyxNDMbbrQ0IMr0SI/JTRmyVAXaE9J1O hmmezb9rcO1k/LRCAp+BJe5NUZwtKmz2hdtkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=enF/NQ78UlHZi0kpjlRMqO+lesxBNMFNnWEi966YlwU=; b=KZO+Hsb3Y2Sg4SLpmcSPVE39l39JX6dvzvB/i+jhrwjpJigVqKSvwAwHUWnAF/EHDe 4inHxBh9juNhFHnStEs21U8kikaXA7/gC68rZrg8CTqVUBdrPtYI58aQlA3hwOentCho mhPFb1NnA1mDU5ZNIQbSTwujNrFnlgEtjVmuVpSPfAiuJmVanZU0QaOZegw+koPGcDqI q2JplRoIDuelZxhiHVJzX5Ehn2BnENfkyM71YaHcGzTeNXj5A3OQpWil5cktQFai47mU jJFmHTgtP2PYDUce9IrTAYqqtw1Lbpg37wWlgwPMvloDNsgtY6NUHlpm2LeCZBjalz/A UY9w== X-Gm-Message-State: AOAM532Di/pRJ214yHvO88529U+6JzMjSr13NJ1ZJ2P8DOTd/Y5tdWNY wiI0rUJiHeD4/Pq8xdJKm8wX8A== X-Received: by 2002:a1c:4604:: with SMTP id t4mr2863073wma.95.1603376030491; Thu, 22 Oct 2020 07:13:50 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id y4sm3726390wmj.2.2020.10.22.07.13.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 07:13:49 -0700 (PDT) Date: Thu, 22 Oct 2020 16:13:47 +0200 From: Daniel Vetter To: Sumera Priyadarsini Cc: dri-devel@lists.freedesktop.org, outreachy-kernel@googlegroups.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, daniel@ffwll.ch, melissa.srw@gmail.com, linux-media@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit Message-ID: <20201022141347.GZ401619@phenom.ffwll.local> Mail-Followup-To: Sumera Priyadarsini , dri-devel@lists.freedesktop.org, outreachy-kernel@googlegroups.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, melissa.srw@gmail.com, linux-media@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2020 at 07:07:50PM +0530, Sumera Priyadarsini wrote: > Using snprintf() for show() methods holds the risk of buffer overrun > as snprintf() does not know the PAGE_SIZE maximum of the temporary > buffer used to output sysfs content. > > This patchset is a series of Coccinelle cleanups across the staging > directory to convert snprintf with scnprintf in the relevant files. I think you need to edit your template here since this is now drivers/gpu, not staging :-) -Daniel > > Sumera Priyadarsini (5): > gpu: drm: amdgpu: Replace snprintf() with sysfs_emit() > gpu: drm: amdgpu: Replace snprintf() with sysfs_emit() > gpu: drm: amdgpu: Replace snprintf() with sysfs_emit() > gpu: drm: amdgpu: Replace snprintf() with sysfs_emit() > gpu: drm: amdgpu: Replace snprintf() with sysfs_emit() > > drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++---- > drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 4 ++-- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++-- > 5 files changed, 10 insertions(+), 10 deletions(-) > > -- > 2.25.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch