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: <qfsx67vdly35gj642ae6wok6kzms6iuy626p5sfkqincofwfu2@3r5tk65hj4ie>
Date: Sat, 15 Mar 2025 10:14:29 -0400
From: Ethan Carter Edwards <ethan@...ancedwards.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, tytso@....edu, 
	ernesto.mnd.fernandez@...il.com, sven@...npeter.dev, ernesto@...ellium.com, gargaditya08@...e.com, 
	willy@...radead.org, asahi@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	linux-fsdevel@...r.kernel.org, linux-staging@...ts.linux.dev
Subject: Re: [PATCH RFC 1/8] staging: apfs: init lzfse compression library
 for APFS

On 25/03/15 12:41PM, Dan Carpenter wrote:
> On Fri, Mar 14, 2025 at 05:57:47PM -0400, Ethan Carter Edwards wrote:
> > +static size_t lzfse_decode_buffer_with_scratch(uint8_t *__restrict dst_buffer,
> > +                         size_t dst_size, const uint8_t *__restrict src_buffer,
> > +                         size_t src_size, void *__restrict scratch_buffer) {
> > +  int status;
> > +  lzfse_decoder_state *s = (lzfse_decoder_state *)scratch_buffer;
> > +  memset(s, 0x00, sizeof(*s));
> > +
> > +  // Initialize state
> > +  s->src = src_buffer;
> > +  s->src_begin = src_buffer;
> > +  s->src_end = s->src + src_size;
> > +  s->dst = dst_buffer;
> > +  s->dst_begin = dst_buffer;
> > +  s->dst_end = dst_buffer + dst_size;
> > +
> > +  // Decode
> > +  status = lzfse_decode(s);
> > +  if (status == LZFSE_STATUS_DST_FULL)
> > +    return dst_size;
> > +  if (status != LZFSE_STATUS_OK)
> > +    return 0;                           // failed
> > +  return (size_t)(s->dst - dst_buffer); // bytes written
> > +}
> 
> You'd be better off doing a reformat of the white space before sending
> the driver.  The really basic stuff.

Yes, I apologize. Admittedly, I did not scrutinize the library code as
much as I should have. I will refactor it in the next revision.

> 
> regards,
> dan carpenter
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ