Re: [PATCH 5/6] remote-curl: error on incomplete packet

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

 



On Mon, May 18, 2020 at 05:08:57AM -0400, Denton Liu wrote:

> > Hmm. Right now there's no assumption in rpc_in that we're writing
> > pktlines. Will this always be the case?
> > 
> > I think the answer is probably yes. If there's a case where it isn't, it
> > might be something like v0 git-over-http against a server which doesn't
> > have the sideband capability.
> 
> As far as I can tell from skimming the code, v0 uses always pktlines
> although I'm far from being an expert on Git's networking stuff. Perhaps
> we could implement this such that the line-length checking only happens
> for stateless_connect()?

Yeah, that would certainly limit the possibility of unintended side
effects (and I don't think there's any benefit to this patch for the
non-stateless-connect cases).

We'd still be locking stateless-connect into always using pktlines, but
I think that's probably OK in practice. AFAICT it's the case now, and I
doubt we'd have any desire to change it in the future (and if we do,
this is all local-ish code that we could modify).

One unfortunate thing about the protocol (but not new to your patch) is
that this will be a problem for _any_ remote-helper which claims to
support stateless-connect. So they'd all need to carry similar code to
deal with this issue. Right now remote-curl is the only one, but
probably git-remote-ext and git-remote-fd could support this, too. Those
are pretty exotic, though (I don't think anyone has even bothered to
make them support v2 yet).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux