Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
  • [parent not found: <20220504014440.3697851-20-keescook@chromium.org>]
  • * Re: [PATCH 00/32] Introduce flexible array struct memcpy() helpers
           [not found] <20220504014440.3697851-1-keescook@chromium.org>
           [not found] ` <20220504014440.3697851-3-keescook@chromium.org>
           [not found] ` <20220504014440.3697851-20-keescook@chromium.org>
    @ 2022-05-12 21:47 ` David Howells
      2 siblings, 0 replies; 4+ messages in thread
    From: David Howells @ 2022-05-12 21:47 UTC (permalink / raw)
      To: Kees Cook
      Cc: Vincenzo Frascino, Christian Lamparter, Eli Cohen,
    	K. Y. Srinivasan, Louis Peens, Wei Liu, Hulk Robot, James Morris,
    	xen-devel, Guenter Roeck, Marcel Holtmann, Arend van Spriel,
    	Al Viro, Kuniyuki Iwashima, Christian Brauner, Dmitry Kasatkin,
    	Stephen Smalley, linux-usb, linux-wireless, John Keeping,
    	Stefano Stabellini, Greg Kroah-Hartman, Andrew Morton, alsa-devel,
    	Nick Desaulniers, Mimi Zohar, Max Filippov, Eric Dumazet,
    	keyrings, Gregory Greenman, Francis Laniel, Lars-Peter Clausen,
    	Stephen Hemminger, Bradley Grove, Leon Romanovsky, Udipto Goswami,
    	linux-xtensa, Baowen Zheng, Johannes Berg, selinux, linux-arm-msm,
    	Muchun Song, Boris Ostrovsky, linux-arm-kernel, Daniel Axtens,
    	Chris Zankel, Jarkko Sakkinen, linux-integrity, Cong Wang,
    	David Gow, Tom Rix, Alexei Starovoitov, Nuno Sá, Luca Coelho,
    	linux-hardening, Marc Dionne, Frank Rowand, linux-afs,
    	Andrew Gabbasov, Dennis Dalessandro, linux-rdma, Dexuan Cui,
    	Simon Horman, Paolo Abeni, Serge E. Hallyn, Jens Axboe,
    	Xiu Jianfeng, James E.J. Bottomley, Yang Yingliang,
    	Hante Meuleman, Nathan Chancellor, Paul Moore, Mark Brown,
    	Eric Paris, Dan Williams, Tadeusz Struk, Christian Göttsche,
    	Franky Lin, Felipe Balbi, Keith Packard, Martin K. Petersen,
    	Liam Girdwood, Stefan Richter, David S. Miller, Daniel Vetter,
    	llvm, Bjorn Andersson, David Howells, wcn36xx, Eugeniu Rosca,
    	Lee Jones, Steffen Klassert, linux1394-devel, Herbert Xu,
    	linux-scsi, Russell King, Jason Gunthorpe, SHA-cyfmac-dev-list,
    	Andy Gross, Jakub Kicinski, Andy Lavr, Haiyang Zhang, devicetree,
    	Johan Hedberg, linux-hyperv, Kalle Valo, Rich Felker, Rob Herring,
    	Luiz Augusto von Dentz, kunit-dev, Juergen Gross,
    	brcm80211-dev-list.pdl, Loic Poulain, netdev, Takashi Iwai,
    	linux-bluetooth, linux-security-module, Johannes Berg
    
    
    Kees Cook <keescook@chromium.org> wrote:
    
    > I'm happy to also point out that the conversions (patches 5+) are actually
    > a net reduction in lines of code:
    >  49 files changed, 154 insertions(+), 244 deletions(-)
    
    That doesn't mean that it's actually code that's clearer to read.  I would say
    that it's actually less clear.  In a bunch of places, you've done something
    like:
    
    -	e = kmalloc(...);
    -	if (!e)
    +	if (__mem_to_flex_dup(&e, ...))
    
    The problem is that, to me at least, it looks like:
    
    -	e = kmalloc(...);
    -	if (kmalloc failed)
    +	if (__mem_to_flex_dup(&e, ...) succeeded)
    
    David
    
    
    ^ permalink raw reply	[flat|nested] 4+ messages in thread

  • end of thread, other threads:[~2022-05-16  8:08 UTC | newest]
    
    Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20220504014440.3697851-1-keescook@chromium.org>
         [not found] ` <20220504014440.3697851-3-keescook@chromium.org>
         [not found]   ` <d3b73d80f66325fdfaf2d1f00ea97ab3db03146a.camel@sipsolutions.net>
         [not found]     ` <202205040819.DEA70BD@keescook>
         [not found]       ` <970a674df04271b5fd1971b495c6b11a996c20c2.camel@sipsolutions.net>
         [not found]         ` <871qx8qabo.fsf@keithp.com>
         [not found]           ` <202205051228.4D5B8CD624@keescook>
         [not found]             ` <87pmkrpwrs.fsf@keithp.com>
         [not found]               ` <e1ea4926f105b456f6a86ce30a0380ee5f48fe6d.camel@sipsolutions.net>
    2022-05-06 11:15                 ` [PATCH 02/32] Introduce flexible array struct memcpy() helpers David Laight
         [not found] ` <20220504014440.3697851-20-keescook@chromium.org>
    2022-05-12 21:41   ` [PATCH 19/32] afs: Use mem_to_flex_dup() with struct afs_acl David Howells
    2022-05-13 15:44     ` Kees Cook
    2022-05-12 21:47 ` [PATCH 00/32] Introduce flexible array struct memcpy() helpers David Howells
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox