smatch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: smatch@vger.kernel.org
Cc: dan.carpenter@linaro.org, error27@gmail.com,
	Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Subject: [PATCH] kernel_user_data: add ceph_decode_n() as returning user data
Date: Wed, 20 Mar 2024 03:07:38 -0700	[thread overview]
Message-ID: <20240320100738.1776687-1-harshit.m.mogalapalli@oracle.com> (raw)

After this patch: verified couple of instances where we have code like:
	foo = ceph_decode_8(bar)

net/ceph/messenger_v2.c:521 decode_preamble()
	user rl: 'desc->fd_tag' = '0-255'

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
 smatch_kernel_user_data.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/smatch_kernel_user_data.c b/smatch_kernel_user_data.c
index 6ebf1ed1..34f9231e 100644
--- a/smatch_kernel_user_data.c
+++ b/smatch_kernel_user_data.c
@@ -49,6 +49,11 @@ static struct user_fn_info func_table[] = {
 	{ "simple_strtoul", USER_DATA, -1, "$" },
 	{ "simple_strtoull", USER_DATA, -1, "$" },
 	{ "kvm_register_read", USER_DATA, -1, "$" },
+	{ "ceph_decode_8", USER_DATA, -1, "$" },
+	{ "ceph_decode_16", USER_DATA, -1, "$" },
+	{ "ceph_decode_32", USER_DATA, -1, "$" },
+	{ "ceph_decode_64", USER_DATA, -1, "$" },
+
 };
 
 static struct smatch_state *empty_state(struct sm_state *sm)
-- 
2.39.3


             reply	other threads:[~2024-03-20 10:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20 10:07 Harshit Mogalapalli [this message]
2024-03-20 11:45 ` [PATCH] kernel_user_data: add ceph_decode_n() as returning user data Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240320100738.1776687-1-harshit.m.mogalapalli@oracle.com \
    --to=harshit.m.mogalapalli@oracle.com \
    --cc=dan.carpenter@linaro.org \
    --cc=error27@gmail.com \
    --cc=smatch@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).