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>] [day] [month] [year] [list]
Message-ID: <CAKEwX=P=xwdfzT3UZchi3GAuZXKXWTUK0nNN=YfbugyFK+tYVA@mail.gmail.com>
Date: Thu, 26 Sep 2024 15:50:08 -0700
From: Nhat Pham <nphamcs@...il.com>
To: Barry Song <baohua@...nel.org>
Cc: Baolin Wang <baolin.wang@...ux.alibaba.com>, Yosry Ahmed <yosryahmed@...gle.com>, 
	akpm@...ux-foundation.org, hannes@...xchg.org, hughd@...gle.com, 
	shakeel.butt@...ux.dev, ryan.roberts@....com, ying.huang@...el.com, 
	chrisl@...nel.org, david@...hat.com, kasong@...cent.com, willy@...radead.org, 
	viro@...iv.linux.org.uk, chengming.zhou@...ux.dev, linux-mm@...ck.org, 
	kernel-team@...a.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 0/2] remove SWAP_MAP_SHMEM

On Wed, Sep 25, 2024 at 8:59 PM Barry Song <baohua@...nel.org> wrote:
>
> On Thu, Sep 26, 2024 at 2:37 AM Nhat Pham <nphamcs@...il.com> wrote:
>
> I’m not entirely clear on your point. If your proposal is to support the
> case where usage == 1 and nr > 1 only when we don’t require
> CONTINUED, and to issue a warning once we determine that
> CONTINUED is needed, then I’m completely on board with that
> approach.
>
> It seems that your intention is to simply relocate the existing warning
> to the scenario where CONTINUED is actually required, rather than
> maintaining a warning for the case where usage == 1 and nr > 1 at
> all times?

Ohhh yeah we definitely agreed on intentions, but I think I
misunderstood your request :) The code below was an attempt to satisfy
that request...

Please ignore it. I'll submit an actual patch taking into account our
discussions :) Hopefully I won't forget to actually test with thp
swaps this time...

>
> I wasn't actually suggesting a rollback as you posted:
>      err = __swap_duplicate(entry, 1, nr);
>      if (err == -ENOMEM) {
>          /* fallback to non-batched version */
>          for (i = 0; i < nr; i++) {
>              cur_entry = (swp_entry_t){entry.val + i};
>              if (swap_duplicate(cur_entry)) {
>                  /* rollback */
>                  while (--i >= 0) {
>                       cur_entry = (swp_entry_t){entry.val + i};
>                       swap_free(cur_entry);
>                  }
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ