From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762276AbdEVUfk (ORCPT ); Mon, 22 May 2017 16:35:40 -0400 Received: from nm26.bullet.mail.ne1.yahoo.com ([98.138.90.89]:38728 "EHLO nm26.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758066AbdEVUfh (ORCPT ); Mon, 22 May 2017 16:35:37 -0400 X-Yahoo-Newman-Id: 889484.26041.bm@smtp209.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yJTjvwUVM1n_TcTx1iWYdYNkL35mRwvVfzpgeosgCFdGoPc 3yGuZeR4KMe.hkWATBqg.H46yTOq_MQJs2WH_2htNcGkDnKZkTdD5w3H6Ah7 YzJqBMAGbq7_d5Ey7hYlxSuut0MInFwMuOU9nRByLAq3O5IBoMa3500uY6sB 8uNPf75qXoE1WMTmhgkNzV6O0Eo8.oBFB_T3X8.zYQv0ZKATSrGlaiU7F9Hj MuS7T8IRuZQTFde2dslEEc4yMkDWkAI9eSwDxiHSmNF1oAE9vyfp8RV45F0M zgQvR310OvKeuAdUyShbVsxU02kEdIFQKoTGGrVd0wJURZdjavzVjNpexgMe 0sPF1kGZUHsLmiJxb1JvGwfmoH1PadVn3VSQGCcJ5IG2iwDXG2PbOsgEmqun LaD0npfST8foQVdMdz83MLZ.Fh3ufX1F_xENsLEGahRWIoeXetGV9Z3042aj 4BKDO7D97m_RiBiD65tN58MS4RlQFa_Fxj7KxJ0MgoshQuak49Qk8Fvk1i0G HCWRU925.2Dhf5wqsVEpcRuYFAPIXlSrHWPh5eiJR_j9z0HZhOrzFCPSS4W_ qpqKt8RqJ2QYLhAN.6JmLx4C3tg-- X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Subject: Re: [PATCH] LSM: Make security_hook_heads a local variable. To: Igor Stoppa , Christoph Hellwig , Tetsuo Handa References: <20170520085147.GA4619@kroah.com> <1495365245-3185-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <20170522140306.GA3907@infradead.org> Cc: linux-security-module@vger.kernel.org, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, Greg KH , James Morris , Kees Cook , Paul Moore , Stephen Smalley From: Casey Schaufler Message-ID: Date: Mon, 22 May 2017 13:32:59 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/22/2017 12:50 PM, Igor Stoppa wrote: > On 22/05/17 18:09, Casey Schaufler wrote: >> On 5/22/2017 7:03 AM, Christoph Hellwig wrote: > [...] > >>> But even with those we can still chain >>> them together with a list with external linkage. >> I gave up that approach in 2012. Too many unnecessary calls to >> null functions, and massive function vectors with a tiny number >> of non-null entries. From a data structure standpoint, it was >> just wrong. The list scheme is exactly right for the task at >> hand. > I understand this as a green light, for me to continue with the plan of > using LSM Hooks as example for making dynamically allocated data become > read-only, using also Tetsuo's patch (thanks, btw). I still don't like the assumption that a structure of N elements can be assumed to be the same as an array of N elements. Putting on my hardening hat, however, I like the smalloc() solution to keeping the hook lists safe, so I am willing to swallow the objection to using offsets to address the existing exposure. > > Is that correct? > > --- > thanks, igor > -- > To unsubscribe from this list: send the line "unsubscribe linux-security-module" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >