From: Chuck Lever III <chuck.lever@oracle.com>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna@kernel.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] SUNRPC: Fixup gss_status tracepoint error output
Date: Thu, 11 Jul 2024 17:14:54 +0000 [thread overview]
Message-ID: <26BBE6CD-578C-4E38-BE22-1CDFD4EB2374@oracle.com> (raw)
In-Reply-To: <057A51C2-DE21-4B66-9901-D360AADA756F@redhat.com>
> On Jul 11, 2024, at 12:00 PM, Benjamin Coddington <bcodding@redhat.com> wrote:
>
> On 11 Jul 2024, at 11:52, Chuck Lever III wrote:
>
>>> On Jul 11, 2024, at 11:48 AM, Benjamin Coddington <bcodding@redhat.com> wrote:
>>>
>>> On 11 Jul 2024, at 11:28, Chuck Lever wrote:
>>>
>>>> On Thu, Jul 11, 2024 at 11:24:01AM -0400, Benjamin Coddington wrote:
>>>>> The GSS routine errors are values, not flags.
>>>>
>>>> My reading of kernel and user space GSS code is that these are
>>>> indeed flags and can be combined. The definitions are found in
>>>> include/linux/sunrpc/gss_err.h:
>>>>
>>>> To wit:
>>>>
>>>> 116 /*
>>>> 117 * Routine errors:
>>>> 118 */
>>>> 119 #define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET)
>>>> 120 #define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET)
>>>
>>> I read this as just values shifted left by a constant.
>>>
>>> No where in-kernel are they bitwise combined.
>>
>> The kernel gets GSS status values from user space code too.
>>
>>
>>> I noticed this problem in practice
>>> while reading the tracepoint output from corrupted GSS hash routines.
>>
>> Can you describe the problem?
>
> It was a week ago or so, and I don't have the test setup any longer, but the
> tracepoint would not print the actual error returned, rather the bitwise
> combination of that error.
>
> Look closer at the values - it makes no sense that these are bits, else
> GSS_S_BAD_NAMETYPE is the same as GSS_S_BAD_MECH|GSS_S_BAD_NAME.
Understood. Please add:
Fixes: 0c77668ddb4e ("SUNRPC: Introduce trace points in rpc_auth_gss.ko")
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
--
Chuck Lever
next prev parent reply other threads:[~2024-07-11 17:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 15:24 [PATCH] SUNRPC: Fixup gss_status tracepoint error output Benjamin Coddington
2024-07-11 15:28 ` Chuck Lever
2024-07-11 15:43 ` Chuck Lever III
2024-07-11 15:48 ` Benjamin Coddington
2024-07-11 15:52 ` Chuck Lever III
2024-07-11 16:00 ` Benjamin Coddington
2024-07-11 17:14 ` Chuck Lever III [this message]
2024-07-12 11:35 ` Jeff Layton
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=26BBE6CD-578C-4E38-BE22-1CDFD4EB2374@oracle.com \
--to=chuck.lever@oracle.com \
--cc=anna@kernel.org \
--cc=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/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