From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Fri, 23 Feb 2018 11:50:50 +0000 Subject: Re: [0/8] target-iSCSI: Adjustments for several function implementations Message-Id: <866a1802-0cd8-48fd-e04f-7dc676ab58a6@users.sourceforge.net> List-Id: References: <6163538d-a406-2f60-11a2-88b4694e9975@users.sourceforge.net> <20180222143624.7c7241a1@suse.de> <20180222135600.5vv7vzw7sa5metcb@mwanda> <145b88b1-bd1e-a417-8dce-ff19e35a00fc@users.sourceforge.net> <20180223101715.xv5dscdaeszqxoyk@mwanda> In-Reply-To: <20180223101715.xv5dscdaeszqxoyk@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter , target-devel@vger.kernel.org Cc: David Disseldorp , kernel-janitors@vger.kernel.org, LKML , linux-scsi@vger.kernel.org >> Can a passed null pointer really work in this function? >> >> https://elixir.bootlin.com/linux/v4.16-rc2/source/include/crypto/hash.h#L684 >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/crypto/hash.h?id9da844d87796ac31b04e81ee95e155e9043132#n751 >> >> static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) >> { >> return &tfm->base; >> } > > Yes. It's not a dereference, Do any processors treat the zero address still special there? > it's just doing pointer math to get the address. Can eventually happen anything unexpected? Can it be nicer to avoid such a software behaviour concern generally just by adjusting a few jump labels (as I proposed it)? Regards, Markus