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] [thread-next>] [day] [month] [year] [list]
Date: Thu, 27 Jun 2024 23:35:04 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Yang Shi <yang@...amperecomputing.com>
Cc: peterx@...hat.com, yangge1116@....com, david@...hat.com,
	akpm@...ux-foundation.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [v2 PATCH] mm: gup: do not call try_grab_folio() in slow path

> +int __must_check try_grab_folio(struct folio *folio, int refs, unsigned int flags)

Overly long line (same for the external declaration)

> +	struct page *page = &folio->page;

Page is only used for is_pci_p2pdma_page and is_zero_page, and for
the latter a is_zero_folio already exist.  Maybe remove the local
variable, use is_zero_folio and just open code the dereference in the
is_pci_p2pdma_page call?

> +		ret = gup_hugepte(vma, ptep, sz, addr, end, flags, pages, nr, fast);

Overly lone line.

> +		folio_ref_add(folio,
> +				refs * (GUP_PIN_COUNTING_BIAS - 1));

Nit: this easily fits onto a single line.

>  			if (gup_hugepd(NULL, __hugepd(pmd_val(pmd)), addr,
> -				       PMD_SHIFT, next, flags, pages, nr) != 1)
> +				       PMD_SHIFT, next, flags, pages, nr, true) != 1)

Overly long lin (same in the similar calls below)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ