lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ed1ca9d-a17e-46b7-ae08-81c3d44a6063@ideasonboard.com>
Date: Fri, 11 Oct 2024 16:18:08 +0530
From: Umang Jain <umang.jain@...asonboard.com>
To: Stefan Wahren <wahrenst@....net>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
Cc: linux-rpi-kernel@...ts.infradead.org,
 linux-arm-kernel@...ts.infradead.org, linux-staging@...ts.linux.dev,
 linux-kernel@...r.kernel.org,
 Kieran Bingham <kieran.bingham@...asonboard.com>,
 Dan Carpenter <dan.carpenter@...aro.org>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 kernel-list@...pberrypi.com
Subject: Re: [PATCH 2/8] staging: vchiq_core: Properly log dev_err()

Hi Stefan

On 11/10/24 4:15 pm, Stefan Wahren wrote:
> Hi Umang,
>
> [add Raspberry Pi guys to the loop]
>
> Am 11.10.24 um 09:22 schrieb Umang Jain:
>> Properly log a dev_err() message when the msgid is not of
>> VCHIQ_MSG_PADDING type. Drop 'oldmsgid' scoped variable and improve
>> on the error string as well.
>>
>> Signed-off-by: Umang Jain <umang.jain@...asonboard.com>
>> ---
>>   .../vc04_services/interface/vchiq_arm/vchiq_core.c    | 11 ++++-------
>>   1 file changed, 4 insertions(+), 7 deletions(-)
>>
>> diff --git 
>> a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c 
>> b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
>> index e9b60dd8d419..1dca676186b6 100644
>> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
>> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
>> @@ -1188,13 +1188,10 @@ queue_message_sync(struct vchiq_state *state, 
>> struct vchiq_service *service,
>>       header = (struct vchiq_header *)SLOT_DATA_FROM_INDEX(state,
>>           local->slot_sync);
>>
>> -    {
>> -        int oldmsgid = header->msgid;
>> -
>> -        if (oldmsgid != VCHIQ_MSGID_PADDING)
>> -            dev_err(state->dev, "core: %d: qms - msgid %x, not 
>> PADDING\n",
>> -                state->id, oldmsgid);
>> -    }
>> +    if (header->msgid != VCHIQ_MSGID_PADDING)
>> +        dev_err(state->dev,
>> +            "core: %d: qms - msgid %x, is not a PADDING message\n",
>> +            state->id, header->msgid);
> I'm fine with this change, but the behavior looks strange to me.
>
> Either this is a real error, I would expect the function would return
> with something like EINVAL here or this should be a warning?
>
> Sorry, no idea what's correct here.

indeed, I'll check the code path and see how it is used.

However, I will propose the change (if any) on top of this series/patch. 
Since it would be functional change ... so need to document it 
appropriately.

>
> Best regards
>>
>>       dev_dbg(state->dev, "sync: %d: qms %s@%pK,%x (%d->%d)\n",
>>           state->id, msg_type_str(VCHIQ_MSG_TYPE(msgid)), header, size,
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ