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: <201904010956.x319u70q021113@sdf.org>
Date:   Mon, 1 Apr 2019 09:56:07 GMT
From:   George Spelvin <lkml@....org>
To:     andriy.shevchenko@...ux.intel.com, st5pub@...dex.ru
Cc:     adrian.hunter@...el.com, ard.biesheuvel@...aro.org,
        benh@...nel.crashing.org, bp@...en8.de, darrick.wong@...cle.com,
        dchinner@...hat.com, dedekind1@...il.com,
        gregkh@...uxfoundation.org, hpa@...or.com, jannh@...gle.com,
        jlbec@...lplan.org, jpoimboe@...hat.com, jslaby@...e.cz,
        linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
        linux-snps-arc@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org,
        lkml@....org, mark@...heh.com, mingo@...hat.com,
        mpe@...erman.id.au, naveen.n.rao@...ux.vnet.ibm.com,
        ocfs2-devel@....oracle.com, paulus@...ba.org, peterz@...radead.org,
        richard@....at, sfr@...b.auug.org.au, tglx@...utronix.de,
        vgupta@...opsys.com, x86@...nel.org
Subject: Re: [PATCH v2 5/5] Lib: sort.h: replace int size with size_t size in the swap function

On Mon, 1 Apr 2019 at 12:35:55 +0300, Andy Shevchenko wrote:
> Hmm... If (*swap)() is called recursively it means the change might increase
> stack usage on 64-bit platforms.
> 
> Am I missing something?

Under what conceivable circumstance would someone write a recursive
(*swap)() function?

You're technically right, but the precondition is more fantastical
than "if the U.K.'s parliament get their shit together before the
12th", so I have a hard time worrying about it.

But you did make me think of something: the whole reason swap()
takes a size argument is for the benefit of the (no longer existing)
generic swap functions.  All of the custom swap functions ignore
it.

So how about *deleting* the parameter instead?  That simplifies
everything.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ