lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mhng-98cc8b2d-86fe-419e-9b0c-3e7f3bc80c48@palmer-si-x1c4>
Date:   Tue, 11 Jul 2017 09:22:40 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...belt.com>
To:     mpe@...erman.id.au
CC:     yamada.masahiro@...ionext.com, mmarek@...e.com,
        will.deacon@....com, peterz@...radead.org, boqun.feng@...il.com,
        mingo@...hat.com, daniel.lezcano@...aro.org, tglx@...utronix.de,
        jason@...edaemon.net, marc.zyngier@....com,
        gregkh@...uxfoundation.org, jslaby@...e.com, davem@...emloft.net,
        mchehab@...nel.org, sfr@...b.auug.org.au, fweisbec@...il.com,
        viro@...iv.linux.org.uk, mcgrof@...nel.org, dledford@...hat.com,
        bart.vanassche@...disk.com, sstabellini@...nel.org,
        daniel.vetter@...ll.ch, msalter@...hat.com,
        nicolas.dichtel@...nd.com, james.hogan@...tec.com,
        paul.gortmaker@...driver.com, linux@...ck-us.net,
        heiko.carstens@...ibm.com, schwidefsky@...ibm.com,
        linux-kernel@...r.kernel.org, patches@...ups.riscv.org,
        akpm@...ux-foundation.org, albert@...ive.com
Subject:     Re: [PATCH 17/17] RISC-V: Build Infastructure

On Mon, 10 Jul 2017 23:31:18 PDT (-0700), mpe@...erman.id.au wrote:
> Palmer Dabbelt <palmer@...belt.com> writes:
>
>> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>> new file mode 100644
>> index 000000000000..366f5f2cf106
>> --- /dev/null
>> +++ b/arch/riscv/Kconfig
>> @@ -0,0 +1,294 @@
> ...
>> +
>> +config EARLY_PRINTK
>> +	bool "Early printk"
>> +	default n
>> +	help
>> +	  This option enables special console drivers which allow the kernel
>> +	  to print messages very early in the bootup process.
>> +
>> +	  This is useful for kernel debugging when your machine crashes very
>> +	  early before the console code is initialized. For normal operation
>> +	  it is not recommended because it looks ugly and doesn't cooperate
>> +	  with klogd/syslogd or the X server. You should normally N here,
>> +	  unless you want to debug such a crash.
>
> Looks like you copied this text from x86? I think the comment about it
> being ugly refers to the VGA early console which you don't have, so
> that's not really accurate.
>
> And the part about it not cooperating with klogs/syslogd is true, early
> printk output doesn't go to syslog. But if you turn EARLY_PRINTK off
> then early printk output goes nowhere at all:
>
> #ifdef CONFIG_EARLY_PRINTK
> extern asmlinkage __printf(1, 2)
> void early_printk(const char *fmt, ...);
> #else
> static inline __printf(1, 2) __cold
> void early_printk(const char *s, ...) { }
> #endif
>
>
> So if you have a functional early console (which I think you do) then
> you might be better off just making this def_bool y.

I think that's best.  The SBI's EARLY_PRINTK support is quite clean, so I don't
see any reason to disable it.  How does this look?

  diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
  index 366f5f2cf106..cc274bbc29a7 100644
  --- a/arch/riscv/Kconfig
  +++ b/arch/riscv/Kconfig
  @@ -268,18 +268,7 @@ config CMDLINE_OVERRIDE
            If you don't know what to do here, say N.

   config EARLY_PRINTK
  -       bool "Early printk"
  -       default n
  -       help
  -         This option enables special console drivers which allow the kernel
  -         to print messages very early in the bootup process.
  -
  -         This is useful for kernel debugging when your machine crashes very
  -         early before the console code is initialized. For normal operation
  -         it is not recommended because it looks ugly and doesn't cooperate
  -         with klogd/syslogd or the X server. You should normally N here,
  -         unless you want to debug such a crash.
  -
  +       def_bool y

   source "lib/Kconfig.debug"

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ