Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752988AbdHQPIl (ORCPT ); Thu, 17 Aug 2017 11:08:41 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:35070 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbdHQPIj (ORCPT ); Thu, 17 Aug 2017 11:08:39 -0400 MIME-Version: 1.0 In-Reply-To: <20170817144043.GA10717@infradead.org> References: <20170817144043.GA10717@infradead.org> From: Kees Cook Date: Thu, 17 Aug 2017 08:08:38 -0700 Message-ID: Subject: Re: refactoring timers to avoid init_timer*() To: Christoph Hellwig Cc: Thomas Gleixner , LKML , "kernel-hardening@lists.openwall.com" 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: 790 Lines: 23 On Thu, Aug 17, 2017 at 7:40 AM, Christoph Hellwig wrote: > Instea of bloating the timer even more we should kill off > the data field eventually, which should give you the same > protection. > > See my proposal and the related discussion here: > > http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1397209.html Ah! Yes, very cool. Most callbacks could be converted to the new timer callback pretty easily. Some, though, pass non-pointer data in the "data" argument. Those can likely be moved to somewhere else, though. I think it should be possible to just perform all the conversions. Regardless, getting rid of init_timer*() and eliminating the open-coded callback assignments should help. I'll keep grinding on that. -Kees -- Kees Cook Pixel Security