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, 4 Apr 2024 15:41:50 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: Matthew Wilcox <willy@...radead.org>, Suren Baghdasaryan
 <surenb@...gle.com>, joro@...tes.org, will@...nel.org,
 trond.myklebust@...merspace.com, anna@...nel.org, arnd@...db.de,
 herbert@...dor.apana.org.au, davem@...emloft.net, jikos@...nel.org,
 benjamin.tissoires@...hat.com, tytso@....edu, jack@...e.com,
 dennis@...nel.org, tj@...nel.org, cl@...ux.com, jakub@...udflare.com,
 penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
 vbabka@...e.cz, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
 linux-nfs@...r.kernel.org, linux-acpi@...r.kernel.org,
 acpica-devel@...ts.linux.dev, linux-arch@...r.kernel.org,
 linux-crypto@...r.kernel.org, bpf@...r.kernel.org,
 linux-input@...r.kernel.org, linux-ext4@...r.kernel.org,
 linux-mm@...ck.org, netdev@...r.kernel.org,
 linux-security-module@...r.kernel.org
Subject: Re: [PATCH 1/1] mm: change inlined allocation helpers to account at
 the call site

On Thu, 4 Apr 2024 18:38:39 -0400 Kent Overstreet <kent.overstreet@...ux.dev> wrote:

> On Thu, Apr 04, 2024 at 11:33:22PM +0100, Matthew Wilcox wrote:
> > On Thu, Apr 04, 2024 at 03:17:43PM -0700, Suren Baghdasaryan wrote:
> > > Ironically, checkpatch generates warnings for these type casts:
> > > 
> > > WARNING: unnecessary cast may hide bugs, see
> > > http://c-faq.com/malloc/mallocnocast.html
> > > #425: FILE: include/linux/dma-fence-chain.h:90:
> > > + ((struct dma_fence_chain *)kmalloc(sizeof(struct dma_fence_chain),
> > > GFP_KERNEL))
> > > 
> > > I guess I can safely ignore them in this case (since we cast to the
> > > expected type)?
> > 
> > I find ignoring checkpatch to be a solid move 99% of the time.
> > 
> > I really don't like the codetags.  This is so much churn, and it could
> > all be avoided by just passing in _RET_IP_ or _THIS_IP_ depending on
> > whether we wanted to profile this function or its caller.  vmalloc
> > has done it this way since 2008 (OK, using __builtin_return_address())
> > and lockdep has used _THIS_IP_ / _RET_IP_ since 2006.
> 
> Except you can't. We've been over this; using that approach for tracing
> is one thing, using it for actual accounting isn't workable.

I missed that.  There have been many emails.  Please remind us of the
reasoning here.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ