linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Axtens <dja@axtens.net>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/configs: Disable /dev/port in skiroot defconfig
Date: Tue, 02 Jul 2019 16:41:51 +1000	[thread overview]
Message-ID: <87y31h0wgg.fsf@dja-thinkpad.axtens.net> (raw)
In-Reply-To: <87r27escsi.fsf@concordia.ellerman.id.au>

Michael Ellerman <mpe@ellerman.id.au> writes:

> Daniel Axtens <dja@axtens.net> writes:
>> While reviewing lockdown patches, I discovered that we still enable
>> /dev/port (CONFIG_DEVPORT) in skiroot.
>>
>> We don't need it. Deselect CONFIG_DEVPORT for skiroot.
>
> Why don't we need it? :)

I should have explained this better :)

/dev/port is used for old x86 style IO accesses.

It's set up in drivers/char/mem.c, and is only created if
arch_has_dev_port() returns true. Per arch/powerpc/include/asm/io.h, on
PPC64 with PCI, this is only true if there's a legacy ISA bridge.

Even if a system has a legacy ISA bridge installed, we have no business
accessing it in skiroot.

Regards,
Daniel
>
> cheers
>
>> diff --git a/arch/powerpc/configs/skiroot_defconfig b/arch/powerpc/configs/skiroot_defconfig
>> index 5ba131c30f6b..b2e8f37156eb 100644
>> --- a/arch/powerpc/configs/skiroot_defconfig
>> +++ b/arch/powerpc/configs/skiroot_defconfig
>> @@ -212,6 +212,7 @@ CONFIG_IPMI_WATCHDOG=y
>>  CONFIG_HW_RANDOM=y
>>  CONFIG_TCG_TPM=y
>>  CONFIG_TCG_TIS_I2C_NUVOTON=y
>> +# CONFIG_DEVPORT is not set
>>  CONFIG_I2C=y
>>  # CONFIG_I2C_COMPAT is not set
>>  CONFIG_I2C_CHARDEV=y
>> -- 
>> 2.20.1

  reply	other threads:[~2019-07-02  6:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-27  5:30 [PATCH] powerpc/configs: Disable /dev/port in skiroot defconfig Daniel Axtens
2019-06-28  1:45 ` Michael Ellerman
2019-07-02  6:41   ` Daniel Axtens [this message]
2019-08-28  4:24 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y31h0wgg.fsf@dja-thinkpad.axtens.net \
    --to=dja@axtens.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).