Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030528Ab2HPVU6 (ORCPT ); Thu, 16 Aug 2012 17:20:58 -0400 Received: from mga05.intel.com ([192.55.52.89]:4100 "EHLO fmsmga101.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030496Ab2HPVUz (ORCPT ); Thu, 16 Aug 2012 17:20:55 -0400 MIME-Version: 1.0 Date: Fri, 17 Aug 2012 00:20:53 +0300 Message-ID: Subject: on stack dynamic allocations From: "Kasatkin, Dmitry" To: herbert@gondor.hengli.com.au Cc: linux-crypto , LKML , linux-security-module Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 626 Lines: 26 Hello, Some places in the code uses variable-size allocation on stack.. For example from hmac_setkey(): struct { struct shash_desc shash; char ctx[crypto_shash_descsize(hash)]; } desc; sparse complains CHECK crypto/hmac.c crypto/hmac.c:57:47: error: bad constant expression I like it instead of kmalloc.. But what is position of kernel community about it? - Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/