Re: [PATCH] SUNRPC: Fixup gss_status tracepoint error output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 Jul 2024, at 11:52, Chuck Lever III wrote:

>> On Jul 11, 2024, at 11:48 AM, Benjamin Coddington <bcodding@xxxxxxxxxx> 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.

Ben





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux