Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp581636pxa; Fri, 31 Jul 2020 22:39:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0Q3BMq/RVGKT3rFOPE1CfMvH3L7TiuTQpVh30llb999NWRSmWGYRxkkMSTuYP/Xs6z9D/ X-Received: by 2002:a50:ba84:: with SMTP id x4mr7257522ede.282.1596260349828; Fri, 31 Jul 2020 22:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596260349; cv=none; d=google.com; s=arc-20160816; b=nl+K9alDQKCNLSrSraIYfNzLZInpRGCD3NZ7t9vMrfpYl9Tnsne0muj2yc35BtiUeE mIrLXpVI0oqrezx7mCqQRcTEWkXeWgD+VnJ6Bph9SWOYWfzKsjqybzAn7j8tCw1iaqXy TuaJVu0pCAl3rgBDNLKfPv2A79GPnPr+7cXnN+31yGG8fG3TKQgYn1Ev2nyAPI5CiCQT tI4Fuxp83aD93+WAWij52L1FDHG+HUdQPiYvtQ5XatBweZUbEvnxdyL+p0JOIIi2tYfb 27XlSp0Xp3x6L3uSonw3VM/wfN/BSBL2IUn8Yx2KM5P1l6z1NsWf680laLDJHb5oowOl Rsyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=lGpwK1KfpscxUqahcA06uhD573mu3C8E7CKIwtqzqVI=; b=CQssBM3sfCwl9Bj3gvOoF1agol4pE2VsJDp8SuXJmaLIJJ3IIfXJdM8fKaIjbssuAM F+qyPKr4UtkeDOCLFEkYcj2YHTe5sG0+d3lMKYeq79HTaHEP+mo/V1DRWI7wnx1u8M1C 5Np/wIlPfNqmrOy3Q81PjK8CfeYMBDQ90DQ9Dlh1o3e992TYQgiSqheI7bgfBJBHe1SV l2MdfDPLOth6M7ifDygNyPaMfgJv/BNWzoI/bASP8RVevsaRHlS4bDIvIpWkl0w0WaDD qcn4csGq1BVN6uwNtQofEy4hPHu+5hzSzvTKeND2xfiWXx+g1WtN+Bj8y13u2FIE0WJk IyZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BJmM0f1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si6601147ejx.645.2020.07.31.22.38.47; Fri, 31 Jul 2020 22:39:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BJmM0f1U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726934AbgHAFii (ORCPT + 99 others); Sat, 1 Aug 2020 01:38:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:40250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbgHAFii (ORCPT ); Sat, 1 Aug 2020 01:38:38 -0400 Received: from localhost (unknown [213.57.247.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 30581206E9; Sat, 1 Aug 2020 05:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596260317; bh=lGpwK1KfpscxUqahcA06uhD573mu3C8E7CKIwtqzqVI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BJmM0f1UXvY+GZiG48xH1hniSbfQOjEcu2PZGU6M97JyZ9pegPUHZKTk0KCCtUwV8 6C3nkXPO9Tq7cb2m+M/aZyM0uGv5FT3niWUayWOm6zuJrVhiXfYMlQEvp8Scf76dP7 ycWYDTIg4oIUopWDINNKCuCrNPcQaJCMnZX+djFQ= Date: Sat, 1 Aug 2020 08:38:33 +0300 From: Leon Romanovsky To: Greg Kroah-Hartman Cc: Jason Gunthorpe , Peilin Ye , Santosh Shilimkar , "David S. Miller" , Jakub Kicinski , Dan Carpenter , Arnd Bergmann , linux-kernel-mentees@lists.linuxfoundation.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH net] rds: Prevent kernel-infoleak in rds_notify_queue_get() Message-ID: <20200801053833.GK75549@unreal> References: <20200730192026.110246-1-yepeilin.cs@gmail.com> <20200731045301.GI75549@unreal> <20200731053306.GA466103@kroah.com> <20200731053333.GB466103@kroah.com> <20200731140452.GE24045@ziepe.ca> <20200731142148.GA1718799@kroah.com> <20200731143604.GF24045@ziepe.ca> <20200731171924.GA2014207@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200731171924.GA2014207@kroah.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 31, 2020 at 07:19:24PM +0200, Greg Kroah-Hartman wrote: > On Fri, Jul 31, 2020 at 11:36:04AM -0300, Jason Gunthorpe wrote: > > On Fri, Jul 31, 2020 at 04:21:48PM +0200, Greg Kroah-Hartman wrote: > > > > > > The spec was updated in C11 to require zero'ing padding when doing > > > > partial initialization of aggregates (eg = {}) > > > > > > > > """if it is an aggregate, every member is initialized (recursively) > > > > according to these rules, and any padding is initialized to zero > > > > bits;""" > > > > > > But then why does the compilers not do this? > > > > Do you have an example? > > At the moment, no, but we have had them in the past due to security > issues we have had to fix for this. Is it still relevant after bump of required GCC version to build kernel? I afraid that without solid example such changes will start to be treated with cargo cult. Jason, I'm using {} instead of {0} because of this GCC bug. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119 Thanks