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]
Date:   Mon, 3 Apr 2023 15:10:40 +0200
From:   Simon Horman <horms@...nel.org>
To:     Manivannan Sadhasivam <mani@...nel.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-trace-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH RFC] net: qrtr: correct types of trace event parameters

On Mon, Apr 03, 2023 at 10:44:56AM +0530, Manivannan Sadhasivam wrote:
> On Sun, Apr 02, 2023 at 01:15:33PM +0200, Simon Horman wrote:
> > The arguments passed to the trace events are of type unsigned int,
> > however the signature of the events used __le32 parameters.
> > 
> > I may be missing the point here, but sparse flagged this and it
> > does seem incorrect to me.
> > 
> >   net/qrtr/ns.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/qrtr.h):
> >   ./include/trace/events/qrtr.h:11:1: warning: cast to restricted __le32
> >   ./include/trace/events/qrtr.h:11:1: warning: restricted __le32 degrades to integer
> >   ./include/trace/events/qrtr.h:11:1: warning: restricted __le32 degrades to integer
> >   ... (a lot more similar warnings)
> >   net/qrtr/ns.c:115:47:    expected restricted __le32 [usertype] service
> >   net/qrtr/ns.c:115:47:    got unsigned int service
> >   net/qrtr/ns.c:115:61: warning: incorrect type in argument 2 (different base types)
> >   ... (a lot more similar warnings)
> > 
> 
> You are right. The actual arguments (service, instance, node, port) transferred/
> received over QRTR are in le32 as per the protocol. But in the NS driver, the
> arguments passed to the trace events are in the native endian (i.e) before
> getting typecased to le32 for transmission.
> 
> And my intention was to trace the arguments in native endian format only. So
> this patch indeed fixes the issue.
> 
> > Signed-off-by: Simon Horman <horms@...nel.org>
> 
> Please add the fixes tag once you remove RFC,
> 
> Fixes: dfddb54043f0 ("net: qrtr: Add tracepoint support")
> 
> Reviewed-by: Manivannan Sadhasivam <mani@...nel.org>

Hi Manivannan,

thanks for your review.
I'll add the tags and drop the RFC designation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ