[PATCH] docs/dev-tools: fix a typo

1 view
Skip to first unread message

Haoyang Liu

unread,
Oct 15, 2024, 10:02:58 AM10/15/24
to Alexander Potapenko, Marco Elver, Dmitry Vyukov, Jonathan Corbet, hust-os-ker...@googlegroups.com, Haoyang Liu, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org
fix a typo in dev-tools/kmsan.rst

Signed-off-by: Haoyang Liu <ttttur...@hust.edu.cn>
---
Documentation/dev-tools/kmsan.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/dev-tools/kmsan.rst b/Documentation/dev-tools/kmsan.rst
index 6a48d96c5c85..0dc668b183f6 100644
--- a/Documentation/dev-tools/kmsan.rst
+++ b/Documentation/dev-tools/kmsan.rst
@@ -133,7 +133,7 @@ KMSAN shadow memory
-------------------

KMSAN associates a metadata byte (also called shadow byte) with every byte of
-kernel memory. A bit in the shadow byte is set iff the corresponding bit of the
+kernel memory. A bit in the shadow byte is set if the corresponding bit of the
kernel memory byte is uninitialized. Marking the memory uninitialized (i.e.
setting its shadow bytes to ``0xff``) is called poisoning, marking it
initialized (setting the shadow bytes to ``0x00``) is called unpoisoning.
--
2.25.1

Dongliang Mu

unread,
Oct 15, 2024, 10:11:03 AM10/15/24
to Haoyang Liu, Alexander Potapenko, Marco Elver, Dmitry Vyukov, Jonathan Corbet, hust-os-ker...@googlegroups.com, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org
On Tue, Oct 15, 2024 at 10:09 PM Haoyang Liu <ttttur...@hust.edu.cn> wrote:
>
> fix a typo in dev-tools/kmsan.rst
>
> Signed-off-by: Haoyang Liu <ttttur...@hust.edu.cn>
> ---
> Documentation/dev-tools/kmsan.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/dev-tools/kmsan.rst b/Documentation/dev-tools/kmsan.rst
> index 6a48d96c5c85..0dc668b183f6 100644
> --- a/Documentation/dev-tools/kmsan.rst
> +++ b/Documentation/dev-tools/kmsan.rst
> @@ -133,7 +133,7 @@ KMSAN shadow memory
> -------------------
>
> KMSAN associates a metadata byte (also called shadow byte) with every byte of
> -kernel memory. A bit in the shadow byte is set iff the corresponding bit of the
> +kernel memory. A bit in the shadow byte is set if the corresponding bit of the

This is not a typo. iff is if and only if

Dongliang Mu

Marco Elver

unread,
Oct 15, 2024, 10:33:07 AM10/15/24
to Dongliang Mu, Haoyang Liu, Alexander Potapenko, Dmitry Vyukov, Jonathan Corbet, hust-os-ker...@googlegroups.com, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org
On Tue, 15 Oct 2024 at 16:11, Dongliang Mu <mudongl...@gmail.com> wrote:
>
> On Tue, Oct 15, 2024 at 10:09 PM Haoyang Liu <ttttur...@hust.edu.cn> wrote:
> >
> > fix a typo in dev-tools/kmsan.rst
> >
> > Signed-off-by: Haoyang Liu <ttttur...@hust.edu.cn>
> > ---
> > Documentation/dev-tools/kmsan.rst | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/dev-tools/kmsan.rst b/Documentation/dev-tools/kmsan.rst
> > index 6a48d96c5c85..0dc668b183f6 100644
> > --- a/Documentation/dev-tools/kmsan.rst
> > +++ b/Documentation/dev-tools/kmsan.rst
> > @@ -133,7 +133,7 @@ KMSAN shadow memory
> > -------------------
> >
> > KMSAN associates a metadata byte (also called shadow byte) with every byte of
> > -kernel memory. A bit in the shadow byte is set iff the corresponding bit of the
> > +kernel memory. A bit in the shadow byte is set if the corresponding bit of the
>
> This is not a typo. iff is if and only if

+1

https://en.wikipedia.org/wiki/If_and_only_if

Nack.

Dan Carpenter

unread,
Oct 16, 2024, 9:30:09 AM10/16/24
to Marco Elver, Dongliang Mu, Haoyang Liu, Alexander Potapenko, Dmitry Vyukov, Jonathan Corbet, hust-os-ker...@googlegroups.com, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org
Does "iff" really add anything over regular "if"? I would have thought the
"only if" could be assumed in this case. Or if it's really necessary then we
could spell it out.

regards,
dan carpenter

Alexander Potapenko

unread,
Oct 16, 2024, 9:35:41 AM10/16/24
to Dan Carpenter, Marco Elver, Dongliang Mu, Haoyang Liu, Dmitry Vyukov, Jonathan Corbet, hust-os-ker...@googlegroups.com, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org
I think you are actually right, "if" should be just as fine in this case.

> regards,
> dan carpenter
>


--
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Jonathan Corbet

unread,
Oct 16, 2024, 10:52:44 AM10/16/24
to Dan Carpenter, Marco Elver, Dongliang Mu, Haoyang Liu, Alexander Potapenko, Dmitry Vyukov, hust-os-ker...@googlegroups.com, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org
Somebody "fixing" occurrences of "iff" are a regular occurrence; it's an
attractive nuisance for non-native speakers. For that reason alone, I'm
coming to the conclusion that we should just spell it out when that is
the intended meaning.

jon

Shuah Khan

unread,
Oct 16, 2024, 5:18:53 PM10/16/24
to Jonathan Corbet, Dan Carpenter, Marco Elver, Dongliang Mu, Haoyang Liu, Alexander Potapenko, Dmitry Vyukov, hust-os-ker...@googlegroups.com, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org, Shuah Khan
+1 on this. It would be too attractive for new developers.
It helps us not spend cycles on reviewing and applying the patches.

thanks,
-- Shuah

Jonathan Corbet

unread,
Oct 17, 2024, 11:41:07 AM10/17/24
to Haoyang Liu, Alexander Potapenko, Marco Elver, Dmitry Vyukov, hust-os-ker...@googlegroups.com, Haoyang Liu, kasa...@googlegroups.com, work...@vger.kernel.org, linu...@vger.kernel.org, linux-...@vger.kernel.org
So I have applied this, since "iff" is clearly confusing to a lot of
readers even iff it's correct.

Thanks,

jon
Reply all
Reply to author
Forward
0 new messages