Re: [PATCH 2/2] printk: Add boottime and real timestamps

2017-07-25 Thread Mark Salyzyn
On 07/25/2017 06:00 AM, Peter Zijlstra wrote: On Tue, Jul 25, 2017 at 08:17:27AM -0400, Prarit Bhargava wrote: diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 5b1662ec546f..6cd38a25f8ea 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -1,8 +1,8 @@ menu "printk and dmesg

Re: [PATCH net-next v2 01/10] net: dsa: lan9303: Fixed MDIO interface

2017-07-25 Thread Vivien Didelot
Hi Egil, Egil Hjelmeland writes: > Fixes after testing on actual HW: > > - lan9303_mdio_write()/_read() must multiply register number > by 4 to get offset > > - Indirect access (PMI) to phy register only work in I2C mode. In > MDIO mode phy registers must be

[PATCH net-next v2 06/10] net: dsa: lan9303: added sysfs node swe_bcst_throt

2017-07-25 Thread Egil Hjelmeland
Allowing per-port access to Switch Engine Broadcast Throttling Register Also added lan9303_write_switch_reg_mask() Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 83 ++ 1 file changed, 83 insertions(+)

[PATCH net-next v2 02/10] net: dsa: lan9303: Do not disable/enable switch fabric port 0 at startup

2017-07-25 Thread Egil Hjelmeland
For some mysterious reason enable switch fabric port 0 TX fails to work, when the TX has previous been disabled. Resolved by not disable/enable switch fabric port 0 at startup. Port 1 and 2 are still disabled in early init. Signed-off-by: Egil Hjelmeland ---

[PATCH net-next v2 05/10] net: dsa: added dsa_net_device_to_dsa_port()

2017-07-25 Thread Egil Hjelmeland
Allowing dsa drivers to attach sysfs nodes. Signed-off-by: Egil Hjelmeland --- include/net/dsa.h | 1 + net/dsa/slave.c | 10 ++ 2 files changed, 11 insertions(+) diff --git a/include/net/dsa.h b/include/net/dsa.h index 88da272d20d0..a71c0a2401ee 100644

[PATCH net-next v2 08/10] net: dsa: lan9303: Added ALR/fdb/mdb handling

2017-07-25 Thread Egil Hjelmeland
Added functions for accessing / managing the lan9303 ALR (Address Logic Resolution). Implemented DSA methods: set_addr, port_fast_age, port_fdb_prepare, port_fdb_add, port_fdb_del, port_fdb_dump, port_mdb_prepare, port_mdb_add and port_mdb_del. Since the lan9303 do not offer reading specific ALR

[PATCH net-next v2 10/10] net: dsa: lan9303: Only allocate 3 ports

2017-07-25 Thread Egil Hjelmeland
Saving 2628 bytes. Signed-off-by: Egil Hjelmeland Reviewed-by: Florian Fainelli --- drivers/net/dsa/lan9303-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-core.c

[PATCH net-next v2 09/10] net: dsa: lan9303: Added Documentation/networking/dsa/lan9303.txt

2017-07-25 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland --- Documentation/networking/dsa/lan9303.txt | 63 1 file changed, 63 insertions(+) create mode 100644 Documentation/networking/dsa/lan9303.txt diff --git a/Documentation/networking/dsa/lan9303.txt

[PATCH net-next v2 07/10] net: dsa: lan9303: Added basic offloading of unicast traffic

2017-07-25 Thread Egil Hjelmeland
When both user ports are joined to the same bridge, the normal HW MAC learning is enabled. This means that unicast traffic is forwarded in HW. Support for STP is also added. If one of the user ports leave the bridge, the ports goes back to the initial separated operation. Added brigde methods

[PATCH net-next v2 01/10] net: dsa: lan9303: Fixed MDIO interface

2017-07-25 Thread Egil Hjelmeland
Fixes after testing on actual HW: - lan9303_mdio_write()/_read() must multiply register number by 4 to get offset - Indirect access (PMI) to phy register only work in I2C mode. In MDIO mode phy registers must be accessed directly. Introduced struct lan9303_phy_ops to handle the two modes.

[PATCH net-next v2 03/10] net: dsa: lan9303: Refactor lan9303_enable_packet_processing()

2017-07-25 Thread Egil Hjelmeland
lan9303_enable_packet_processing, lan9303_disable_packet_processing() Pass port number (0,1,2) as parameter instead of port offset. Simplify accordingly. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 66 --

[PATCH net-next v2 04/10] net: dsa: lan9303: Added adjust_link() method

2017-07-25 Thread Egil Hjelmeland
This makes the driver react to device tree "fixed-link" declaration on CPU port. - turn off autonegotiation - force speed 10 or 100 mb/s - force duplex mode Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 33 + 1

[PATCH net-next v2 00/10] net: dsa: lan9303: unicast offload, fdb,mdb,STP

2017-07-25 Thread Egil Hjelmeland
This series extends the LAN9303 3 port switch DSA driver. Highlights: - Make the MDIO interface work - Bridging: Unicast offload - Bridging: Added fdb/mdb handling - Bridging: STP support - Documentation Changes v1 -> v2: - sorted out emailing issues, threading and date. And sent from

[PATCH 12/12] ima: added Documentation/security/IMA-digest-lists.txt

2017-07-25 Thread Roberto Sassu
This patch adds the documentation of the new IMA feature, to load and measure file digest lists. Signed-off-by: Roberto Sassu --- Documentation/security/IMA-digest-lists.txt | 150 1 file changed, 150 insertions(+) create mode 100644

[PATCH 11/12] ima: don't report measurements if digests are included in the loaded lists

2017-07-25 Thread Roberto Sassu
Don't report measurements if the file digest has been included in an uploaded digest list. The advantage of this solution is that the boot time overhead, when a TPM is available, is very small because a PCR is extended only for unknown files. The disadvantage is that verifiers do not know anymore

[PATCH 10/12] ima: disable digest lookup if digest lists are not measured

2017-07-25 Thread Roberto Sassu
Loading digest lists affects the behavior of IMA, as files whose digest has been uploaded will not be displayed in the measurement list. If the digest lists loading event is not reported, verifiers would believe that the files with uploaded digests have not been accessed. To prevent this, the

[PATCH 09/12] ima: introduce securityfs interfaces for digest lists

2017-07-25 Thread Roberto Sassu
This patch introduces the file 'digest_lists' in the securityfs filesystem, to load digest lists metadata. IMA will parse the metadata and loads the digest lists from the path provided. It also introduces 'digests_count', to show the number of digests stored in the digest hash table.

[PATCH 06/12] ima: added parser of digest lists metadata

2017-07-25 Thread Roberto Sassu
Userspace applications will be able to load digest lists by supplying their metadata. Digest list metadata are: - DATA_ALGO: algorithm of the digests to be uploaded - DATA_DIGEST: digest of the file containing the digest list - DATA_SIGNATURE: signature of the file containing the digest list -

[PATCH 08/12] ima: added parser for RPM data type

2017-07-25 Thread Roberto Sassu
This patch introduces a parser for RPM packages. It extracts the digests from the RPMTAG_FILEDIGESTS header section and converts them to binary data before adding them to the hash table. The advantage of this data type is that verifiers can determine who produced that data, as headers are signed

[PATCH 00/12] ima: measure digest lists instead of individual files

2017-07-25 Thread Roberto Sassu
This patch set applies on top of kernel v4.13-rc2. IMA, for each file matching policy rules, calculates a digest, creates a new entry in the measurement list and extends a TPM PCR with the digest of entry data. The last step causes a noticeable performance reduction. Since systems likely access

[PATCH 05/12] ima: add functions to manage digest lists

2017-07-25 Thread Roberto Sassu
This patch first introduces a new structure called ima_digest, which will contain a digest parsed from the digest list. It has been preferred to ima_queue_entry, as the existing structure includes an additional member (a list head), which is not necessary for digest lookup. Then, this patch

[PATCH 04/12] ima: use ima_show_htable_value to show hash table data

2017-07-25 Thread Roberto Sassu
This patch removes ima_show_htable_violations() and ima_show_measurements_count(). ima_show_htable_value(), called by those functions, determines which hash table data should be copied to the buffer depending on the dentry of the file passed as argument. Signed-off-by: Roberto Sassu

[PATCH 03/12] ima: generalize policy file operations

2017-07-25 Thread Roberto Sassu
This patch renames ima_open_policy() and ima_release_policy() respectively to ima_open_data_upload() and ima_release_data_upload(). They will be used to implement file operations for interfaces allowing to upload and read provided data. Also, the new flag IMA_POLICY_BUSY has been defined

[PATCH 02/12] ima: generalize ima_write_policy()

2017-07-25 Thread Roberto Sassu
This patch renames ima_write_policy() to ima_write_data(). Also, it determines the kernel_read_file_id from the dentry associated to the file, and passes it to ima_read_file(). Signed-off-by: Roberto Sassu --- security/integrity/ima/ima_fs.c | 55

[PATCH 01/12] ima: generalize ima_read_policy()

2017-07-25 Thread Roberto Sassu
Rename ima_read_policy() to ima_read_file(), and add file_id as new parameter. If file_id is equal to READING_POLICY, ima_read_file() behavior is the same of that without the patch. ima_read_file() will be used to read digest lists, to avoid reporting measurements when the file digest is known.

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Kirill A. Shutemov
On Tue, Jul 25, 2017 at 02:50:37PM +0200, Jan Kara wrote: > On Tue 25-07-17 14:15:22, Christoph Hellwig wrote: > > On Tue, Jul 25, 2017 at 11:35:08AM +0200, Jan Kara wrote: > > > On Tue 25-07-17 10:01:58, Christoph Hellwig wrote: > > > > On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov

Re: [PATCH 2/2] printk: Add boottime and real timestamps

2017-07-25 Thread Peter Zijlstra
On Tue, Jul 25, 2017 at 08:17:27AM -0400, Prarit Bhargava wrote: > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index 5b1662ec546f..6cd38a25f8ea 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -1,8 +1,8 @@ > menu "printk and dmesg options" > > config PRINTK_TIME > -

Re: [PATCH 1/2] printk: Make CONFIG_PRINTK_TIME an int

2017-07-25 Thread Luis R. Rodriguez
On Tue, Jul 25, 2017 at 08:17:26AM -0400, Prarit Bhargava wrote: > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index fc47863f629c..26cf6cadd267 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -1202,8 +1202,40 @@ static inline void boot_delay_msec(int

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Jan Kara
On Tue 25-07-17 14:15:22, Christoph Hellwig wrote: > On Tue, Jul 25, 2017 at 11:35:08AM +0200, Jan Kara wrote: > > On Tue 25-07-17 10:01:58, Christoph Hellwig wrote: > > > On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov wrote: > > > > I guess it's up to filesystem if it wants to reuse

[PATCH 2/2] printk: Add boottime and real timestamps

2017-07-25 Thread Prarit Bhargava
printk.time=1/CONFIG_PRINTK_TIME=Y timestamps printks with an unmodified hardware clock timestamp. This clock loses time each day making it difficult to determine when an issue has occurred in the kernel log. Modify printk.time to output local, monotonic, or a real timestamp. Modify the output

[PATCH 0/2] printk: allow different timestamps for printk.time

2017-07-25 Thread Prarit Bhargava
Over the past years I've seen many reports of bugs that include time-stamped kernel logs (enabled when CONFIG_PRINTK_TIME=y or print.time=1 is specified as a kernel parameter) that do not align with either external time stamped logs or /var/log/messages. This also makes determining the time of a

[PATCH 1/2] printk: Make CONFIG_PRINTK_TIME an int

2017-07-25 Thread Prarit Bhargava
CONFIG_PRINTK_TIME is a bool and in order to add timestamp options for the monotonic and real time clock it must be expanded to an int. Signed-off-by: Prarit Bhargava Cc: Mark Salyzyn Cc: Jonathan Corbet Cc: Petr Mladek

[PATCH v4 0/6] Add HiSilicon SoC uncore Performance Monitoring Unit driver

2017-07-25 Thread Shaokun Zhang
This patchset adds support for HiSilicon SoC uncore PMUs driver. It includes L3C, Hydra Home Agent (HHA) and DDRC. Changes in v4: * remove redundant code and comments * reverse the functions order in exit function * remove some GPL information * revise including header file * fix Jonathan's other

[PATCH v4 2/6] perf: hisi: Add support for HiSilicon SoC uncore PMU driver

2017-07-25 Thread Shaokun Zhang
This patch adds support HiSilicon SoC uncore PMU driver framework and interfaces. Reviewed-by: Jonathan Cameron Signed-off-by: Shaokun Zhang Signed-off-by: Anurup M --- drivers/perf/Kconfig | 7

[PATCH v4 4/6] perf: hisi: Add support for HiSilicon SoC HHA PMU driver

2017-07-25 Thread Shaokun Zhang
L3 cache coherence is maintained by Hydra Home Agent (HHA) in HiSilicon SoC. This patch adds support for HHA PMU driver, Each HHA has own control, counter and interrupt registers and is an separate PMU. For each HHA PMU, it has 16-programable counters and supports 0x50 events, event code is 8-bits

[PATCH v4 1/6] Documentation: perf: hisi: Documentation for HiSilicon SoC PMU driver

2017-07-25 Thread Shaokun Zhang
This patch adds documentation for the uncore PMUs on HiSilicon SoC. Reviewed-by: Jonathan Cameron Signed-off-by: Shaokun Zhang Signed-off-by: Anurup M --- Documentation/perf/hisi-pmu.txt | 52

[PATCH v4 3/6] perf: hisi: Add support for HiSilicon SoC L3C PMU driver

2017-07-25 Thread Shaokun Zhang
This patch adds support for L3C PMU driver in HiSilicon SoC chip, Each L3C has own control, counter and interrupt registers and is an separate PMU. For each L3C PMU, it has 8-programable counters and supports 0x60 events, event code is 8-bits and every counter is free-running. Interrupt is

[PATCH v4 5/6] perf: hisi: Add support for HiSilicon SoC DDRC PMU driver

2017-07-25 Thread Shaokun Zhang
This patch adds support for DDRC PMU driver in HiSilicon SoC chip, Each DDRC has own control, counter and interrupt registers and is an separate PMU. For each DDRC PMU, it has 8-fixed-purpose counters which have been mapped to 8-events by hardware, it assumes that counter index is equal to event

[PATCH v4 6/6] arm64: MAINTAINERS: hisi: Add HiSilicon SoC PMU support

2017-07-25 Thread Shaokun Zhang
Add support HiSilicon SoC uncore PMU driver. Signed-off-by: Shaokun Zhang --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 205d397..649b144 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6197,6 +6197,13 @@ S:

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Jan Kara
On Tue 25-07-17 10:01:58, Christoph Hellwig wrote: > On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov wrote: > > I guess it's up to filesystem if it wants to reuse the same spot to write > > data or not. I think your assumptions works for ext4 and xfs. I wouldn't > > be that sure for

Re: [PATCH 12/13] net: dsa: lan9303: Added "stp_enable" sysfs attribute

2017-07-25 Thread Egil Hjelmeland
On 24. juli 2017 18:55, Florian Fainelli wrote: On 07/20/2017 06:42 AM, Egil Hjelmeland wrote: Must be set to 1 by user space when STP is used on the lan9303. If bridging without local STP, leave at 0, so external STP BPDUs are forwarded. Hopefully the kernel can be improved so the driver can

Re: [PATCH v5 1/5] mm: add vm_insert_mixed_mkwrite()

2017-07-25 Thread Christoph Hellwig
On Tue, Jul 25, 2017 at 01:14:00AM +0300, Kirill A. Shutemov wrote: > I guess it's up to filesystem if it wants to reuse the same spot to write > data or not. I think your assumptions works for ext4 and xfs. I wouldn't > be that sure for btrfs or other filesystems with CoW support. Or XFS with

Re: [PATCH 13/13] net: dsa: lan9303: lan9303_port_mdb_del remove port 0

2017-07-25 Thread Egil Hjelmeland
On 24. juli 2017 18:57, Florian Fainelli wrote: On 07/20/2017 06:57 AM, Egil Hjelmeland wrote: Workaround for dsa_switch_mdb_add adding CPU port to group, but forgetting to remove it: Should not we move this logic one layer above into DSA then such that insertions and removals are strictly

Re: [PATCH 00/13] net: dsa: lan9303: unicast offload, fdb,mdb,STP

2017-07-25 Thread Egil Hjelmeland
On 24. juli 2017 22:32, David Miller wrote: They are all over the place, over a period of 3 days. I will do "git rebase --ignore-date master" from now on. You must also say in your subject line which of my two GIT networking trees ('net' or 'net-next') your changes are targetting. If you

Re: [PATCH 00/13] net: dsa: lan9303: unicast offload, fdb,mdb,STP

2017-07-25 Thread Egil Hjelmeland
On 24. juli 2017 18:54, Florian Fainelli wrote: > > First thing would be to get your patch submissions square, because the > patches do not appear to have been sent as a reply to this cover letter, > and worse yet, they are all appearing with their commit date, which is > highly confusing since