From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5D7B84A3E; Mon, 16 Dec 2024 17:22:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734369740; cv=none; b=eR4fbCKlIOQF6uJmE41pUYke/xtm3f4gkhy4LDSCBHwHpTTw+EZuSe67ahceJSKPBC6MRhqwcxwbmXceQ3mCEC740j+6JgdDbC5Dj1V9UXFLxV82jwvzsZz9NgvAG3zSxsemRMENQe/AHBBwjDxsAPGZGKAEJ+96pspQl9bavfI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734369740; c=relaxed/simple; bh=O/q/fzvwz3vB4ewt8e5nqD9k9hKIm2xw+UCCDIxGymA=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=jioss1h/kEyify6snIS+DlUM9YEbdxfdAs0KEHBia1sas0yGfNaTwwYN5nKl6zj7JCk174lpabt9OahqPHODiREB2Jthq+hBdEviEj7kwDiE2VlWwNQZ6+k7ulLoaPksvBCBVSg7+XktpXMy1Jd8F/X8VvDA/pFWKucug/aeljA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=HQFwuLt5; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="HQFwuLt5" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BGFHqo2022103; Mon, 16 Dec 2024 17:21:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 57mXg//zJJ5EQoQavecLesiluqversb+hD+IQZmv2X0=; b=HQFwuLt5sGfKR+6d jkHdPU/asp+BVmnhZ83kQMJrInyJ7Z7WO6a1bWXuggos5bfu9UlLOrBJQ7zhUgEo q5sG4LCIVwCB63nZYVaAtmAVfLDQNRm4xAFf1vH/27f+EWi6Nb8NrjZ96YIiBYap dGY/w1w8vO24PzqB3Cse4TLi4yN8x4fBCFP7c7+JwTkUfnoocjO79prNpBNY4MZT PbAcPC6uUnwBlgFZopDaMXDnF7z/6rJomYFvdtIM/MbnxmIdG4yu9OSSrgwLi7Gv xXyHsjMGNSJxrTXd11nAKS7qS0GoTLRlHcgS+77Lsr/PM2qw/6uWXyqDInFxYvNL xovcKg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43jpqmgaxq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Dec 2024 17:21:58 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4BGHLvSJ028436 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 16 Dec 2024 17:21:57 GMT Received: from [10.110.102.127] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 16 Dec 2024 09:21:55 -0800 Message-ID: <99148f0a-e46c-47a7-a910-12269817a0e6@quicinc.com> Date: Mon, 16 Dec 2024 09:21:53 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/msm: fix -Wformat-security warnings To: Arnd Bergmann , Rob Clark , "Dmitry Baryshkov" , David Airlie , Simona Vetter , Jessica Zhang CC: Arnd Bergmann , Sean Paul , Konrad Dybcio , Marijn Suijten , Akhil P Oommen , Neil Armstrong , Jinjie Ruan , =?UTF-8?B?QmFybmFiw6FzIEN6w6ltw6Fu?= , , , , References: <20241216083319.1838449-1-arnd@kernel.org> Content-Language: en-US From: Abhinav Kumar In-Reply-To: <20241216083319.1838449-1-arnd@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: esH0aAL_b0cg8n4lb3vzFaKfR5wwSlig X-Proofpoint-GUID: esH0aAL_b0cg8n4lb3vzFaKfR5wwSlig X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 lowpriorityscore=0 mlxscore=0 phishscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1011 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412160145 On 12/16/2024 12:33 AM, Arnd Bergmann wrote: > From: Arnd Bergmann > > Passing a variable string as a printf style format is potentially > dangerous that -Wformat-security can warn about if enabled. A new > instance just got added: > > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function 'dpu_kms_mdp_snapshot': > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1046:49: error: format not a string literal and no format arguments [-Werror=format-security] > 1046 | vbif->name); > | ~~~~^~~~~~ > > Fix this one and the preexisting -Wformat-security warnings the in the > DRM code for snapdragon. > > Fixes: 1a40bb31fcf1 ("drm/msm/dpu: Add VBIF to DPU snapshot") # and others > Signed-off-by: Arnd Bergmann > --- > I have a larger series that I still plan to send eventually, sending this > one now as I just saw another one get added. The warning is enabled by > default because there are still over 100 other files with the same problem. > --- > drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 28 ++++++++++++++++--------- > 2 files changed, 19 insertions(+), 11 deletions(-) > Reviewed-by: Abhinav Kumar