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: <CAOi1vP8TaPmxj7Bx4jRubS7rr0+BOmFdJyZx-X6nwivei=sACw@mail.gmail.com>
Date: Tue, 27 Aug 2024 09:31:33 +0200
From: Ilya Dryomov <idryomov@...il.com>
To: Simon Horman <horms@...nel.org>
Cc: Li Zetao <lizetao1@...wei.com>, davem@...emloft.net, edumazet@...gle.com, 
	kuba@...nel.org, pabeni@...hat.com, marcel@...tmann.org, 
	johan.hedberg@...il.com, luiz.dentz@...il.com, xiubli@...hat.com, 
	dsahern@...nel.org, trondmy@...nel.org, anna@...nel.org, 
	chuck.lever@...cle.com, jlayton@...nel.org, neilb@...e.de, 
	okorniev@...hat.com, Dai.Ngo@...cle.com, tom@...pey.com, jmaloy@...hat.com, 
	ying.xue@...driver.com, linux@...blig.org, jacob.e.keller@...el.com, 
	willemb@...gle.com, kuniyu@...zon.com, wuyun.abel@...edance.com, 
	quic_abchauha@...cinc.com, gouhao@...ontech.com, netdev@...r.kernel.org, 
	linux-bluetooth@...r.kernel.org, ceph-devel@...r.kernel.org, 
	linux-nfs@...r.kernel.org, tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH net-next 4/8] libceph: use min() to simplify the code

On Sun, Aug 25, 2024 at 6:21 PM Ilya Dryomov <idryomov@...il.com> wrote:
>
> On Sat, Aug 24, 2024 at 8:12 PM Simon Horman <horms@...nel.org> wrote:
> >
> > On Thu, Aug 22, 2024 at 09:39:04PM +0800, Li Zetao wrote:
> > > When resolving name in ceph_dns_resolve_name(), the end address of name
> > > is determined by the minimum value of delim_p and colon_p. So using min()
> > > here is more in line with the context.
> > >
> > > Signed-off-by: Li Zetao <lizetao1@...wei.com>
> > > ---
> > >  net/ceph/messenger.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
> > > index 3c8b78d9c4d1..d1b5705dc0c6 100644
> > > --- a/net/ceph/messenger.c
> > > +++ b/net/ceph/messenger.c
> > > @@ -1254,7 +1254,7 @@ static int ceph_dns_resolve_name(const char *name, size_t namelen,
> > >       colon_p = memchr(name, ':', namelen);
> > >
> > >       if (delim_p && colon_p)
> > > -             end = delim_p < colon_p ? delim_p : colon_p;
> > > +             end = min(delim_p, colon_p);
> >
> > Both delim_p, and colon_p are char *, so this seems correct to me.
> >
> > And the code being replaced does appear to be a min() operation in
> > both form and function.
> >
> > Reviewed-by: Simon Horman <horms@...nel.org>
> >
> > However, I don't believe libceph changes usually don't go through next-next.
> > So I think this either needs to be reposted or get some acks from
> > one of the maintainers.
> >
> > Ilya, Xiubo, perhaps you can offer some guidance here?
>
> Hi Simon,
>
> I'm OK with this being taken through net-next.

I see that Jakub picked up some patches from this series, but not this
one.  I'll go ahead and apply to the Ceph tree.

Thanks,

                Ilya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ