From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA62BC388F7 for ; Thu, 22 Oct 2020 13:59:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 47FAD22249 for ; Thu, 22 Oct 2020 13:59:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IN5ulN/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47FAD22249 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 00FB26F554; Thu, 22 Oct 2020 13:59:33 +0000 (UTC) Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E1056F52A; Thu, 22 Oct 2020 13:37:56 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id b23so956927pgb.3; Thu, 22 Oct 2020 06:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=IN5ulN/lhVpkv0cSxQVYeQmL8e6XC9Ui0ongH71NZy+wDEtGl/7jnitdi0qhAAyIZY fC7g6ckIDcNipQDDU/l95Zz5SIw5WgFDHGPbZsnqwhcPDWDUeYQ+K0+pZ4exBAq4gbcw rqJ6yYA5w6lq9ZOLdFbpsKUwr7R6EDI8UsYT73x2NUL9/nh4In959E24DYHQiR4z5JBY 3PhmcpvnBuuDiLX7PaDg4d9j17853UB9O1sXkM4XGUKK+pIkSbJwNUlF7Kq7ZfYzjjTA UDpUqi4GQ2QwwzVjXoCBSJUnNgaE17+WjxzlHjS3QXF8s9sEEYtv9MqLfP/Xm8h49QZ4 R9WA== 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:mime-version :content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=olszCwgk7FFGv16fOk+1/VyDQ1dz9N60K9NOv9LGjGlyG59yD5Dp8NSivYvimik72A OGxnqmJxlAZ9ewArC62QFU5nz4VP6dooe0ACLKYA6QSDA08fB2ITeLHwweDo4bx/VLMD AFw2M6up8sVq17OYxDE2WdAKJzMf080vCmYP95wziPmavZojzHqJiO2O+M82bZKwAbo4 pXsUdxaqkMAEeNgWbr59ZPz0eGi/OggBrQyVlo5zZ/xgiB0GoMhV2tJ4hbxLqipehGKU eTmentiLIk42B8VsU9p7MQ46w4ct+sVJVxiuBNyh+AgwkOrh8+tRV73iupY0WdF8sbwY e/vg== X-Gm-Message-State: AOAM530GuTNn/ukxsBGLIbcZJNln3gGxCvKBkkjNX3Rr8MY+e7WxqcdF lbg1s+hucfFhi1bp4qul1qVMbXZ5O0Vv9Q== X-Google-Smtp-Source: ABdhPJxzYwjbdLDADhpa8w757osNj5Hty2iFA+tEbvr3E1nQBdPpkX6BpAdeBon6QKBNbFuEjHUUvw== X-Received: by 2002:aa7:9e9d:0:b029:152:5ebd:42a with SMTP id p29-20020aa79e9d0000b02901525ebd042amr2500221pfq.4.1603373875970; Thu, 22 Oct 2020 06:37:55 -0700 (PDT) Received: from adolin ([49.207.204.75]) by smtp.gmail.com with ESMTPSA id a22sm2538214pfk.29.2020.10.22.06.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 06:37:55 -0700 (PDT) Date: Thu, 22 Oct 2020 19:07:50 +0530 From: Sumera Priyadarsini To: dri-devel@lists.freedesktop.org Subject: [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailman-Approved-At: Thu, 22 Oct 2020 13:59:31 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, melissa.srw@gmail.com, outreachy-kernel@googlegroups.com, daniel@ffwll.ch, alexander.deucher@amd.com, christian.koenig@amd.com, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" 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. 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 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6886436790360604672 X-Received: by 2002:a05:6e02:111:: with SMTP id t17mr1958809ilm.79.1603373510622; Thu, 22 Oct 2020 06:31:50 -0700 (PDT) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 2002:a02:cb4b:: with SMTP id k11ls188105jap.2.gmail; Thu, 22 Oct 2020 06:31:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMIcBlbOmWTof/gj1M8baOCNq3YAoXTb/G9JSuT5ap+LdidjLp2Mdd4mDBW+tZ/VFBl0ua X-Received: by 2002:a02:5e04:: with SMTP id h4mr1810791jab.6.1603373509337; Thu, 22 Oct 2020 06:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603373509; cv=none; d=google.com; s=arc-20160816; b=y5d3DU+14VeqWj8DNfjNzqejWqs1kdVn3gqu8DRz3CYTQPHivMp/jv04syreorOoMC ov0LMdNLklS+jP3wBCNofnSlRkmRa1nOlVJfkBjRPAHJ8BE6MwwFoS/H3pXbcuNS3Bj1 aDMBI3HYGV/Awf6zLgDUEwWo+CY8iyq7jZvq43BDmEs4Zxc5AV/dS+meUW60eHwFbwBN wTIrbI0R3i3iMwJA4dZOednFCyWujUr1c918b4F2H4cvy+/ubz3Zn7VcW29ysfgjbUuU RzL2DMVXzQzm/TZGTzfn/bLAaD34dnf8soolTRo5Uip8h6RWrqcEaNH3/5W/IeIIYGcK MFew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=v7qmGtnYlrn/bv9a2ddbu1VUGHq5CMN2k8qdDPlkfFnrsGg2EyNLDNx5KynmCwjz8I 0+YbHRoFujTrbrYSmXbbCE4iUsoxAX6TI1xP2zvwVp/7Xc8oCBSdAarBvdjxM25/eI/O Lri2/kNkhQmYbcS9gMECdKtHroshK1i5WQioKFaNqaORjOHEDzYCf6ZDGWfwSKW5cEjt TEnmnbRbHPEipd5wqx81RBUMbZ8wQK+jfKHAgKnJ4Ne5w+dyMtwr0Ckig2JnWDRqZfyN quX9jcAJUIHQ4MCekAEJwbgRFIzwfUDqOJ242UnqYZMpBzocag2gWmTSfPn5QZVL6je0 936w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pyopdLJc; spf=pass (google.com: domain of sylphrenadin@gmail.com designates 2607:f8b0:4864:20::544 as permitted sender) smtp.mailfrom=sylphrenadin@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com. [2607:f8b0:4864:20::544]) by gmr-mx.google.com with ESMTPS id i18si92957ils.5.2020.10.22.06.31.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Oct 2020 06:31:49 -0700 (PDT) Received-SPF: pass (google.com: domain of sylphrenadin@gmail.com designates 2607:f8b0:4864:20::544 as permitted sender) client-ip=2607:f8b0:4864:20::544; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pyopdLJc; spf=pass (google.com: domain of sylphrenadin@gmail.com designates 2607:f8b0:4864:20::544 as permitted sender) smtp.mailfrom=sylphrenadin@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-pg1-x544.google.com with SMTP id f38so648081pgm.2 for ; Thu, 22 Oct 2020 06:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=pyopdLJco+fqduEOt5ILPt3cJRO+Oh6hqy3FINueRwWaaICkuby7DxjIE/WjDf86eA TW2rsYvh0DRiqNCkQKc+UA7H2PbJgRa3sKQpzJi+m94h9KObyhwbRXDlEsw76A/G6ckv 13N4r7wVIOLPI09yZUN1LNPby9np3Bn37O2/dUZmuyI7NJKw33Ip/+kw8Xtd9BDwNFO1 CHKN7cCNlx8JZCgQmRdU3rMgJQOX5/7Vu2VGyFUrDUkKWdJ3UReATbHuHqKWRlYyG7S1 yH93A4+iinPCFxLUOklXe4PZhmQlXsrBzbqNhn5P2SfWA6UXISG5kRTAUgTbbVUvP+hP 1k8g== 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:mime-version :content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=SEPiIDtTxoFiUUKbfzYxx4Gk6yu5QD+6UiXftTNJnMmD/eQypYmqSY838dBlrdb64p 0j1LHvjmms5J4r4/Ad3OyBD4ugSNOEyRrYL1KPtSgnk1o6U7jsFz14OW6O0gEePwboit 6DAW8K9AyJ2ABoDzsZ7FijiJUR1pG+VLiaJan8iC+qOdYZuVTuQVr/fw9e/w4d/FLihe 3LlCaaY+z5V0KOMB6CpLgm3MaK2fZQltxx3pUTawYCVXspUogt5wRXGI63czqyv92mwI XevIkJU4qvZ2+xL82a1k+BSPNio46p6oNJagde3cAocSOtorfuQvsffxLlt374mi2Qef KPUA== X-Gm-Message-State: AOAM533TQlS+jmL5L1jieU7zLzW/46zrnzctRYv/N0km9OyH2p9Fclhp rak1P0hbby0FgkwmIheL3rQ= X-Received: by 2002:a05:6a00:2a5:b029:152:5652:7191 with SMTP id q5-20020a056a0002a5b029015256527191mr2421478pfs.7.1603373508738; Thu, 22 Oct 2020 06:31:48 -0700 (PDT) Return-Path: Received: from adolin ([49.207.204.75]) by smtp.gmail.com with ESMTPSA id k127sm2324006pgk.10.2020.10.22.06.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 06:31:47 -0700 (PDT) Date: Thu, 22 Oct 2020 19:01:44 +0530 From: Sumera Priyadarsini To: sylphrenadin@gmail.com Cc: outreachy-kernel@googlegroups.com Subject: [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC60AC388F9 for ; Fri, 23 Oct 2020 07:22:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E73C2177B for ; Fri, 23 Oct 2020 07:22:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IN5ulN/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E73C2177B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76CAF6E4A6; Fri, 23 Oct 2020 07:22:48 +0000 (UTC) Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E1056F52A; Thu, 22 Oct 2020 13:37:56 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id b23so956927pgb.3; Thu, 22 Oct 2020 06:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=IN5ulN/lhVpkv0cSxQVYeQmL8e6XC9Ui0ongH71NZy+wDEtGl/7jnitdi0qhAAyIZY fC7g6ckIDcNipQDDU/l95Zz5SIw5WgFDHGPbZsnqwhcPDWDUeYQ+K0+pZ4exBAq4gbcw rqJ6yYA5w6lq9ZOLdFbpsKUwr7R6EDI8UsYT73x2NUL9/nh4In959E24DYHQiR4z5JBY 3PhmcpvnBuuDiLX7PaDg4d9j17853UB9O1sXkM4XGUKK+pIkSbJwNUlF7Kq7ZfYzjjTA UDpUqi4GQ2QwwzVjXoCBSJUnNgaE17+WjxzlHjS3QXF8s9sEEYtv9MqLfP/Xm8h49QZ4 R9WA== 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:mime-version :content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=olszCwgk7FFGv16fOk+1/VyDQ1dz9N60K9NOv9LGjGlyG59yD5Dp8NSivYvimik72A OGxnqmJxlAZ9ewArC62QFU5nz4VP6dooe0ACLKYA6QSDA08fB2ITeLHwweDo4bx/VLMD AFw2M6up8sVq17OYxDE2WdAKJzMf080vCmYP95wziPmavZojzHqJiO2O+M82bZKwAbo4 pXsUdxaqkMAEeNgWbr59ZPz0eGi/OggBrQyVlo5zZ/xgiB0GoMhV2tJ4hbxLqipehGKU eTmentiLIk42B8VsU9p7MQ46w4ct+sVJVxiuBNyh+AgwkOrh8+tRV73iupY0WdF8sbwY e/vg== X-Gm-Message-State: AOAM530GuTNn/ukxsBGLIbcZJNln3gGxCvKBkkjNX3Rr8MY+e7WxqcdF lbg1s+hucfFhi1bp4qul1qVMbXZ5O0Vv9Q== X-Google-Smtp-Source: ABdhPJxzYwjbdLDADhpa8w757osNj5Hty2iFA+tEbvr3E1nQBdPpkX6BpAdeBon6QKBNbFuEjHUUvw== X-Received: by 2002:aa7:9e9d:0:b029:152:5ebd:42a with SMTP id p29-20020aa79e9d0000b02901525ebd042amr2500221pfq.4.1603373875970; Thu, 22 Oct 2020 06:37:55 -0700 (PDT) Received: from adolin ([49.207.204.75]) by smtp.gmail.com with ESMTPSA id a22sm2538214pfk.29.2020.10.22.06.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 06:37:55 -0700 (PDT) Date: Thu, 22 Oct 2020 19:07:50 +0530 From: Sumera Priyadarsini To: dri-devel@lists.freedesktop.org Subject: [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailman-Approved-At: Fri, 23 Oct 2020 07:22:29 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, melissa.srw@gmail.com, outreachy-kernel@googlegroups.com, alexander.deucher@amd.com, christian.koenig@amd.com, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A0FBC388F9 for ; Thu, 22 Oct 2020 13:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 41527222E9 for ; Thu, 22 Oct 2020 13:38:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IN5ulN/l" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2900150AbgJVNh5 (ORCPT ); Thu, 22 Oct 2020 09:37:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbgJVNh4 (ORCPT ); Thu, 22 Oct 2020 09:37:56 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 839A8C0613CE; Thu, 22 Oct 2020 06:37:56 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id t14so963823pgg.1; Thu, 22 Oct 2020 06:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=IN5ulN/lhVpkv0cSxQVYeQmL8e6XC9Ui0ongH71NZy+wDEtGl/7jnitdi0qhAAyIZY fC7g6ckIDcNipQDDU/l95Zz5SIw5WgFDHGPbZsnqwhcPDWDUeYQ+K0+pZ4exBAq4gbcw rqJ6yYA5w6lq9ZOLdFbpsKUwr7R6EDI8UsYT73x2NUL9/nh4In959E24DYHQiR4z5JBY 3PhmcpvnBuuDiLX7PaDg4d9j17853UB9O1sXkM4XGUKK+pIkSbJwNUlF7Kq7ZfYzjjTA UDpUqi4GQ2QwwzVjXoCBSJUnNgaE17+WjxzlHjS3QXF8s9sEEYtv9MqLfP/Xm8h49QZ4 R9WA== 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:mime-version :content-disposition; bh=IuqDlc/9sVmn6w8y6S9W6kIXAO5b3CW/ksiq6MJe4cw=; b=VJwqjDXoNBq9BNhc7XL0N07Ds9zE5iCn8vf63eWa5xjFMp6bLNrmwpUqiMr+hNToFP JXFdICoYU0QFNA8zoVzoXPsLjnOuGoLudY+Hdx0ETK9m3cKoxvN26L3Xc6Bx08EKpywW 1dUNrJ+T641Pl62M7XR5Z5v6gOPSLHyPE2maAGE7O/YnAsYqTyZLWOMEaC5I4N/RvsNf 9Wh0qgWhtvgK2f9yNHyaz7hQV63Oas0DRRjtl059L9pmJqWGR/WYor2oK59myfs57zx7 NiHix+l5LVQXzoIiI9JtlIfTRrd8ZFRYZtdZ8adtl3k+jlSoF5TqKEqwf9DRpNOeq3bA dVjw== X-Gm-Message-State: AOAM5315b9zha/lpLSWzXjuRgZQhK1gfZCblNSH/UEa1UM3n5Rdpj4AH jcPmSAUAlsfPKghoDrD2Jrw= X-Google-Smtp-Source: ABdhPJxzYwjbdLDADhpa8w757osNj5Hty2iFA+tEbvr3E1nQBdPpkX6BpAdeBon6QKBNbFuEjHUUvw== X-Received: by 2002:aa7:9e9d:0:b029:152:5ebd:42a with SMTP id p29-20020aa79e9d0000b02901525ebd042amr2500221pfq.4.1603373875970; Thu, 22 Oct 2020 06:37:55 -0700 (PDT) Received: from adolin ([49.207.204.75]) by smtp.gmail.com with ESMTPSA id a22sm2538214pfk.29.2020.10.22.06.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 06:37:55 -0700 (PDT) Date: Thu, 22 Oct 2020 19:07:50 +0530 From: Sumera Priyadarsini To: dri-devel@lists.freedesktop.org Cc: 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: [Outreachy kernel][PATCH 0/5] drm/amdgpu: Replace snprintf() with sysfs_emit Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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. 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