Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changelog improvements before the 3.2 release #5905

Conversation

gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Jun 9, 2022

Miscellaneous improvements to changelog entries, including:

I have only reviewed existing entries. I have not looked for missing entries.

Needs backport for a few entries.

Consolidate the entries for SHA512 and SHA256 since they are being released
together.

List the algorithms generically as SHA-2 since this also applies to SHA224
and SHA384.

Clearly state that the instructions are only supported when building for
Aarch64 (64-bit ARMv8+) and not for Aarch32 (32-bit ARMv8+).

Signed-off-by: Gilles Peskine <[email protected]>
…figs

The entry for “Fix several bugs…” already covers this. This is borderline an
internal detail anyway.

Signed-off-by: Gilles Peskine <[email protected]>
If the key agreement or the public key export in
ssl_write_client_key_exchange() fails, the handshake enters a failed state.
The only valid thing you can do in a failed handshake is to abort it, which
calls mbedtls_ssl_handshake_free(), which destroys ecdh_psa_privey. While
it's good hygiene to destroy the key in the function that creates it, it
would have been cleaned up a little later in the normal course of things
anyway, so there wasn't an actual bug.

Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added enhancement size-s Estimated task size: small (~2d) priority-high High priority - will be reviewed soon labels Jun 9, 2022
@gilles-peskine-arm gilles-peskine-arm added the needs-backports Backports are missing or are pending review and approval. label Jun 9, 2022
@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Jun 9, 2022
@@ -1,4 +1,4 @@
Features
* Add the function mbedtls_timing_get_final_delay() to access the private
final delay field in an mbedtls_timing_delay_context, as requested in
#5183
#5183.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than have to do this check manually, why not update assemble_changelog.py to add a trailing full stop if one is missing? It could also reflow the text if that is desired.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if we're going to change this, how about removing the for consistency?

Add function mbedtls_timing_get_final_delay()...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually write changelog entries in proper English, not headlinese, thus “add a function” or (since it's named) “add the function”.

Regarding automation: automation has the cost of writing the code and of handling exceptions. Exceptions are why we aren't reflowing (sometimes we want forced breaks at specific points) and why we aren't doing spell checking. I'm not sure if there are exceptions where we really don't want a full stop at the end.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ChangeLog is presented as a bulleted list. A bulleted list is not really fully prose, in the same way documentation is; and changelogs are typically read rapidly by users to identify "what might interest me in this new release". So writing for rapid parsing (i.e. consistency across multiple entries) and removal of filler would seem to be reasonable here.

Generally in text, where bulleted lists appear they will (depending on style) either (1) all but the last item end in ;, last item ends in . (this is common in documents where bulleted lists aren't the main content) or (2) none have punctuation at the end (which is common on slides).

However, this gets tricky when some bullet points might be multiple sentences, because each sentence within a bullet point needs its punctuation at the end, and so (for consistency) the last sentence in a multi-sentence bullet point should have its punctuation, and so (also for consistency) a bullet point of only one sentence should also have punctuation at the end.

One might consider not doing this for a very short phrase, such as Fixes #1234, but since we do put full stops at the end of those, I can't see content that wouldn't have punctuation at the end.

@@ -1,3 +1,3 @@
Features
* Add mbedtls_ecp_export() function to export ECP
keypair parameters. Fixes #4838.
* Add a function mbedtls_ecp_export() to export ECP key pair parameters.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think this is better without a:

Suggested change
* Add a function mbedtls_ecp_export() to export ECP key pair parameters.
* Add function mbedtls_ecp_export() to export ECP key pair parameters.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Tom that the version without "a" is better out of the two, but I'm not sure if "function" is even needed here, it's pretty self-evident. The addition of details at the end is OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the version without “a” better? “A” is required for proper English grammar. It's only left out in headlinese.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the entries you objected to to “add function”.

Since this is not a preestablished usage, and I disagree with making it a standard, I have not gone through other entries to align them. If we're to establish a policy, my preference is for “the new X does this”, because it has the simplest sentence construction. I'm also fine with “Add a X that does this”. I don't like “Add X that does this” because it's headlinese, and we have a well-established tradition of writing changelog entries in proper English sentences.

Comment on lines 8 to 10
* The new functions mbedtls_ssl_conf_max_tls_version() and
mbedtls_ssl_conf_min_tls_version() use a single value to specify
the protocol version.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably the section contents are coalesced for the ChangeLog, so these two entries won't necessarily be adjacent. In which case it would be better to use the standard "Add function foo()"-style:

Suggested change
* The new functions mbedtls_ssl_conf_max_tls_version() and
mbedtls_ssl_conf_min_tls_version() use a single value to specify
the protocol version.
* Add functions mbedtls_ssl_conf_max_tls_version() and
mbedtls_ssl_conf_min_tls_version() that use single values to specify
protocol versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is “Add functions …” preferable to “The new functions …”? We've been using both.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that "The new functions" does not imply that there was a change that added them. It might mean that these new functions now use a single value to specify [...]. I agree with Tom here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this. “New” means it wasn't there before the change. It's a common way to word changelog entries (example: Emacs — mostly under “Lisp changes”).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand your approach, but even in the given example a lot of changes follow one of these rules:

  • The new function xxx has been added, The new xxx replaces the current [...]
  • headline: New function xxx, then, in the body which is, or just some description.

I would say that in fact the form proposed is also used, so I'm more inclined to accept it, however I still like other versions more.
Given that I'm not a native speaker, I'll just let others speak in this specific change request.

* Add a function to extract message digest information from a message
digest context.
* The new function mbedtls_md_info_from_ctx() recalls the message digest
information that was used to set up a message digest context.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change from the the "Add function foo()" style?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the function name. I didn't consider “add a function” vs “the new function” to be significant, I just thought my updated sentence flows better.

Copy link
Contributor

@AndrzejKurek AndrzejKurek Jun 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: "the new function" doesn't sound to me like the function was added, it rather states that this new function now recalls the message digest [...].
Subjective: Add _function_name()_ to extract > Add function _function_name()_ > The new function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On reflection I personally prefer “the new function …”, but that's a matter of preference, so I've changed this back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re: "Add ..." vs "The new ..." is a case of active vs passive, us saying what we have done (in present tense, as is common for release notes) vs documenting what is done (it's quite common for documentation to be passive voice).

preprocessing computations to avoid doing them multiple times, which was
causing the handshake to fail.
* Fix a TLS 1.3 handshake failure when the peer Finished message has not
been received yet when we first try to fetch it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that we don't have to give more detail, but is it harmful if the work is already done?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having irrelevant information hides the relevant information, yes. So I'm not reverting this.

Copy link
Contributor

@AndrzejKurek AndrzejKurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes requested.

Copy link
Contributor

@tom-cosgrove-arm tom-cosgrove-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tom-cosgrove-arm tom-cosgrove-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review labels Jun 28, 2022
@gilles-peskine-arm gilles-peskine-arm merged commit 7d14c19 into Mbed-TLS:development Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Design and code approved - may be waiting for CI or backports enhancement needs-backports Backports are missing or are pending review and approval. priority-high High priority - will be reviewed soon size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants