Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1807262rdb; Mon, 8 Jan 2024 10:47:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1rb76UpK77AIGVZkmkWVDvB7EH7cURaF0fm96Y90S7VA5qsOjYub3hYAOw0p13Vflbr1O X-Received: by 2002:ac8:5c54:0:b0:429:9d1f:9f93 with SMTP id j20-20020ac85c54000000b004299d1f9f93mr843721qtj.3.1704739621253; Mon, 08 Jan 2024 10:47:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704739621; cv=none; d=google.com; s=arc-20160816; b=iKpXplJ3YHNwwEL9VC9sgcuH3ekDaLpuJsrUMnAPasEFNO6/t2PWjUs5If8rNEVK/9 8ttFc/+quA2l4mecuIQUKZQLf927E9+JY/NMnoVVsJR2oXFvPXre0Jb/eOU6m2NmjOBz VpMMYao1EEClj1+HNP+vF0YDAt3TX8QUmczygouJPZcO7/iYRISlb6gIVor4vdfOs9HA lm5V64QkADT7rWjPznk0VwYwNHa6Al4omstVGW+0J06fLrNQMhIJtwMMUk0cz6yu6wOk uaC6/WORazkrFv+HGR2xfrW0yaYF2BKSalgCnFTAf1gvKYlccrLFbE/9S6SAQvo8rk4K +vlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=IJXkphy1XTMBJngf5Fcupraf2zYCAU0PJBCMt+P8VUc=; fh=Dn2A7Qq8iNR0ee5+uSoMIHnyXHgyZCCi5Z845hsl8g8=; b=GnKpPcflKxZ35QcROQ0ZnPT7kPLLR1aiOirU16X62OvUwkVMH8GUjIVYC9+H/efq2l XwRrbcESUDja0VAQ+fgfbLgAncoizfTdDdAeTWI62YtfbFDOIyYstHplXZqfk3RMUz9y o3ens9rGx725mfwDo8tDs6+KmpUFLX+s7Fq19BvkD3x60HRcJEZFgcJ+DGmLLmFnC7Jc Gr7FXKYHomYE2V0ecGZYZjYrte8LP6W+2eb4hZ3cOyl5qc0vJqsIQfXRukixt2NNo3VM lk7RyeltZQNz0vCMOOhnKHAOZ47esnXLW9naqkVCeK82q+Uah24e/615kJWIZZvVNyJC xSFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="KMgtRs/j"; spf=pass (google.com: domain of linux-kernel+bounces-19989-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19989-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bq12-20020a05622a1c0c00b004281abcb3f4si300700qtb.627.2024.01.08.10.47.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 10:47:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19989-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="KMgtRs/j"; spf=pass (google.com: domain of linux-kernel+bounces-19989-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19989-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 031841C2267E for ; Mon, 8 Jan 2024 18:47:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B43354F89; Mon, 8 Jan 2024 18:46:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="KMgtRs/j" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C9CC54BF4 for ; Mon, 8 Jan 2024 18:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 4C1533F2C6 for ; Mon, 8 Jan 2024 18:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1704739607; bh=IJXkphy1XTMBJngf5Fcupraf2zYCAU0PJBCMt+P8VUc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KMgtRs/jx/XAfcMOm0TeC16vpyT0B6QttOzX0ISB4AobBiEBexImkEZmfE3cQTb7Q ojXDCG8jKlNG/TaKjb/1JYCseLBGqwxjZWj2zfm+yP7KYmX6uaJdP6J9FTyLzt3c27 i6+MGC/EvnHVbWRQaB8S/h+YFgAO1iIRZBEWx2FB3LQs+2P3Pi4q4EYr+JvPXBn+tF ZH4GDp5dBgSDrcd6rBO/awD8fcECKGrHSx84U6BQp7R24Jj21tbRcRi/+iupsZRnW4 NDlFatIZFwAVJ7HGlzxoxviNqweZIUSjWl21zmAv/S3AH1k7UXMaAQzHKTI59UO3xl LGVVBxYQYD8mg== Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3368698efbdso1526533f8f.0 for ; Mon, 08 Jan 2024 10:46:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704739607; x=1705344407; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IJXkphy1XTMBJngf5Fcupraf2zYCAU0PJBCMt+P8VUc=; b=Pp4uYnSOu8E5fqU9+pr69AVxXfhjw3cTZynddeLMtiHSpbNHiaogcAqdxhbm5/a3pf M3R3APkOFT7jc407A9pN+Tyr3vUzJfRsLBFHGacb6Z+QCqSheSeQ1/DmhRBz/NqefQG7 s4hmkrAYhOnm6fyo0cPzeUiLkntU2JsAPnPtvagd5F4V2LkQJjg4KT8PK5TH14NqkB3c GOLK/zQ4Z0uCQlKNMRfu8jdR0SNXzIhQhnTiPSVOfYLqcsSBUpZ9WcXwfRmnBymRBnSO /R9HSlIAkWx2/mSmP1zc7KhDx/1zfe+7PZPsSqmDKgAtTUQPzXg8n+E8Ag99BSWNEFNB WKyw== X-Gm-Message-State: AOJu0YzlehvChtuHM6h3wzNh6JfSCTGLfVsuEoUCFWp9q0gP+QVFgfG6 qbtUq9FAlfRnmAT3sOMz9CYIBZ6+bwiAgUgcDCb6CCSDdwHhydBw98AhfogMYfcxsH0d2LqYXtl mWntbLZQXDTLtA3w4wibRECYVfWmw1qUgSFhjZ2RpG70CWUGyB7xoV8PwYcM7WFj2amaTVA2EJt Y= X-Received: by 2002:a05:6000:4007:b0:336:5b14:525f with SMTP id cp7-20020a056000400700b003365b14525fmr2711514wrb.132.1704739606804; Mon, 08 Jan 2024 10:46:46 -0800 (PST) X-Received: by 2002:a05:6000:4007:b0:336:5b14:525f with SMTP id cp7-20020a056000400700b003365b14525fmr2711509wrb.132.1704739606501; Mon, 08 Jan 2024 10:46:46 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Dimitri John Ledkov Date: Mon, 8 Jan 2024 18:46:10 +0000 Message-ID: Subject: Re: [BUG] SHA-3 causes kmod 28 to segfault To: "Russell King (Oracle)" Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Mon, 8 Jan 2024 at 18:30, Russell King (Oracle) wrote: > > On Mon, Jan 08, 2024 at 06:14:17PM +0000, Dimitri John Ledkov wrote: > > Hi, > > > > On Mon, 8 Jan 2024 at 16:38, Russell King (Oracle) > > wrote: > > > > > > Hi, > > > > > > When building 6.7 under Debian Oldstable with kmod 28, the installation > > > of modules fails during depmod with a SEGV. > > > > > > > What is your kernel configuration, and I hope you make config choices > > compatible with your target host OS. > > "target host OS" - that's a total misnomer. "host" is generally what > you're building under. "target" is generally what you're building _for_. > So I don't fully understand your comment. Maybe you meant "target _and_ > host" ? the kernel configuration you use, should target the operating system you are planning to use the given kernel on. using bleeding edge kernel features, with an obsolete userspace often can have compatibility issues. > > > > Running under gdb: > > > > > > Program received signal SIGSEGV, Segmentation fault. > > > __strlen_sse2 () at ../sysdeps/x86_64/multiarch/strlen-vec.S:133 > > > > > > I have no further information as I can't remember how to get the debug > > > info for packages under Debian - and even if I could, it's probably a > > > bug in the kmod package that Debian will have absolutely no interest in > > > fixing (based on previous experience reporting bugs to Debian.) > > > > For latest kernel and latest kernel features support in kmod, latest > > kmod is required. I.e. patched with > > https://github.com/kmod-project/kmod/commit/510c8b7f7455c6613dd1706e5e41ec7b09cf6703 > > Would be nice if there was some documentation. Also, as kconfig provides > a mechanism to detect e.g. the version of tooling used to build the > kernel, it would've been nice to detect whether depmod was sufficiently > recent to support SHA3 and make the module signing SHA3 options depend > on that. > > Leaving this to a SEGV to indicate that something is wrong isn't user > friendly. > There is no ability to detect runtime kmod at build time, given the two are usually often not the same. Can you please provide your config? Can you please explain how you chose it? As both oldconfig, and menuconfig should have offered you MODULE_SIG_SHA256 as the default choice, if you chose to enable automatic module signing with an ephemeral key. Please note that SHA256 is recommended and sufficient through 2030 and beyond, as of now. If you want to use SHA3, SM3, or GOST you need to have appropriate builds of openssl and kmod to support those. -- Dimitri Sent from Ubuntu Pro https://ubuntu.com/pro