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: <20070510112132.GP4629@kernel.dk>
Date:	Thu, 10 May 2007 13:21:33 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

On Thu, May 10 2007, Andrew Morton wrote:
> On Thu, 10 May 2007 12:46:53 +0200 Jens Axboe <jens.axboe@...cle.com> wrote:
> 
> > On Thu, May 10 2007, Jens Axboe wrote:
> > > Yeah, I'm inclined to agree. Perhaps it would be better to put this
> > > stuff in lib/scatterlist.c or something like that instead?
> > > 
> > > > > +/*
> > > > > + * Chain previous sglist to this one
> > > > > + */
> > > > > +static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents,
> > > > > +			    struct scatterlist *sgl)
> > > > > +{
> > > > > +#ifndef ARCH_HAS_SG_CHAIN
> > > > > +	BUG();
> > > > > +#endif
> > > > 
> > > > Can use BUILD_BUG_ON here.  Or just #error.
> > > 
> > > Good idea, thanks!
> > 
> > No wait a second, that wont work. The code is always being built in sg
> > scsi_lib.c, it should just not be called unless we can do chaining. We
> > will never have a large number of segments that require chaining without
> > ARCH_HAS_SG_CHAIN, so it'll never be called in that case. So it has to
> > remain as it is, a BUG().
> 
> Confused.  If it should never be called, why does it even get compiled in?

I can hide it behind ARCH_HAS_SG_CHAIN and provide something ala

#define sg_chain(prv, x, sgl)   BUG()

for when that is not defined. It still needs to be visible.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ