<div dir="ltr"><div dir="ltr">On Mon, Jan 25, 2021, at 12:17 PM Hal Murray via devel <<a href="mailto:devel@ntpsec.org" target="_blank">devel@ntpsec.org</a>> wrote:<br></div><div class="gmail_quote"><div><br></div><div>Actually, the inner quoted material is mine.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Unqualified thoughts said:<br>> A 24 block byte should suffice for the client-supplied data to the NTPv3/4<br>
> server threads, NTPv2 would probably need the same with perhaps a dozen bytes<br>
> differing.<br></blockquote><div><br></div>I went through and checked the variable names back to NTPv1.<br>It turns out NTPv2 would require 5 bytes difference and NTPv1<br><div>would require another 5.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
You need a lock on that block in order to prevent the server from getting half <br>
the data from before an update and the other half from after the update.  <br>
(Remember, the old code was single threaded.)<br></blockquote><div><br></div><div>I had this foolish notion that one could set up an extra</div><div>storage space and an indicator.</div><div>1. indicator points nowhere and both storage spaces are empty.</div><div>2. client writes the template to a non indicated storage space.</div><div>3. client atomically change the indicator to that space.</div><div>4. servers use the indicated template</div><div>5. the client updates</div><div>6. go to set 2.</div><div>7. break at some point and exit.</div><div>Which seems too simple not to be in use. So, it must not work</div><div>generally.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If NTPv3 needs anything that isn't in the NTPv3/4 block, we should add it <br>
rather than creating another block of data.<br></blockquote><div><br></div><div> I think it should generate another block at least on the side</div><div>with the server then my early over-optimizing says that half</div><div>the job of filling in fields could be done with a memory copy</div><div>or three.</div></div></div>