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] [day] [month] [year] [list]
Message-ID: <YxAJNhMcLxjlxVy0@google.com>
Date:   Thu, 1 Sep 2022 10:21:58 +0900
From:   Sergey Senozhatsky <senozhatsky@...omium.org>
To:     Alexey Romanov <avromanov@...rdevices.ru>,
        Minchan Kim <minchan@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     senozhatsky@...omium.org, ngupta@...are.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, kernel@...rdevices.ru
Subject: Re: [PATCH v1] zsmalloc: zs_object_copy: replace email link to doc

On (22/08/15 17:48), Alexey Romanov wrote:
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 99d93a48cbe0..17641bde5432 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1559,8 +1559,8 @@ static void zs_object_copy(struct size_class *class, unsigned long dst,
>           * Calling kunmap_atomic(d_addr) is necessary. kunmap_atomic()
>           * calls must occurs in reverse order of calls to kmap_atomic().
>           * So, to call kunmap_atomic(s_addr) we should first call
> -         * kunmap_atomic(d_addr).  For more details see
> -         * https://lore.kernel.org/linux-mm/5512421D.4000603@samsung.com/
> +         * kunmap_atomic(d_addr). For more details see
> +         * Documentation/mm/highmem
>           */
>          if (s_off >= PAGE_SIZE) {
>              kunmap_atomic(d_addr);

So I'm not against this patch, but in general I don't think we document
kmap_atomic/kunmap_atomic in the kernel. That's type of API that people
get BUG() on and then figure out that it's a stack and pop-s should
mirror push-es. We have lots of undocumented src/dst kmap-s:

                src = kmap_atomic(s_page);
                dst = kmap_atomic(d_page);
                do_copy_page(dst, src);
                kunmap_atomic(dst);
                kunmap_atomic(src);

Like I said, I'm not against this patch, so FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>

I'll let Minchan to have the final word.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ