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]
Message-ID: <Y7cjir3+MpT8XqJT@x1n>
Date:   Thu, 5 Jan 2023 14:22:50 -0500
From:   Peter Xu <peterx@...hat.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Muchun Song <songmuchun@...edance.com>,
        Nadav Amit <nadav.amit@...il.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        James Houghton <jthoughton@...gle.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/3] mm/mprotect: Use long for page accountings and retval

On Thu, Jan 05, 2023 at 09:44:16AM +0100, David Hildenbrand wrote:
> I'm wondering if we should just return the number of changed pages via a
> separate pointer and later using an int for returning errors -- when
> touching this interface already.
> 
> Only who's actually interested in the number of pages would pass a pointer
> to an unsigned long (NUMA).
> 
> And code that expects that there never ever are failures (mprotect, NUMA)
> could simply check for WARN_ON_ONCE(ret).
> 
> I assume you evaluated that option as well, what was your conclusion?

Since a single long can cover both things as retval, it's better to keep it
simple?  Thanks,

-- 
Peter Xu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ