From owner-freebsd-hackers@freebsd.org Fri Aug 30 17:16:26 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78C4BD3B56 for ; Fri, 30 Aug 2019 17:16:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46KmNT3t23z4Kn4 for ; Fri, 30 Aug 2019 17:16:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72a.google.com with SMTP id u190so6808189qkh.5 for ; Fri, 30 Aug 2019 10:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uNnN80wf4y3qhRKTyWGPo/Cnl/OLMVpK+PlukUbmGgo=; b=0qzaDiLOqg+Yk4q96U4MrrKNCGzO/8mMqcYprU2LhNCccsrBvmO7tBOlVwdE+jZhZp aKChYAEWCPY34rKRLnL0sMlSOFKsAkPHL+7EJNGhdnjUqyQA+ii7+d85ve9UgiP657/8 VoHNZiigf9kFP3wj09GUZ8zbhk1PEbEZdrr7VkQWoqSrBq53fbMOM4H86XsS7+RIj9k4 sTc2mDHGOtAsBQjoJS9XOhgLdLL5xpiIl8yZw8QRffkBMpcVw7PvWAdNukZNns6MILHl XN31DpiWX/orDtijKrEZXkpHdQja3FZT8onm9DniaRAbdC7vpCNw+zOHzPVIjpx6drKN 6r6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uNnN80wf4y3qhRKTyWGPo/Cnl/OLMVpK+PlukUbmGgo=; b=H+oqTfJ7du+7hrn7pCMeTXBbJN+Db+OaUwQsvq06T4Us/fWHHi1tW+nzaTlWI1OLYI Vox6quI26abm1tmr++mRIHzjMq/gQGzevuxsRcCTLKFVOC4wbaf66o+fVpWbilugwB+R I4UQbAlLCLTrAiKpYzMn3+GhTZJbqy9rHZ2/O5apleH3Yc4bjF/bf+XiN+UDlN4xrA9e P6PFmUTT+4Wk2IKA20WX/cqg2MIbkj7ZuqM6AtxIPbbFuw+keCd80IM5r3rrOYhWbYse fbZw2xpVnv9qXuJgDnOx5L+5ZzKxFfLVI3+HqtoyCAzidMzzOXHAJUhYhg9BKjQ4r3mB Z1Cw== X-Gm-Message-State: APjAAAVgJ0SsM/c1G9gRPFFgWgz+kEFHK36cow3LRaa+BRZ9GvEPyhth 4p/ss8SYjoSg60ieJmBZPAK+6CxW3aFsdsAZ1T23oQ== X-Google-Smtp-Source: APXvYqwS1MXThCdK17aTku4YhtTJn3v0mEhqZj87Y9OeHg/PDlr6Ie0YOo4Og3CzDTqoQXuF7y6fdSKTHw5HfDd91As= X-Received: by 2002:a37:2c07:: with SMTP id s7mr16228481qkh.495.1567185384081; Fri, 30 Aug 2019 10:16:24 -0700 (PDT) MIME-Version: 1.0 References: <20190820201257.7A9D41F8B7@freefall.freebsd.org> <20190830133855.W1405@besplex.bde.org> <5961a5af-d36c-4b8f-20c1-e7054b0149f4@grosbein.net> In-Reply-To: From: Warner Losh Date: Fri, 30 Aug 2019 11:16:12 -0600 Message-ID: Subject: Re: FreeBSD Security Advisory FreeBSD-SA-19:23.midi To: John Baldwin Cc: Eugene Grosbein , Bruce Evans , Freebsd hackers list X-Rspamd-Queue-Id: 46KmNT3t23z4Kn4 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=0qzaDiLO; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-5.91 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-0.996,0]; RCVD_IN_DNSWL_NONE(0.00)[a.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.92)[ip: (-9.37), ipnet: 2607:f8b0::/32(-2.84), asn: 15169(-2.32), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2019 17:16:26 -0000 On Fri, Aug 30, 2019 at 10:06 AM John Baldwin wrote: > On 8/30/19 12:56 AM, Eugene Grosbein wrote: > > 30.08.2019 11:03, Bruce Evans wrote: > > > >> The patch preserves some historical mistakes and adds some excessive > >> verboseness about probe failures. I'm still waiting for jhb to reply to > >> mails on 30 Oct 2015 and 23 Jan 2018 asking for a review of this patch > >> or better a complete fix. > > > > Hmm... Maybe additional notification worth it :-) > > Hmm, I've used 'hint.foo.0.disabled=1' with many devices and it works fine. > devctl enable can "undo" the disable post-boot even. > > It doesn't disable probing, only attaching once we know which driver a > device > is going to use. As far as I can tell, the patch makes it disable > DEVICE_PROBE as well, but the vast majority of DEVICE_PROBE routines are > idempotent. Only a handful of legacy ISA drivers use 'return (0)' to try > to > pass state from probe to attach via the softc. Those drivers could choose > to > check the disabled flag in their probe routine and/or be fixed to have > idempotent probe routines. I think the latter is probably the best path > forward. > The problem with disabling before PROBE is that if you have N foo devices, hint.foo.0.disabled=1 will disable all of them as the probe routines all return 'not me' and we try foo0 on each new instance... I'm pretty sure that's why it's not done today and why I didn't do it when I added this feature because how do you know you have foo0 until probe says 'yup, that's mine'? Most of the old ISA routines that returned 0 I think have been deleted. Maybe all since they were for fussy hardware from before the plug and play era... Warner