Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp715490ybz; Wed, 15 Apr 2020 17:21:36 -0700 (PDT) X-Google-Smtp-Source: APiQypJBc0PyqC5IANRzmUUb1MpQWDJhFA7p7vkCAm23SMTMmno5ZE2gTZQhnVlCsOJBUxia/wg1 X-Received: by 2002:a17:907:118b:: with SMTP id uz11mr7113697ejb.89.1586996495831; Wed, 15 Apr 2020 17:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586996495; cv=none; d=google.com; s=arc-20160816; b=OQjQ4GdSeRN/N8HsyBMw0LmKOgyDENv6fWScbMlyOleY4MZe2Y3U8uM0TcBn/4RVEn 7FHepOvJaeMojhjhBR8yJLzQGWXJ5CMWVRno2v53g37qGxMftRXyBn0xWG6gI5HiW5WO YLzeNQpgA1wA9Cc7u1gW2FjyPXOXVUyYgec58bwNcSeRXEDAqVf3KJQF6Bxm/gdLlUnB 1C+5iaS7QWH4SUopElEO4bWAgwHrcLcaMq4XiQFKEF+E2eIAAlauSTZ2fmujTaNNzDdN aMPFhXvwbq9NM3ywz6l8qU4UdxDLsSH+DVCQemRFXZk2gyS5JwAkxEgG9F+HhNLeUa8Z jsag== 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=lirxC6OyLMe94Ytuu+eqjqHGME51p1BmVUJrMUdq9/E=; b=nV0PZyvB9hnOmXQGOMTSPTce5WNU/q/dexM45I1ajNWIHDyBfQSbpL9+IIUtmlZ90U g/h72riCBl1MPk0qN9rKrnlHC49/LOz5W5OGXmbbrXRyIHmspdTaE7k5S/4nK5f2D6PK bCY5yzykXYOZ+kwCWsl+etKa31fv66GikXC229TF+rMli4T0u6M27GsJPpHFZLAI/aru RLFhbZheLHrSwFQarFLufV8MhohtZUaOceXZtlLkCsDTw4lNeCbdnwE/ERNuScnXR4W2 6oTa5rlV5/JEBuV+wyGHrN5aBFBXO+ZVtDRJ8DPWo2/FmCojVORTHB7itBKqhYZd5hRs YF8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E1xf5iRf; 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=redhat.com Return-Path: Received: from vger.kernel.org ([23.128.96.18]) by mx.google.com with ESMTP id 94si11754387edk.562.2020.04.15.17.21.12; Wed, 15 Apr 2020 17:21:35 -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=@redhat.com header.s=mimecast20190719 header.b=E1xf5iRf; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1416038AbgDOQ3X (ORCPT + 99 others); Wed, 15 Apr 2020 12:29:23 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:48799 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1416026AbgDOQ3S (ORCPT ); Wed, 15 Apr 2020 12:29:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586968157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lirxC6OyLMe94Ytuu+eqjqHGME51p1BmVUJrMUdq9/E=; b=E1xf5iRfHPAPB/icXj/7/R/efQJ1litXtbN5KmLpyPE+gZiQsMURWL6M3a3VJO6rLQQlda W6IuxicAuUCQphwWfnbQzbT8tNC+htoX9Z+RKO3HdI3EEVJ8vG2KHjCjJxHGVEMScZIg2q lkxVhKYPXWzIfHzyQBjO/m7jD83QXz0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-103-DketKOtEM7S8wFzabwZf9A-1; Wed, 15 Apr 2020 12:29:15 -0400 X-MC-Unique: DketKOtEM7S8wFzabwZf9A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 178B919057A0; Wed, 15 Apr 2020 16:29:14 +0000 (UTC) Received: from treble (ovpn-116-146.rdu2.redhat.com [10.10.116.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63A465D9E2; Wed, 15 Apr 2020 16:29:13 +0000 (UTC) Date: Wed, 15 Apr 2020 11:29:11 -0500 From: Josh Poimboeuf To: Miroslav Benes Cc: Peter Zijlstra , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Jessica Yu Subject: Re: [PATCH 1/7] livepatch: Apply vmlinux-specific KLP relocations early Message-ID: <20200415162911.k3kuqi5dqmngise7@treble> References: <8c3af42719fe0add37605ede634c7035a90f9acc.1586881704.git.jpoimboe@redhat.com> <20200414174406.GC2483@worktop.programming.kicks-ass.net> <20200414180109.da4v2b4ifpixuzn3@treble> <20200414193150.iqw224itgpedpltm@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 15, 2020 at 04:30:15PM +0200, Miroslav Benes wrote: > > From: Josh Poimboeuf > > Subject: [PATCH] livepatch: Disallow vmlinux.ko > > > > This is purely a theoretical issue, but if there were a module named > > OT: "if there were"... subjunctive? I had to google "subjunctive", but yes that seems to be it :-) It means "if, hypothetically, a module named vmlinux.ko existed"... > > vmlinux.ko, the livepatch relocation code wouldn't be able to > > distinguish between vmlinux-specific and vmlinux.o-specific KLP > > relocations. > > > > If CONFIG_LIVEPATCH is enabled, don't allow a module named vmlinux.ko. > > Yup, there is no such check nowadays. I always struggle to find the right > balance between being overprotective and letting the user shoot themselves > in their foot if they want to. But it does not hurt, so ack to that. Yeah, and it does seem very unlikely to have a vmlinux.ko, but especially OOT modules do some crazy things and you never know... -- Josh