mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Su Hui <suhui@nfschina.com>
Cc: chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de,
	kolga@netapp.com, Dai.Ngo@oracle.com, tom@talpey.com,
	trond.myklebust@hammerspace.com, anna@kernel.org,
	nathan@kernel.org, ndesaulniers@google.com, trix@redhat.com,
	bfields@fieldses.org, linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] fs: lockd: avoid possible wrong NULL parameter
Date: Wed, 2 Aug 2023 13:41:30 +0300	[thread overview]
Message-ID: <0bd584fd-74ac-4b08-ae03-12e329ab186e@kadam.mountain> (raw)
In-Reply-To: <531df8ee-ba09-49df-8201-4221df5853c6@kadam.mountain>

There was a big fight about memcpy() in 2010.

https://lwn.net/Articles/416821/

It's sort of related but also sort of different.  My understanding is
that the glibc memcpy() says that memcpy() always does a dereference so
it can delete all the NULL checks which come after.  The linux kernel
uses -fno-delete-null-pointer-checks to turn this behavior off.

regards,
dan carpenter

  reply	other threads:[~2023-08-02 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02  8:05 Su Hui
2023-08-02 10:25 ` Dan Carpenter
2023-08-02 10:41   ` Dan Carpenter [this message]
2023-08-03  3:08     ` Su Hui
2023-08-02 21:40   ` Nick Desaulniers
2023-08-03  4:16     ` Su Hui
2023-08-03  9:10       ` Dan Carpenter
2023-08-03  9:08     ` Dan Carpenter
     [not found]     ` <5066885c-3ac9-adbd-6852-eba89657470c@nfschina.com>
2023-08-03 16:38       ` Nick Desaulniers
2023-08-03 16:56         ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0bd584fd-74ac-4b08-ae03-12e329ab186e@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=anna@kernel.org \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kolga@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=neilb@suse.de \
    --cc=suhui@nfschina.com \
    --cc=tom@talpey.com \
    --cc=trix@redhat.com \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®